[Freeswitch-users] Getting destination number

Michael Jerris mike at jerris.com
Wed Sep 7 20:57:52 MSD 2016


If this is to a registered trunk, and they include the tags we use in the registered contact, we will properly detect this, and use the to user instead of the request user.  This allows you to register once for multiple DID’s.  Otherwise what the provider is doing here is weird and pretty non standard, and you would need to handle it manually in the dial plan looking at the sip_to_user var.

Mike

> On Sep 7, 2016, at 11:38 AM, Allan Kristensen <ak at hejdu.dk> wrote:
> 
> Hello,
> 
> I've just setup a sip trunk with a new provider, however there are some issues receiving calls.
> 
> The INVITE looks like this:
> 
>    INVITE sip:NCdWXsdSsaF2B at 192.168.0.190:52284 <http://sip:NCdWXsdSsaF2B@192.168.0.190:52284/> SIP/2.0
>    ....
>    From: <sip:+XXXXXXXXXX at x.x.x.x>;tag=Ud8ghaXg01821203
>    To: <sip:+YYYYYYYYYY at x.x.x.x>
>    ...
> 
> The invite has my account name, instead of the destination number and the real destination number is in the "To:" field (which it normally is I guess ;-)
> 
> Then Freeswitch does this of cause:
> 
> [INFO] mod_dialplan_xml.c:637 Processing +XXXXXXXXXX <+XXXXXXXXXX>->NCdWXsdSsaF2B in context inbound
> 
> That is undesirable, so Is there any way for Freeswitch to grab the destination number from the to field instead of the INVITE string ?
> I could make a special sip profile for that provider with it's own dialplan and then set destination_number from the "sip_to_user" variable and transfer to the real dialplan, but it just seems so messy...
> Or is it my provider that is doing it wrong?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160907/1e528d83/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list