Nick Awesome
2014-Sep-02 06:47 UTC
[asterisk-users] PJSIP issues with handling incoming calls
Hello guys. Have 2 external numbers that required registration on provider server, trunk1: 73432260005 at 80.75.132.66 trunk2: 73432260050 at 80.75.132.66 Thing is I can?t figure out how to route them to different IVRs by default Asterisk can?t match endpoint Request from '<sip:+ 73432260005 at 80.75.132.66>' failed for '80.75.132.66:5060' (callid: 50e9132765782741404408k2469rmwp) - No matching endpoint found Can?t set identify by IP because they got the same ip. Is there way to configure asterisk so incoming calls from same IP but different ID will use different contexts? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140902/1dd18e4a/attachment.html>
Administrator TOOTAI
2014-Sep-02 07:35 UTC
[asterisk-users] PJSIP issues with handling incoming calls
Le 02/09/2014 08:47, Nick Awesome a ?crit :> Hello guys.Hi> > Have 2 external numbers that required registration on provider server, > > trunk1: 734322600*05*@80.75.132.66 > trunk2: 734322600*50*@80.75.132.66 > > Thing is I can?t figure out how to route them to different IVRs > > by default Asterisk can?t match endpoint > > Request from '<sip:+ 734322600*05*@80.75.132.66>' failed for > '80.75.132.66:5060' (callid: 50e9132765782741404408k2469rmwp) - No > matching endpoint found > > Can?t set /identify /by IP because they got the same ip. > > Is there way to configure asterisk so incoming calls from same IP but > different ID will use different contexts?You have to register to the gateway with each account user and password like sip.conf register = 734322600*05*:password1 at myProvider/734322600*05* register = 734322600*50*:password2 at myProvider/734322600*50* [myProvider] type=peer host=80.75.132.66 context=from-myProvider ... extensions.conf [from-myProvider] exten = 734322600*05*,1,NoOp(Incoming call to 734322600*05*) ... exten = 734322600*50*,1,NoOp(Incoming call to 734322600*50*) ...
Joshua Colp
2014-Sep-02 11:01 UTC
[asterisk-users] PJSIP issues with handling incoming calls
Nick Awesome wrote:> Hello guys.Kia ora,> Have 2 external numbers that required registration on provider server, > > trunk1: 734322600*05*@80.75.132.66 > trunk2: 734322600*50*@80.75.132.66 > > Thing is I can?t figure out how to route them to different IVRs > > by default Asterisk can?t match endpoint > > Request from '<sip:+ 734322600*05*@80.75.132.66>' failed for > '80.75.132.66:5060' (callid: 50e9132765782741404408k2469rmwp) - No > matching endpoint found > > Can?t set /identify /by IP because they got the same ip. > > Is there way to configure asterisk so incoming calls from same IP but > different ID will use different contexts?If the From header contains the destination number (as it seems to based on your above log message and config) you can create two different endpoints and match based on the user portion of the From header. [734322600*05*] type=endpoint context=did-1 disallow=all allow=ulaw [734322600*50*] type=endpoint context=did-2 disallow=all allow=ulaw If this is not correct then you can only match once based on the source IP address currently. Cheers, -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org
A J Stiles
2014-Sep-02 11:32 UTC
[asterisk-users] PJSIP issues with handling incoming calls
On Tuesday 02 Sep 2014, Nick Awesome wrote:> Hello guys. > > Have 2 external numbers that required registration on provider server, > > trunk1: 73432260005 at 80.75.132.66 > trunk2: 73432260050 at 80.75.132.66 > > Thing is I can?t figure out how to route them to different IVRs > > by default Asterisk can?t match endpoint > > Request from '<sip:+ 73432260005 at 80.75.132.66>' failed for > '80.75.132.66:5060' (callid: 50e9132765782741404408k2469rmwp) - No > matching endpoint found > > Can?t set identify by IP because they got the same ip. > > Is there way to configure asterisk so incoming calls from same IP but > different ID will use different contexts?Can't you send them both to the same context initially; but once you are there, match the outside number (which can be found in ${EXTEN} if it is the number that was dialled from their end, or ${CALLERID(num)} if it is the number they are calling from) within that context and use a GoToIf() to send calls from trunk 2 to the correct context? -- AJS Note: Originating address only accepts e-mail from list! If replying off- list, change address to asterisk1list at earthshod dot co dot uk .