Re: [asterisk-users] how asterisk knows which context forward the call to?
I think you are correct, thank you for pointing it out. I just switch entries in sip.Cong put [pstn-9998] first' and [pstn-] second and the second entry was selected :-( (so you are right on). Audiocodes gateway, has two FXO ports, I was convinced that entry is selected based on registration context in [square-bracket] of sip.conf but it doesn't appear to be the case; the last registered entry is selected as default. Is it a limitation how SIP works or asterisk limitation? Is it possible to split registration into two different sip.conf files (sip1.conf and sip2.conf)? -- Joseph On 02/19/10 09:05, Ioan Indreias wrote: I hope I'm not wrong but I think the problem is related to the fact that on incoming calls Asterisk find the peers based on their IP and not on their IP+PORT. Thus, if you have several extensions on the same devices (= one single IP with different SIP ports), the last entry into your sip.conf file is taken into consideration = all calls are sent to the context of that last extension. You could check this if you configure a higher verbose/debug level (like more than 10) and check into the Asterisk logs the information displayed by chan_sip.c HTH, Ioan Indreias www.modulo.ro ### extract from: http://www.voip-info.org/tiki-index.php?page=Asterisk%20SIP%20Channels ### Incoming SIP Connections === When Asterisk receives an incoming SIP call, the SIP Channel Module + first tries to find a [user] section matching the caller name (From: username), + then tries to find a [peer] section matching the caller's IP address. + If no matching user or peer is found, the call is sent to the context defined in the [general] section of sip.conf. See: Asterisk SIP user vs peer ### On Fri, Feb 19, 2010 at 7:48 AM, Joseph syscon...@gmail.com wrote: Yes, it should but it doesn't. And the gurus at Audiocodes support can not explain why? -- Joseph On 02/18/10 19:27, C F wrote: It should use the context of the device On Wed, Feb 17, 2010 at 8:40 PM, Joseph syscon...@gmail.com wrote: Is there any asterisk guru who can explain me how how asterisk knows which context forward the call to? -- Joseph -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] how asterisk knows which context forward the call to?
It should use the context of the device On Wed, Feb 17, 2010 at 8:40 PM, Joseph syscon...@gmail.com wrote: Is there any asterisk guru who can explain me how how asterisk knows which context forward the call to? -- Joseph -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] how asterisk knows which context forward the call to?
Yes, it should but it doesn't. And the gurus at Audiocodes support can not explain why? -- Joseph On 02/18/10 19:27, C F wrote: It should use the context of the device On Wed, Feb 17, 2010 at 8:40 PM, Joseph syscon...@gmail.com wrote: Is there any asterisk guru who can explain me how how asterisk knows which context forward the call to? -- Joseph -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] how asterisk knows which context forward the call to?
I hope I'm not wrong but I think the problem is related to the fact that on incoming calls Asterisk find the peers based on their IP and not on their IP+PORT. Thus, if you have several extensions on the same devices (= one single IP with different SIP ports), the last entry into your sip.conf file is taken into consideration = all calls are sent to the context of that last extension. You could check this if you configure a higher verbose/debug level (like more than 10) and check into the Asterisk logs the information displayed by chan_sip.c HTH, Ioan Indreias www.modulo.ro ### extract from: http://www.voip-info.org/tiki-index.php?page=Asterisk%20SIP%20Channels ### Incoming SIP Connections === When Asterisk receives an incoming SIP call, the SIP Channel Module + first tries to find a [user] section matching the caller name (From: username), + then tries to find a [peer] section matching the caller's IP address. + If no matching user or peer is found, the call is sent to the context defined in the [general] section of sip.conf. See: Asterisk SIP user vs peer ### On Fri, Feb 19, 2010 at 7:48 AM, Joseph syscon...@gmail.com wrote: Yes, it should but it doesn't. And the gurus at Audiocodes support can not explain why? -- Joseph On 02/18/10 19:27, C F wrote: It should use the context of the device On Wed, Feb 17, 2010 at 8:40 PM, Joseph syscon...@gmail.com wrote: Is there any asterisk guru who can explain me how how asterisk knows which context forward the call to? -- Joseph -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] how asterisk knows which context forward the call to?
Your question is a little vague. I assume that you would be looking for the GoTo application. The syntax is explained here: http://www.voip-info.org/wiki/view/Asterisk+cmd+goto http://www.voip-info.org/wiki/view/Asterisk+cmd+gotoAlso, you can look on page 426 of the Asterisk book, which is really helpful if you're new to Asterisk. Download it for free from the publisher here: http://downloads.oreilly.com/books/9780596510480.pdf http://downloads.oreilly.com/books/9780596510480.pdfJohn Timms -- John Timms (864) 416-1809 johngtimms (at) gmail (dot) com -- IT Department - Gnoso Inc. john (at) gnoso (dot) com -- Grapedial- Affordable group phone messaging www.grapedial.com john (at) grapedial (dot) com -- On Wed, Feb 17, 2010 at 8:40 PM, Joseph syscon...@gmail.com wrote: Is there any asterisk guru who can explain me how how asterisk knows which context forward the call to? -- Joseph -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] how asterisk knows which context forward the call to?
Apology for not posting too much details. I'm trying to figure it out how the ATA adapter knows which context (from sip.conf) send the call to? I'm puzzled as I have never encounter this problem before. I have for example two ATA adapters (Linksys and Audiocodes) both register with asterisk per-port and both have FXS/FXO interfaces. In sip.conf [pstn-] ... context=incoming ... [pstn-9998] ... context=fax-incoming ... They both register with asterisk just fine. The cheaper one has only one FXO interface and send the call correctly to the interface it is registered to via sip.conf. The higher end ATA Audiocodes has two FXO interfaces and forwards the calls only to ONE context regardless of which interface the all come IN. I captured the traffic via tcpdump but I'm not sure how to recognized why and how to call is being forwarded incorrectly from Audiocodes gateway. From Audiocodes: ...a..INVITE sip:4...@10.10.0.2 SIP/2.0 Via: SIP/2.0/UDP 10.10.0.8;branch=z9hG4bKac445090997 Max-Forwards: 70 From: KMIEC Z sip:7804715...@10.10.0.8;tag=1c445087336 To: sip:4...@10.10.0.2 Call-ID: 445086899172201014...@10.10.0.8 CSeq: 1 INVITE Contact: sip:pstn-4...@10.10.0.8:5060 Supported: em,100rel,timer,replaces,path,early-session,resource-priority,sdp-anat Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE User-Agent: Audiocodes-Sip-Gateway-MP-114 FXS_FXO/v.5.60A.030.001 Content-Type: application/sdp Content-Disposition: session Content-Length: 249 v=0 o=AudiocodesGW 445081214 445081091 IN IP4 10.10.0.8 s=Phone-Call c=IN IP4 10.10.0.8 t=0 0 m=audio 6020 RTP/AVP 0 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=ptime:20 a=sendrecv 14:02:34.305631 IP (tos 0x0, ttl 64, id 37384, offset 0, flags [none], proto UDP (17), length 426) 10.10.0.2.5060 10.10.0.8.5060: [udp sum ok] UDP, length 398 e...@... .. ..SIP/2.0 100 Trying Via: SIP/2.0/UDP 10.10.0.8;branch=z9hG4bKac445090997;received=10.10.0.8 From: KMIEC Z sip:7804715...@10.10.0.8;tag=1c445087336 To: sip:4...@10.10.0.2 Call-ID: 445086899172201014...@10.10.0.8 CSeq: 1 INVITE User-Agent: Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Contact: sip:4...@10.10.0.2 Content-Length: 0 14:02:34.305950 IP (tos 0x0, ttl 64, id 37385, offset 0, flags [none], proto UDP (17), length 804) 10.10.0.2.5060 10.10.0.8.5060: [udp sum ok] UDP, length 776 E..$. @... .. .UINVITE sip:4...@10.10.0.8:5060 SIP/2.0 Via: SIP/2.0/UDP 10.10.0.2:5060;branch=z9hG4bK50dcf744;rport From: KMIEC Z sip:7804715...@10.10.0.2;tag=as6f0a71bb To: sip:4...@10.10.0.8:5060 Contact: sip:7804715...@10.10.0.2 Call-ID: 7e9a498f101e94e952bb286242c24...@10.10.0.2 CSeq: 102 INVITE User-Agent: Asterisk PBX Max-Forwards: 70 Date: Wed, 17 Feb 2010 21:02:34 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Content-Type: application/sdp Content-Length: 258 ... From Linksys: ..INVITE sip:4...@10.10.0.2 SIP/2.0 Via: SIP/2.0/UDP 10.10.0.6:5060;branch=z9hG4bK-a6fea026 From: KMIEC Z sip:7804715...@10.10.0.2;tag=3da21e945d4dbff6o1 To: sip:4...@10.10.0.2 Remote-Party-ID: KMIEC Z sip:7804715...@10.10.0.2;screen=yes;party=calling Call-ID: 83da216c-7c6dd...@10.10.0.6 CSeq: 101 INVITE Max-Forwards: 70 Contact: sip:7804715...@10.10.0.6:5060 Expires: 240 User-Agent: Linksys/SPA3102-5.1.7(GW) Content-Length: 434 Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER Supported: x-sipura, replaces Content-Type: application/sdp v=0 o=- 15099 15099 IN IP4 10.10.0.6 s=- c=IN IP4 10.10.0.6 t=0 0 m=audio 16410 RTP/AVP 0 2 4 8 18 96 97 98 100 101 a=rtpmap:0 PCMU/8000 a=rtpmap:2 G726-32/8000 a=rtpmap:4 G723/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:18 G729a/8000 a=rtpmap:96 G726-40/8000 a=rtpmap:97 G726-24/8000 a=rtpmap:98 G726-16/8000 a=rtpmap:100 NSE/8000 a=fmtp:100 192-193 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=ptime:30 a=sendrecv 16:00:12.666784 IP (tos 0x0, ttl 64, id 31864, offset 0, flags [none], proto UDP (17), length 432) 10.10.0.2.5060 10.10.0.6.5060: [udp sum ok] UDP, length 404 E...|x...@... .. ..SIP/2.0 100 Trying Via: SIP/2.0/UDP 10.10.0.6:5060;branch=z9hG4bK-a6fea026;received=10.10.0.6 From: KMIEC Z sip:7804715...@10.10.0.2;tag=3da21e945d4dbff6o1 To: sip:4...@10.10.0.2 Call-ID: 83da216c-7c6dd...@10.10.0.6 CSeq: 101 INVITE User-Agent: Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Contact: sip:4...@10.10.0.2 Content-Length: 0 16:00:12.667389 IP (tos 0x0, ttl 64, id 31865, offset 0, flags [none], proto UDP (17), length 732) 10.10.0.2.5060 10.10.0.6.5060: [udp sum ok] UDP, length 704 E...|y...@..| .. ..SIP/2.0 200 OK Via: SIP/2.0/UDP 10.10.0.6:5060;branch=z9hG4bK-a6fea026;received=10.10.0.6 From: KMIEC Z sip:7804715...@10.10.0.2;tag=3da21e945d4dbff6o1 To: sip:4...@10.10.0.2;tag=as2fdf6ea0 Call-ID:
Re: [asterisk-users] how asterisk knows which context forward the call to?
On Wed, Feb 17, 2010 at 8:59 PM, Joseph syscon...@gmail.com wrote: Apology for not posting too much details. I'm trying to figure it out how the ATA adapter knows which context (from sip.conf) send the call to? I'm puzzled as I have never encounter this problem before. I have for example two ATA adapters (Linksys and Audiocodes) both register with asterisk per-port and both have FXS/FXO interfaces. I haven't worked with Audiocodes before, but it looks like yours may be setup incorrectly. Verify the username you have setup in your Audiocodes matches what is setup in your sip.conf file? -- Thanks, --Warren Selby http://www.selbytech.com -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] how asterisk knows which context forward the call to?
On 02/17/10 21:09, Warren Selby wrote: On Wed, Feb 17, 2010 at 8:59 PM, Joseph syscon...@gmail.com wrote: Apology for not posting too much details. I'm trying to figure it out how the ATA adapter knows which context (from sip.conf) send the call to? I'm puzzled as I have never encounter this problem before. I have for example two ATA adapters (Linksys and Audiocodes) both register with asterisk per-port and both have FXS/FXO interfaces. I haven't worked with Audiocodes before, but it looks like yours may be setup incorrectly. Verify the username you have setup in your Audiocodes matches what is setup in your sip.conf file? -- Thanks, --Warren Selby http://www.selbytech.com The Audiocodes ATA gateway registers correctly (per-gateway) with asterisk, I double check the secret, if it didn't match port would not register. If one is using one incoming context, nobody will notice any difference but if you have different context per FXO port it is not working correctly. All calls are answered/forwarded to one context regardless of what you have in sip.conf. That is why I'm puzzled as I didn't expect to have this strange behavour with a high end gateway! Most of the companies that sell Audiocodes offer little support. Some offer support but have no knowledge of Asterisk so they don't support it. -- Joseph -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users