[asterisk-users] To Header instead of Request URI based routing

Max Grobecker max.grobecker at ml.grobecker.info
Fri Dec 22 15:00:43 CST 2017


Hi,

do you have access to the system that sends you these calls?
If it's also an Asterisk, you could tell it to send another INVITE URI, regardless of what is submitted
in the registration.

On Asterisk with chan_sip you can do it by dialling:

 Dial(SIP/your_peer/+49202thatgoesinthetouri!+49202thatgoesintheinviteuri)

That is, as said, if the remote system which is sending you the calls is an Asterisk machine so you can
just reconfigure the way you get the calls to your local machine.

If it's not your system, you need to parse the To: header - for example, with:

 Set(ToHeaderVal=${SIP_HEADER(To)})
 Set(DailedNumber=${CUT(ToHeaderVal,:,2)})
 Set(DailedNumber=${CUT(DailedNumber,@,1)})

That should give you the dialed number in Variable "DialedNumber".


Greetings
 Max




Am 22.12.2017 um 14:54 schrieb Benoit Panizzon:
> Dear List
> 
> It looks like the common way to to sip signaling over a trunk is:
> 
> In the Request URI, return the 'Register' Contact.
> In the To: Header, send the destination number.
> 
> Unfortunately, asterisk with pjsip (i did not try chan_sip) does
> expect the dialed extension as request uri and does ignore what it is
> getting in the To: header.
> 
> I could not find any hint in the documentation of this can be changed.
> 
> I found instructions for a work-around:
> 
> http://www.kempgen.net/voip/sip-request-uri-vs-to-header-routing.html
> 
> In the meantime: Is there a way to tell the asterisk with pjsip to use
> the To: header to address an extension?
> 
> Kind regards
> 
> -Benoît Panizzon-
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20171222/1cec587c/attachment.pgp>


More information about the asterisk-users mailing list