[Freeswitch-users] extra header account code is not written to cdr if cancel is received a few ms after invite

Panagiotis Skoulikaritis pskoul at gmail.com
Sun Feb 7 23:00:26 MSK 2016


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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
> 



Join us at ClueCon 2014 Aug 4-7, 2014
More information about the FreeSWITCH-users mailing list