[Freeswitch-users] problem setting request uri params when bridging a call

Dave Horton dave at dchorton.com
Sun Apr 10 08:25:30 MSD 2011


I'm relatively new to FS, so apologies if I'm missing something obvious..

I want to bridge an incoming call on the internal profile and have it go out to a configured gateway through the external profile, and I want any request-uri parameters that come in on the A leg to be also contained on the request-uri for the B leg.  My first attempt at doing that was to create this dialplan in the public context:

<extension name="epB" >
   <condition field="${sofia_profile_name}" expression="internal">
       <action application="set" data="export_vars=sip_req_params"/>
      <action application="bridge" data="sofia/gateway/gwB/${destination_number}"/>
   </condition>
</extension>

This did not work -- the INVITE went out from the external sip profile without the parameters that came in on the received INVITE.  The log messages did however indicate that the parameters were being exported:

EXECUTE sofia/internal/5684935846 at 204.215.65.202 set(export_vars=sip_req_params)
2011-04-10 00:17:07.350172 [DEBUG] mod_dptools.c:1059 sofia/internal/5684935846 at 204.215.65.202 SET [export_vars]=[sip_req_params]
EXECUTE sofia/internal/5684935846 at 204.215.65.202 bridge(sofia/gateway/gwB/15086160900)
2011-04-10 00:17:07.350172 [DEBUG] switch_channel.c:918 sofia/internal/5684935846 at 204.215.65.202 EXPORTING[export_vars] [sip_req_params]=[target=pcs_voip_originate] to event
2011-04-10 00:17:07.350172 [NOTICE] switch_channel.c:812 New Channel sofia/external/15086160900 [674ec775-befb-4b19-8e02-3b1f4159e1d6]

However, if I put them in as dial string variables, it works:

<extension name="epB" >
   <condition field="${sofia_profile_name}" expression="internal">
      <action application="bridge" data="{sip_invite_params=${sip_req_params}}sofia/gateway/gwB/${destination_number}"/>
   </condition>
</extension>

Shouldn't I be able to use the 'set' application and 'export_vars' to get variables from the A leg to be passed to the B leg and to be incorporated appropriately into the B leg INVITE?

(I am running a recent head build:  FreeSWITCH-mod_sofia/1.0.head-git-244fd68 2011-03-21 14-27-57 -0400)

Thanks in advance.

Dave


More information about the FreeSWITCH-users mailing list