[Freeswitch-users] How to set invite domain on a sofia bridge?

Shaun Stokes shaun.stokes at itec-support.co.uk
Wed Sep 26 07:04:54 UTC 2018


I've not tested 'fs_path' on a gateway, if you're using a gateway which is configured on FreeSWITCH then I believe you can specify the domain and IP address (proxy) in the gateway config. You should only need to use 'fs_path' when attempting to bridge directly with the destination with-out going through either a gateway or user configured on FreeSWITCH.
________________________________
From: FreeSWITCH-users <freeswitch-users-bounces at lists.freeswitch.org> on behalf of Serge S.Yuriev <me at nevian.org>
Sent: 22 September 2018 07:06:23
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] How to set invite domain on a sofia bridge?

Hi

Is this compatible with gateway and distributor? We have pool of "proxies" (gws) to terminate to.
Also can we set from-domain per gw config?

--
Wbr, Serge via mobile

21.09.2018, 21:41, "Shaun Stokes" <shaun.stokes at itec-support.co.uk>:

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<mailto:220 at mydomain.com>:5060 SIP/2.0

Instead our invite looks like this:
INVITE sip:220 at 127.0.0.111<mailto: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



_________________________________________________________________________
Professional FreeSWITCH Services
sales at freeswitch.com<mailto:sales at freeswitch.com>
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org<mailto:FreeSWITCH-users at lists.freeswitch.org>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180926/19b1fea5/attachment-0001.html>


More information about the FreeSWITCH-users mailing list