Hi Avi,<br><br>It works well, thanks for your kindly information.<br><br>BR,<br>Charles<br><br><div class="gmail_quote">2011/10/17 fieldpeak <span dir="ltr">&lt;<a href="mailto:fieldpeak@gmail.com">fieldpeak@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Avi,<br><br>Thanks your valuable info, and i will try later, Thanks.<br><br>BR,<br>Charles<div><div></div><div class="h5">
<br><br><div class="gmail_quote">2011/10/16 Avi Marcus <span dir="ltr">&lt;<a href="mailto:avi@avimarcus.net" target="_blank">avi@avimarcus.net</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Looking at the a_ prefix from mod_xml_cdr.c, it seems like it&#39;s this:<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">



is_b = channel &amp;&amp; switch_channel_get_originator_caller_profile(channel);</blockquote><div><br></div><div>Feel free to check freeswitch/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c</div><div><br></div><div><span style="font-family:Verdana, Arial, Helvetica, sans-serif">-Avi</span></div>



<div>
<br><br><div class="gmail_quote"><div><div></div><div>On Sun, Oct 16, 2011 at 5:41 AM, fieldpeak <span dir="ltr">&lt;<a href="mailto:fieldpeak@gmail.com" target="_blank">fieldpeak@gmail.com</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>

Hi Friends,<br>
<br>
i&#39;m using mod_nibblebill for billing on FS, i bundled event processing<br>
fucntions when status change,<br>
e.g. /* on_routing */ check_billing_before_routing,<br>
and * on_hangup */ process_hangup, as below,<br>
however, i found it excuted the processing function on both A-leg and<br>
B-leg, what i want is that either only A-leg or only B-leg (i can<br>
select by coding), how can i realize it?<br>
<br>
P.S. is it possible that i identify the Legs (A or B) inside the<br>
processing function (e.g. check_billing_before_routing,) by intput<br>
parameter *sessionsession?<br>
<br>
<br>
source codes as below,<br>
<br>
switch_state_handler_table_t nibble_state_handler = {<br>
        /* on_init */ NULL,<br>
        /* on_routing */ check_billing_before_routing, /* Need to add a check<br>
here for anything in their account before routing */<br>
        /* on_execute */ sched_billing,         /* Turn on heartbeat for this<br>
session and do an initial account check */<br>
        /* on_hangup */ process_hangup,         /* On hangup - most important place<br>
to go bill */<br>
        /* on_exch_media */ NULL,<br>
        /* on_soft_exec */ NULL,<br>
        /* on_consume_med */ NULL,<br>
        /* on_hibernate */ NULL,<br>
        /* on_reset */ NULL,<br>
        /* on_park */ NULL,<br>
        /* on_reporting */ NULL,<br>
        /* on_destroy */ NULL<br>
};<br>
<br>
<br>
static switch_status_t<br>
check_billing_before_routing(switch_core_session_t *session)<br>
{<br>
        //is it possible to identify the legs (A or B) here?<br>
        ...<br>
}<br>
<br>
        static switch_status_t process_hangup(switch_core_session_t *session)<br>
{<br>
        ...<br>
}<br>
<br>
BR,<br>
Charles<br>
<br>
<br></div></div>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br></div></div>
<br><br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br></div></div><font color="#888888">-- <br>Regards,<br>Charles<br><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Charles<br><br>