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

Grant Bagdasarian GB at cm.nl
Fri Aug 30 09:44:47 MSD 2013


Anyone have an idea how to do this?

From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Grant Bagdasarian
Sent: Wednesday, August 28, 2013 3:03 PM
To: FreeSWITCH Users Help (freeswitch-users at lists.freeswitch.org)
Subject: [Freeswitch-users] Get B-Leg Call-ID from Dialplan

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/20130830/d23a031a/attachment.html 


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