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-
> 

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
      https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to