[Freeswitch-users] Manipulate the sip: string in the INVITE header on an outgoing Bridge
Vallimamod Abdullah
vma at vallimamod.org
Mon Jul 2 16:27:03 UTC 2018
Hi,
If I understand correctly your requirement:
- Asterisk is registered as asterisk at IP
- You want to send invites with sip-uri sip:DID at IP instead of the asterisk registration uri (sip:asterisk at IP)
Then, you can set the dial-string to the following:
<param name="dial-string" value="{^^:sip_invite_domain=${dialed_domain}}${regex(${sofia_contact(*/${dialed_user})}|^(.+)/sip:.+@(.+)|%1/sip:${sip_dialed_number}@%2)}"/>
So when you bridge with user/xxx, fsw will put the DID in the sip-uri and add a Route header sip asterisk reg uri for the next hop.
Hope this helps.
Best Regards,
--
Vallimamod Abdullah
SIP Solutions
vma at sip.solutions
linkedin.com/in/vallimamod
.
> On 1 Jul 2018, at 22:50, Joseph Waite <joelists at tm.net.uk> wrote:
>
> Hi Alex
>
> This doesn’t seem to do anything, or maybe it is just setting the To: field which I have already got set.
>
> The problem with the To field is that asterisk doesn’t look at this field without customisation which isn’t great for customer ease of use.
>
> Regards
>> On 29 Jun 2018, at 02:10, Alexey Sibyakin <alex at freeswitch.com> wrote:
>>
>> Hi,
>>
>> I'm not sure that I got your scenario right but you can try to do something like this:
>>
>> <action application="bridge" data="{sip_req_uri=$1}user/foobar"/> (you may need another var, full list is in Confluence)
>>
>> Regards,
>>
>> Alex
>>
>>
>>
>> On Wed, Jun 27, 2018 at 9:33 PM, Joseph Waite <joelists at tm.net.uk> wrote:
>> Hi Guys
>>
>> Were having issues with Asterisk boxes registering to a trunk on our FreeSwitch box.
>>
>> We are sending the DID number called down the trunk in the to: field, however Asterisk doesn’t seem to like this.
>>
>> Is there anyway to manipulate the INVITE to be INVITE sip:DID@ instead of what is currently INVITE sip:user@
>>
>> Im hoping there is something like sip_invite_to_uri, however google is failing me.
>>
>> Regards
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Services
>> 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
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> https://freeswitch.com
>>
>>
>>
>> --
>> Alex Sibyakin | Support Engineer
>> FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045
>> Email: alex at freeswitch.com
>> Website: https://www.FreeSWITCH.com
>> Need commercial support? Contact sales at freeswitch.com for details.
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Services
>> 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
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> https://freeswitch.com
>
> _________________________________________________________________________
> Professional FreeSWITCH Services
> 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
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> https://freeswitch.com
More information about the FreeSWITCH-users
mailing list