[Freeswitch-users] setting channel variable sip_to_host or sip_to_uri for B leg

Neill Wilkinson neillw at aeonvista.com
Tue Sep 28 10:23:00 PDT 2010


All,

trying to set the to field on the B leg of the call from from FS toward the
phone:

<action application="export" data="sip_to_host=aeonvista.co.uk"/>

This seems to work - over-writing the From field in the B leg.
<action application="export" data="sip_from_uri=${sip_from_uri}"/>

For example in the dialplan I am doing:

     <extension name="vodafone_+441635698866">
<condition field="destination_number" expression="^(\+441635698866)$">
<action application="set" data="domain_name=aeonvista.co.uk"/>
<action application="set" data="domain=aeonvista.co.uk"/>
<action application="set" data="bypass_media=true"/>
<action application="export" data="sip_from_uri=${sip_from_uri}"/>
<action application="export" data="sip_to_host=aeonvista.co.uk"/>
<action application="bridge" data="sofia/aeonvista.co.uk/+441635698866" />
</condition>
    </extension>

The resulting SIP INVITE from FS to the B party looks like:

INVITE sip:+441635698866 at 192.168.0.15:2048;line=3sllxdbk SIP/2.0
Via: SIP/2.0/UDP 192.168.0.56;rport;branch=z9hG4bK5D3HQUQUa4XpF
Max-Forwards: 69
From: "+441635698863"
<sip:+441635698863 at aeonvista.co.uk<sip%3A%2B441635698863 at aeonvista.co.uk>
>;tag=Zy3U793m18aye
To: <sip:+441635698866 at 192.168.0.15:2048;line=3sllxdbk>
Call-ID: dc5311ea-45c1-122e-c586-000c290fc1a6
CSeq: 2509932 INVITE
Contact: <sip:mod_sofia at 192.168.0.56:5060>
User-Agent: FreeSWITCH-mod_sofia/1.0.head-svn-18355M
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER,
REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, precondition, path, replaces
Allow-Events: talk, hold, presence, dialog, line-seize, call-info, sla,
include-session-description, presence.winfo, message-summary, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 330
X-Serialnumber: 0004132CB2E5
P-Key-Flags: keys="3"
X-FS-Support: update_display
Remote-Party-ID: "+441635698863"
<sip:+441635698863 at 192.168.0.56<sip%3A%2B441635698863 at 192.168.0.56>
>;party=calling;screen=yes;privacy=off

<http://aeonvista.blogspot.com/>

Aeonvista Ltd <http://aeonvista.blogspot.com/>
*Opening Up New Ideas*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100928/77957079/attachment.html 


More information about the FreeSWITCH-users mailing list