[Freeswitch-users] Get B-Leg Call-ID from Dialplan

Grant Bagdasarian GB at cm.nl
Wed Aug 28 17:02:58 MSD 2013


Hello,

I'm using the below extension to export the A-Leg Call-ID to the B-Leg. The A-Leg  Call-ID is visible in the B-Leg INVITE as the header X-OCallID.

    <extension name="external_to_internal">
      <condition field="destination_number" expression="(\d+)$">
        <action application="set" data="hangup_after_bridge=false"/>
        <action application="set" data="continue_on_fail=true"/>
        <action application="export" data="sip_h_X-OCallID=${sip_call_id}" />
        <action application="bridge" data="sofia/internal/${destination_number}@$${sip_proxy_ip}:$${sip_proxy_port}"/>
      </condition>
    </extension>

Next to this, I also want to be able to append the Call-ID of the B-Leg to a custom header of the A-Leg.
The B-Leg Call-ID would be appended to a response message, like 100, 200 or 4xx, 5xx, 6xx.
Is this possible? If so, how? I took a look at using Lua hooks in lua.xml.conf, but I can't get the script to work.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130828/bac0be09/attachment.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list