<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:12pt;font-family:Arial">
<p>Hi all,</p>
<p></p>
<p>as in last mail, i've installed Asterisk from CVS and AMP to manage it. I've made 4 extensions:</p>
<p></p>
<p>moloch*CLI> sip show peers</p>
<p>Name/username Host Dyn Nat ACL Mask Port Status</p>
<p>204/204 (Unspecified) D 255.255.255.255 0 UNKNOWN</p>
<p>203/203 192.167.125.9 D 255.255.255.255 5062 OK (3 ms)</p>
<p>202/202 (Unspecified) D 255.255.255.255 0 UNKNOWN</p>
<p>201/201 192.167.125.12 D 255.255.255.255 5060 OK (3 ms)</p>
<p>moloch*CLI> </p>
<p></p>
<p>as you can see, 201 and 203 are on-line but, if i call from 203 to 201, i immediately go to voicemail instead of doing call to 201. Here's the SIP call flow:</p>
<p></p>
<p>moloch*CLI></p>
<p></p>
<p>Sip read:</p>
<p>INVITE sip:201@asb.unisi.it SIP/2.0</p>
<p>Via: SIP/2.0/UDP 192.167.125.9:5062;branch=z9hG4bK64FE3538</p>
<p>CSeq: 1114 INVITE</p>
<p>To: <sip:201@asb.unisi.it></p>
<p>Content-Type: application/sdp</p>
<p>From: "203" <sip:203@asb.unisi.it>;tag=1CE28F8</p>
<p>Call-ID: 1646594512@192.167.125.9</p>
<p>Subject: sip:203@asb.unisi.it</p>
<p>Content-Length: 187</p>
<p>User-Agent: kphone/4.0.5</p>
<p>Contact: "203" <sip:203@192.167.125.9:5062;transport=udp></p>
<p></p>
<p>v=0</p>
<p>o=username 0 0 IN IP4 192.167.125.9</p>
<p>s=The Funky Flow</p>
<p>c=IN IP4 192.167.125.9</p>
<p>t=0 0</p>
<p>m=audio 36808 RTP/AVP 0 97 3</p>
<p>a=rtpmap:0 PCMU/8000</p>
<p>a=rtpmap:3 GSM/8000</p>
<p>a=rtpmap:97 iLBC/8000</p>
<p></p>
<p>11 headers, 9 lines</p>
<p>Using latest request as basis request</p>
<p>Sending to 192.167.125.9 : 5062 (non-NAT)</p>
<p>Reliably Transmitting (no NAT):</p>
<p>SIP/2.0 407 Proxy Authentication Required</p>
<p>Via: SIP/2.0/UDP 192.167.125.9:5062;branch=z9hG4bK64FE3538</p>
<p>From: "203" <sip:203@asb.unisi.it>;tag=1CE28F8</p>
<p>To: <sip:201@asb.unisi.it>;tag=as3c1a1273</p>
<p>Call-ID: 1646594512@192.167.125.9</p>
<p>CSeq: 1114 INVITE</p>
<p>User-Agent: Asterisk PBX</p>
<p>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER</p>
<p>Contact: <sip:201@192.167.125.9></p>
<p>Proxy-Authenticate: Digest realm="asterisk", nonce="0ae53906"</p>
<p>Content-Length: 0</p>
<p></p>
<p></p>
<p> to 192.167.125.9:5062</p>
<p>Scheduling destruction of call '1646594512@192.167.125.9' in 15000 ms</p>
<p>Found user '203'</p>
<p>moloch*CLI></p>
<p></p>
<p>Sip read:</p>
<p>ACK sip:201@asb.unisi.it SIP/2.0</p>
<p>Via: SIP/2.0/UDP 192.167.125.9:5062;branch=z9hG4bK64FE3538</p>
<p>CSeq: 1114 ACK</p>
<p>To: <sip:201@asb.unisi.it>;tag=as3c1a1273</p>
<p>From: "203" <sip:203@asb.unisi.it>;tag=1CE28F8</p>
<p>Call-ID: 1646594512@192.167.125.9</p>
<p>Content-Length: 0</p>
<p>User-Agent: kphone/4.0.5</p>
<p>Contact: "203" <sip:203@192.167.125.9:5062;transport=udp></p>
<p></p>
<p></p>
<p>9 headers, 0 lines</p>
<p>moloch*CLI></p>
<p></p>
<p>Sip read:</p>
<p>INVITE sip:201@asb.unisi.it SIP/2.0</p>
<p>Via: SIP/2.0/UDP 192.167.125.9:5062;branch=z9hG4bK7602DA72</p>
<p>CSeq: 1115 INVITE</p>
<p>To: <sip:201@asb.unisi.it></p>
<p>Proxy-Authorization: Digest username="203", realm="asterisk", nonce="0ae53906", uri="sip:201@asb.unisi.it", cnonce="abcdefghi", nc=00000001, response="58e82c67b3c712ffb39220e473903007", opaque="", algorithm="MD5"</p>
<p>Content-Type: application/sdp</p>
<p>From: "203" <sip:203@asb.unisi.it>;tag=1CE28F8</p>
<p>Call-ID: 1646594512@192.167.125.9</p>
<p>Subject: sip:203@asb.unisi.it</p>
<p>Content-Length: 187</p>
<p>User-Agent: kphone/4.0.5</p>
<p>Contact: "203" <sip:203@192.167.125.9:5062;transport=udp></p>
<p></p>
<p>v=0</p>
<p>o=username 0 0 IN IP4 192.167.125.9</p>
<p>s=The Funky Flow</p>
<p>c=IN IP4 192.167.125.9</p>
<p>t=0 0</p>
<p>m=audio 36808 RTP/AVP 0 97 3</p>
<p>a=rtpmap:0 PCMU/8000</p>
<p>a=rtpmap:3 GSM/8000</p>
<p>a=rtpmap:97 iLBC/8000</p>
<p></p>
<p>12 headers, 9 lines</p>
<p>Using latest request as basis request</p>
<p>Sending to 192.167.125.9 : 5062 (non-NAT)</p>
<p>Found user '203'</p>
<p>Found RTP audio format 0</p>
<p>Found RTP audio format 97</p>
<p>Found RTP audio format 3</p>
<p>Peer audio RTP is at port 192.167.125.9:36808</p>
<p>Found description format PCMU</p>
<p>Found description format GSM</p>
<p>Found description format iLBC</p>
<p>Capabilities: us - 0xe (gsm|ulaw|alaw), peer - audio=0x406 (gsm|ulaw|ilbc)/video=0x0 (nothing), combined - 0x6 (gsm|ulaw)</p>
<p>Non-codec capabilities: us - 0x1 (g723), peer - 0x0 (nothing), combined - 0x0 (nothing)</p>
<p>Looking for 201 in from-internal</p>
<p>list_route: hop: <sip:203@192.167.125.9:5062;transport=udp></p>
<p>Transmitting (no NAT):</p>
<p>SIP/2.0 100 Trying</p>
<p>Via: SIP/2.0/UDP 192.167.125.9:5062;branch=z9hG4bK7602DA72</p>
<p>From: "203" <sip:203@asb.unisi.it>;tag=1CE28F8</p>
<p>To: <sip:201@asb.unisi.it></p>
<p>Call-ID: 1646594512@192.167.125.9</p>
<p>CSeq: 1115 INVITE</p>
<p>User-Agent: Asterisk PBX</p>
<p>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER</p>
<p>Contact: <sip:201@192.167.125.9></p>
<p>Content-Length: 0</p>
<p></p>
<p></p>
<p> to 192.167.125.9:5062</p>
<p> -- Executing Macro("SIP/203-f9ee", "exten-vm|201@default|201") in new stack</p>
<p> -- Executing SetVar("SIP/203-f9ee", "FROMCONTEXT=exten-vm") in new stack</p>
<p> -- Executing GotoIf("SIP/203-f9ee", "0?novm|1:3") in new stack</p>
<p> -- Goto (macro-exten-vm,s,3)</p>
<p> -- Executing GotoIf("SIP/203-f9ee", "0?novm|1") in new stack</p>
<p> -- Executing Macro("SIP/203-f9ee", "dial|30|tr|201") in new stack</p>
<p> -- Executing AGI("SIP/203-f9ee", "dialparties.agi") in new stack</p>
<p> -- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi</p>
<p> -- AGI Script dialparties.agi completed, returning 0</p>
<p> -- Executing Wait("SIP/203-f9ee", "1") in new stack</p>
<p> -- Executing VoiceMail("SIP/203-f9ee", "u201@default") in new stack</p>
<p>We're at 192.167.125.9 port 15724</p>
<p>Answering with preferred capability 0x4 (ulaw)</p>
<p>Answering with preferred capability 0x8 (alaw)</p>
<p>Answering with preferred capability 0x2 (gsm)</p>
<p>Reliably Transmitting (no NAT):</p>
<p>SIP/2.0 200 OK</p>
<p>Via: SIP/2.0/UDP 192.167.125.9:5062;branch=z9hG4bK7602DA72</p>
<p>From: "203" <sip:203@asb.unisi.it>;tag=1CE28F8</p>
<p>To: <sip:201@asb.unisi.it>;tag=as50e9a0f8</p>
<p>Call-ID: 1646594512@192.167.125.9</p>
<p>CSeq: 1115 INVITE</p>
<p>User-Agent: Asterisk PBX</p>
<p>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER</p>
<p>Contact: <sip:201@192.167.125.9></p>
<p>Content-Type: application/sdp</p>
<p>Content-Length: 209</p>
<p></p>
<p>v=0</p>
<p>o=root 29772 29772 IN IP4 192.167.125.9</p>
<p>s=session</p>
<p>c=IN IP4 192.167.125.9</p>
<p>t=0 0</p>
<p>m=audio 15724 RTP/AVP 0 8 3</p>
<p>a=rtpmap:0 PCMU/8000</p>
<p>a=rtpmap:8 PCMA/8000</p>
<p>a=rtpmap:3 GSM/8000</p>
<p>a=silenceSupp:off - - - -</p>
<p></p>
<p> to 192.167.125.9:5062</p>
<p>moloch*CLI></p>
<p></p>
<p>Sip read:</p>
<p>ACK sip:201@192.167.125.9 SIP/2.0</p>
<p>Via: SIP/2.0/UDP 192.167.125.9:5062;branch=z9hG4bK7602DA72</p>
<p>CSeq: 1115 ACK</p>
<p>To: <sip:201@asb.unisi.it>;tag=as50e9a0f8</p>
<p>From: "203" <sip:203@asb.unisi.it>;tag=1CE28F8</p>
<p>Call-ID: 1646594512@192.167.125.9</p>
<p>Content-Length: 0</p>
<p>User-Agent: kphone/4.0.5</p>
<p>Contact: "203" <sip:203@192.167.125.9:5062;transport=udp></p>
<p></p>
<p></p>
<p>9 headers, 0 lines</p>
<p> -- Playing 'vm-theperson' (language 'en')</p>
<p> -- Playing 'digits/2' (language 'en')</p>
<p> -- Playing 'digits/0' (language 'en')</p>
<p>moloch*CLI></p>
<p></p>
<p>Sip read:</p>
<p>BYE sip:201@192.167.125.9 SIP/2.0</p>
<p>Via: SIP/2.0/UDP 192.167.125.9:5062;branch=z9hG4bK6272BA5A</p>
<p>CSeq: 1116 BYE</p>
<p>To: <sip:201@asb.unisi.it>;tag=as50e9a0f8</p>
<p>From: "203" <sip:203@asb.unisi.it>;tag=1CE28F8</p>
<p>Call-ID: 1646594512@192.167.125.9</p>
<p>Content-Length: 0</p>
<p>User-Agent: kphone/4.0.5</p>
<p>Contact: "203" <sip:203@192.167.125.9:5062;transport=udp></p>
<p></p>
<p></p>
<p>9 headers, 0 lines</p>
<p>Sending to 192.167.125.9 : 5062 (non-NAT)</p>
<p>Transmitting (no NAT):</p>
<p>SIP/2.0 200 OK</p>
<p>Via: SIP/2.0/UDP 192.167.125.9:5062;branch=z9hG4bK6272BA5A</p>
<p>From: "203" <sip:203@asb.unisi.it>;tag=1CE28F8</p>
<p>To: <sip:201@asb.unisi.it>;tag=as50e9a0f8</p>
<p>Call-ID: 1646594512@192.167.125.9</p>
<p>CSeq: 1116 BYE</p>
<p>User-Agent: Asterisk PBX</p>
<p>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER</p>
<p>Contact: <sip:201@192.167.125.9></p>
<p>Content-Length: 0</p>
<p></p>
<p></p>
<p> to 192.167.125.9:5062</p>
<p> == Spawn extension (macro-exten-vm, s, 6) exited non-zero on 'SIP/203-f9ee' in macro 'exten-vm'</p>
<p> == Spawn extension (from-internal, 201, 1) exited non-zero on 'SIP/203-f9ee'</p>
<p> -- Executing Macro("SIP/203-f9ee", "hangupcall") in new stack</p>
<p> -- Executing ResetCDR("SIP/203-f9ee", "w") in new stack</p>
<p> -- Executing NoCDR("SIP/203-f9ee", "") in new stack</p>
<p> -- Executing Wait("SIP/203-f9ee", "5") in new stack</p>
<p> == Spawn extension (macro-hangupcall, s, 3) exited non-zero on 'SIP/203-f9ee' in macro 'hangupcall'</p>
<p> == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/203-f9ee'</p>
<p>moloch*CLI></p>
<p></p>
<p>and this is the extensions definitions:</p>
<p></p>
<p>[ext-local]</p>
<p>include => ext-local-custom</p>
<p>exten => 201,1,Macro(exten-vm,201@default,201)</p>
<p>exten => 202,1,Macro(exten-vm,202@default,202)</p>
<p>exten => 203,1,Macro(exten-vm,203@default,203)</p>
<p>exten => 204,1,Macro(exten-vm,204@default,204)</p>
<p></p>
<p>; Ring an extension, if the extension is busy or there is no answer send it</p>
<p>; to voicemail</p>
<p>; ARGS: $VMBOX, $EXT</p>
<p>[macro-exten-vm]</p>
<p>exten => s,1,Setvar(FROMCONTEXT=exten-vm)</p>
<p>exten => s,2,GotoIf($[${CHANNEL:0:5} = Local]?novm,1:3) ; if the channel is Local, then do not go to voicemail. This is $</p>
<p>exten => s,3,GotoIf($[${ARG1} = novm]?novm,1)</p>
<p>exten => s,4,Macro(dial,${RINGTIMER},${DIAL_OPTIONS},${ARG2})</p>
<p>exten => s,5,Wait(1)</p>
<p>exten => s,6,Voicemail(u${ARG1}) ; no answer to voicemail</p>
<p>exten => s,7,Macro(hangupcall)</p>
<p>exten => s,106,Wait(1)</p>
<p>exten => s,107,Voicemail(b${ARG1})</p>
<p>exten => o,1,Background(one-moment-please) ; 0 during vm message will hangup</p>
<p>exten => o,2,goto(from-pstn,s,1)</p>
<p>exten => a,1,Goto(app-directory,*411,1)</p>
<p>exten => a,2,Hangup</p>
<p>exten => novm,1,Macro(dial,120,${DIAL_OPTIONS},${ARG2})</p>
<p>exten => novm,2,Wait(1)</p>
<p>exten => novm,3,Playback(vm-nobodyavail)</p>
<p>exten => novm,4,Playback(allison7/pls-try-call-later)</p>
<p>exten => novm,5,Hangup</p>
<p></p>
<p>there's the extension definitions (the same for 201,202,203,204):</p>
<p></p>
<p>[20x]</p>
<p>username=20x</p>
<p>type=friend</p>
<p>seret=</p>
<p>qualify=200</p>
<p>port=5060</p>
<p>pickupgroup=</p>
<p>nat=never</p>
<p>mailbox=20x@default</p>
<p>host=dynamic</p>
<p>dtmfmode=rfc2833</p>
<p>disallow=</p>
<p>context=from-internal</p>
<p>canreinvite=no</p>
<p>callgroup=</p>
<p>callerid="djdjdj" <20x></p>
<p>allow=</p>
<p></p>
<p>Help !!!!!!!!!!!</p>
<p></p>
<p>-- </p>
<p>----</p>
<p>O-Zone ! No (C) 2005</p>
<p>www.zerozone.it</p>
</body></html>