Tobias Wolf
2005-Jun-15 04:13 UTC
[Asterisk-Users] SIP call doesn't execute the 's'-extension
Hi, i have just started to configure access to the * over SIP-Phones. Therefore I have defined this SIP-Phone in sip.conf: [tobias] type=friend username=tobias secret=tobias auth=md5 host=dynamic reinvite=no dtmfmode=inband callerid="Tobias" <1087006> allow=all context=javaAgi dtmfmode=rfc2833 As you can see i am directing calls from this user to the context [javaAgi] which is defined here in extension.conf: [javaAgi] exten => s,1,Answer() exten => s,2,Playback(code1000) exten => s,3,Hangup() exten => 1,1,Answer() exten => 1,2,Playback(code1000) exten => 1,3,Hangup() If i dial 1 on my SIP Phone everything works as suspected, the call is answered and the gsm-file is played. My understanding of the 's'-extension is, that it is executed then a call comes in an there is no extension wich matches the called number. But if i dial a random number i get an "404 Not found" error. Here is an snippet of what * tells me on sip debug, but i can't get a clue out of it: 12 headers, 13 lines Using latest request as basis request Sending to 10.3.4.98 : 5060 (non-NAT) Found RTP audio format 0 Found RTP audio format 8 Found RTP audio format 3 Found RTP audio format 98 Found RTP audio format 97 Found RTP audio format 101 Peer audio RTP is at port 10.3.4.98:8000 Found description format pcmu Found description format pcma Found description format gsm Found description format iLBC Found description format speex Found description format telephone-event Capabilities: us - 0x8000e(GSM|ULAW|ALAW|H263), peer - audio=0x60e(GSM|ULAW|ALAW|SPEEX|ILBC)/video=0x0(EMPTY), combined - 0xe(GSM|ULAW|ALAW) Non-codec capabilities: us - 0x1(G723), peer - 0x1(G723), combined - 0x1(G723) Found user 'tobias' Looking for 2 in javaAgi Reliably Transmitting (no NAT): SIP/2.0 404 Not Found Via: SIP/2.0/UDP 10.3.4.98:5060;branch=z9hG4bK102F7CD4855F4C4E927C3398E3C57BF4 From: Tobias <sip:tobias@10.3.1.6>;tag=2760968676 To: <sip:2@10.3.1.6>;tag=as396962de Call-ID: 79A5523F-AFCA-4DBE-9AA2-F51377E8B5AE@10.3.4.98 CSeq: 58303 INVITE User-Agent: evision PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER Contact: <sip:2@10.3.1.6> Content-Length: 0 Perhaps anyone can point me to the right direction ?? Tobias
Rich Adamson
2005-Jun-15 06:06 UTC
[Asterisk-Users] SIP call doesn't execute the 's'-extension
> i have just started to configure access to the * over SIP-Phones. > Therefore I have defined this SIP-Phone in sip.conf: > > [tobias] > type=friend > username=tobias > secret=tobias > auth=md5 > host=dynamic > reinvite=no > dtmfmode=inband > callerid="Tobias" <1087006> > allow=all > context=javaAgi > dtmfmode=rfc2833 > > > As you can see i am directing calls from this user to the context > [javaAgi] which is defined here in extension.conf: > > [javaAgi] > exten => s,1,Answer() > exten => s,2,Playback(code1000) > exten => s,3,Hangup() > exten => 1,1,Answer() > exten => 1,2,Playback(code1000) > exten => 1,3,Hangup() > > If i dial 1 on my SIP Phone everything works as suspected, the call is > answered and the gsm-file is played. My understanding of the > 's'-extension is, that it is executed then a call comes in an there is > no extension wich matches the called number. But if i dial a random > number i get an "404 Not found" error.The "s" extension matches only when "no" digits are dialed. Dialing a "1" is a digit, so no match. Try playing around with exten=>_XXXX.,1,Answer() and understand what the differences are.
Chris Stinson
2005-Jun-15 08:09 UTC
[Asterisk-Users] SIP call doesn't execute the 's'-extension
You only have a 1 in the javaAgi context and you aren't point the javaAgi to any other contexts, pressing anyting else but 1 will get a not found error because you only have 1 defined. If you want the call to continue you need to send it to another context or add more to the javaAgi context. Tobias Wolf wrote:> Hi, > > i have just started to configure access to the * over SIP-Phones. > Therefore I have defined this SIP-Phone in sip.conf: > > [tobias] > type=friend > username=tobias > secret=tobias > auth=md5 > host=dynamic > reinvite=no > dtmfmode=inband > callerid="Tobias" <1087006> > allow=all > context=javaAgi > dtmfmode=rfc2833 > > > As you can see i am directing calls from this user to the context > [javaAgi] which is defined here in extension.conf: > > [javaAgi] > exten => s,1,Answer() > exten => s,2,Playback(code1000) > exten => s,3,Hangup() > exten => 1,1,Answer() > exten => 1,2,Playback(code1000) > exten => 1,3,Hangup() > > If i dial 1 on my SIP Phone everything works as suspected, the call is > answered and the gsm-file is played. My understanding of the > 's'-extension is, that it is executed then a call comes in an there is > no extension wich matches the called number. But if i dial a random > number i get an "404 Not found" error. > > Here is an snippet of what * tells me on sip debug, but i can't get a > clue out of it: > > > 12 headers, 13 lines > Using latest request as basis request > Sending to 10.3.4.98 : 5060 (non-NAT) > Found RTP audio format 0 > Found RTP audio format 8 > Found RTP audio format 3 > Found RTP audio format 98 > Found RTP audio format 97 > Found RTP audio format 101 > Peer audio RTP is at port 10.3.4.98:8000 > Found description format pcmu > Found description format pcma > Found description format gsm > Found description format iLBC > Found description format speex > Found description format telephone-event > Capabilities: us - 0x8000e(GSM|ULAW|ALAW|H263), peer - > audio=0x60e(GSM|ULAW|ALAW|SPEEX|ILBC)/video=0x0(EMPTY), combined - > 0xe(GSM|ULAW|ALAW) > Non-codec capabilities: us - 0x1(G723), peer - 0x1(G723), combined - > 0x1(G723) > Found user 'tobias' > Looking for 2 in javaAgi > Reliably Transmitting (no NAT): > SIP/2.0 404 Not Found > Via: SIP/2.0/UDP > 10.3.4.98:5060;branch=z9hG4bK102F7CD4855F4C4E927C3398E3C57BF4 > From: Tobias <sip:tobias@10.3.1.6>;tag=2760968676 > To: <sip:2@10.3.1.6>;tag=as396962de > Call-ID: 79A5523F-AFCA-4DBE-9AA2-F51377E8B5AE@10.3.4.98 > CSeq: 58303 INVITE > User-Agent: evision PBX > Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER > Contact: <sip:2@10.3.1.6> > Content-Length: 0 > > Perhaps anyone can point me to the right direction ?? > > Tobias > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-- ----- Chris Stinson Network Operations Center ISDN-Net, Inc. 615-221-4200 x103 noc@isdn.net