<div dir="ltr">Looking at the a_ prefix from mod_xml_cdr.c, it seems like it'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 && 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 class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif; ">-Avi</span></div>
<div>
<br><br><div class="gmail_quote">On Sun, Oct 16, 2011 at 5:41 AM, fieldpeak <span dir="ltr"><<a href="mailto:fieldpeak@gmail.com">fieldpeak@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Friends,<br>
<br>
i'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>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">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>