I have tried both inline and export but I still have cdrs where the accountcode is not written. Any help would be greatly appreciated. Regards Panagiotis On 1/31/2016 11:58 PM, Oz Mortimer wrote:
Try export rather than set
On 31 Jan 2016, at 18:45, servtelar@gmail.com wrote:
Shouldn't that be done as inline?
Sent from my iPhone
On Jan 31, 2016, at 12:22 PM, Panagiotis Skoulikaritis <pskoul@gmail.com> wrote:
Dear all
I have an implementation FreeSWITCH as a sort of SBC, it is used to send the calls to the terminating carriers and do topology hiding, nothing fancy. Also I gather cdrs from the FreeSWITCH.
In order to distinguish each customer on the FS cdrs I send an extra header containing the accountcode.
I have noticed that if the call is canceled immediately on the same sec, the account code is not written on the cdr. To be more precise the cancel is send a few milliseconds after it has received the invite, and before the FreeSWITCH has sent the call to the terminating carrier (I'm using Homer Sipcapture to capture all the traces and I don't see an attempt being made at the terminating carrier) also I don't see a b-leg cdr.
FreeSWITCH is writing both a-leg and b-leg cdrs in csv format.
The dialplan that I use is simple
<extension name="carrier-1"> <condition field="network_addr" expression="^(^xx\.xx\.xx\.xx|^yy\.yy\.yy\.yy)$"/> <condition field="destination_number" expression="^2#(\d+)$"> <action application="set" data="call_direction=outgoing"/> <action application="set" data="hangup_after_bridge=true"/> <action application="set" data="continue_on_fail=true"/> <action application="set" data="sip_cid_in_1xx=false"/> <action application="set" data="inherit_codec=true"/> <action application="set" data="accountcode=${sip_h_X-ACCOUNTCODE}"/> <action application="unset" data="sip_h_X-ACCOUNTCODE"/> <action application="set" data="execute_on_answer=sched_hangup +21600 alloted_timeout"/> <action application="bridge" data="sofia/external/4567$1@zz.zz.zz.zz:5070"/> </condition> </extension>
any idea how I can make sure that the account code will always be written ?
Best Regards
Panagiotis
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org