[Freeswitch-users] How to set invite domain on a sofia bridge?
Shaun Stokes
shaun.stokes at itec-support.co.uk
Fri Sep 21 15:29:08 UTC 2018
We figured this out looking a previous thread with Ken, just need to set the fs_path on the bridge then we can modify the domain.
Source:
In FreeSWITCH if you want to send it to a proxy see fs_path… example <action application=”bridge” data=”sofia/profile/someuser at somedom.com;fs_path=the.proxy<mailto:sofia/profile/someuser at somedom.com;fs_path=the.proxy>”/>
________________________________
From: Shaun Stokes
Sent: 21 September 2018 15:56:32
To: FreeSWITCH Users Help
Subject: How to set invite domain on a sofia bridge?
Hi All,
Freeswitch 1.8.1
Using sofia bridge inside a LUA script trying to set the domain on the INVITE to look like this:
INVITE sip:220 at mydomain.com:5060 SIP/2.0
Instead our invite looks like this:
INVITE sip:220 at 127.0.0.111:5060 SIP/2.0
We've tried setting various variables for domain\host, as follows:
domain_name = "mydomain.com";
session:execute("bridge_export","sip_invite_domain="..domain_name);
session:execute("bridge_export","domain_name="..domain_name);
session:execute("bridge_export","sip_from_host="..domain_name);
session:execute("bridge_export","sip_req_host="..domain_name);
session:execute("bridge_export","sip_to_host="..domain_name);
session:execute("bridge_export","sip_contact_host="..domain_name);
session:execute("bridge_export","sip_via_host="..domain_name);
session:execute("bridge", "sofia/internal/sip:"..dialed_extension.."@127.0.0.111:5060^"..dialed_extension.."@"..domain_name");
Tried putting the above exported variables inside the bridge using {}, like so:
session:execute("bridge", "{sip_invite_domain="..domain_name..",domain_name="..domain_name.."...etc...}sofia/internal/sip:"..dialed_extension.."@127.0.0.111:5060^"..dialed_extension.."@"..domain_name");
Tried with-out overriding the To header, like so:
session:execute("bridge", "sofia/local_internal/sip:"..dialed_extension.."@127.0.0.111:5060);
How do we set the invite domain on a bridge? Hope someone here can help.
Thanks,
Shaun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180921/1d6ab59c/attachment-0001.html>
More information about the FreeSWITCH-users
mailing list