Hello, i have a problem with the hangup cause received from the AMI in the Hangup events. All calls that arent answered after ringing are returning hangup cause 16 (normal clearing) instead 19. Im running asterisk 1.4.11, the calls are generated to a SIP peer using the AMI originate command. This is the 'sip debug' output: Reliably Transmitting (no NAT) to 192.168.0.70:5060: INVITE sip:1 at 192.168.0.70:5060;user=phone;transport=udp SIP/2.0 Via: SIP/2.0/UDP 192.168.0.1:5060;branch=z9hG4bK286113b7;rport From: "123" <sip:123 at 192.168.0.1>;tag=as0cd1aab0 To: <sip:1 at 192.168.0.70:5060;user=phone;transport=udp> Contact: <sip:123 at 192.168.0.1> Call-ID: 3daa9e730e767bf932a9196a35200e36 at 192.168.0.1 CSeq: 102 INVITE User-Agent: Asterisk PBX Max-Forwards: 70 Date: Mon, 27 Aug 2007 05:53:34 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Content-Type: application/sdp Content-Length: 238 v=0 o=root 21676 21676 IN IP4 192.168.0.1 s=session c=IN IP4 192.168.0.1 t=0 0 m=audio 15274 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - - a=ptime:20 a=sendrecv --- gw*CLI> <--- SIP read from 192.168.0.70:5060 ---> SIP/2.0 100 Trying Via: SIP/2.0/UDP 192.168.0.1:5060;branch=z9hG4bK286113b7;rport From: "123" <sip:123 at 192.168.0.1>;tag=as0cd1aab0 To: <sip:1 at 192.168.0.70:5060;user=phone;transport=udp>;tag=2035093099 Call-ID: 3daa9e730e767bf932a9196a35200e36 at 192.168.0.1 CSeq: 102 INVITE Server: Cisco ATA 186 v3.2.1 atasip (050616A) Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, OPTIONS, REFER, REGISTER, PRACK, UPDATE Content-Length: 0 <-------------> --- (9 headers 0 lines) --- gw*CLI> <--- SIP read from 192.168.0.70:5060 ---> SIP/2.0 180 Ringing Via: SIP/2.0/UDP 192.168.0.1:5060;branch=z9hG4bK286113b7;rport From: "123" <sip:123 at 192.168.0.1>;tag=as0cd1aab0 To: <sip:1 at 192.168.0.70:5060;user=phone;transport=udp>;tag=2035093099 Call-ID: 3daa9e730e767bf932a9196a35200e36 at 192.168.0.1 CSeq: 102 INVITE Contact: 1 <sip:1 at 192.168.0.70:5060;user=phone;transport=udp> Server: Cisco ATA 186 v3.2.1 atasip (050616A) Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, OPTIONS, REFER, REGISTER, PRACK, UPDATE Content-Length: 0 <-------------> --- (10 headers 0 lines) --- Reliably Transmitting (no NAT) to 192.168.0.70:5060: OPTIONS sip:2 at 192.168.0.70:5060;user=phone;transport=udp SIP/2.0 Via: SIP/2.0/UDP 192.168.0.1:5060;branch=z9hG4bK49966ec7;rport From: "asterisk" <sip:asterisk at 192.168.0.1>;tag=as0916f4ed To: <sip:2 at 192.168.0.70:5060;user=phone;transport=udp> Contact: <sip:asterisk at 192.168.0.1> Call-ID: 04d899b45a7c51130dea88261b4db31a at 192.168.0.1 CSeq: 102 OPTIONS User-Agent: Asterisk PBX Max-Forwards: 70 Date: Mon, 27 Aug 2007 05:53:36 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Content-Length: 0 --- gw*CLI> <--- SIP read from 192.168.0.70:5060 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.0.1:5060;branch=z9hG4bK49966ec7;rport From: "asterisk" <sip:asterisk at 192.168.0.1>;tag=as0916f4ed To: <sip:2 at 192.168.0.70:5060;user=phone;transport=udp>;tag=3724167432 Call-ID: 04d899b45a7c51130dea88261b4db31a at 192.168.0.1 CSeq: 102 OPTIONS Server: Cisco ATA 186 v3.2.1 atasip (050616A) Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, OPTIONS, REFER, REGISTER, PRACK, UPDATE Supported: replaces Content-Length: 250 Content-Type: application/sdp v=0 o=2 19680158 19680158 IN IP4 192.168.0.70 s=ATA186 Call c=IN IP4 192.168.0.70 t=0 0 m=audio 16386 RTP/AVP 0 8 4 101 a=rtpmap:0 PCMU/8000/1 a=rtpmap:8 PCMA/8000/1 a=rtpmap:4 G723/8000/1 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 <-------------> --- (11 headers 11 lines) --- Really destroying SIP dialog '04d899b45a7c51130dea88261b4db31a at 192.168.0.1' Method: OPTIONS Reliably Transmitting (no NAT) to 192.168.0.70:5060: OPTIONS sip:1 at 192.168.0.70:5060;user=phone;transport=udp SIP/2.0 Via: SIP/2.0/UDP 192.168.0.1:5060;branch=z9hG4bK02be2790;rport From: "asterisk" <sip:asterisk at 192.168.0.1>;tag=as6ba5f9aa To: <sip:1 at 192.168.0.70:5060;user=phone;transport=udp> Contact: <sip:asterisk at 192.168.0.1> Call-ID: 1d2fdf042629f7ad54790ccc1002d60f at 192.168.0.1 CSeq: 102 OPTIONS User-Agent: Asterisk PBX Max-Forwards: 70 Date: Mon, 27 Aug 2007 05:53:36 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Content-Length: 0 --- gw*CLI> <--- SIP read from 192.168.0.70:5060 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.0.1:5060;branch=z9hG4bK02be2790;rport From: "asterisk" <sip:asterisk at 192.168.0.1>;tag=as6ba5f9aa To: <sip:1 at 192.168.0.70:5060;user=phone;transport=udp>;tag=2035093099 Call-ID: 1d2fdf042629f7ad54790ccc1002d60f at 192.168.0.1 CSeq: 102 OPTIONS Server: Cisco ATA 186 v3.2.1 atasip (050616A) Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, OPTIONS, REFER, REGISTER, PRACK, UPDATE Supported: replaces Content-Length: 250 Content-Type: application/sdp v=0 o=1 19680166 19680166 IN IP4 192.168.0.70 s=ATA186 Call c=IN IP4 192.168.0.70 t=0 0 m=audio 16384 RTP/AVP 0 8 4 101 a=rtpmap:0 PCMU/8000/1 a=rtpmap:8 PCMA/8000/1 a=rtpmap:4 G723/8000/1 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 <-------------> --- (11 headers 11 lines) --- Really destroying SIP dialog '1d2fdf042629f7ad54790ccc1002d60f at 192.168.0.1' Method: OPTIONS Scheduling destruction of SIP dialog '3daa9e730e767bf932a9196a35200e36 at 192.168.0.1' in 6400 ms (Method: INVITE) Reliably Transmitting (no NAT) to 192.168.0.70:5060: CANCEL sip:1 at 192.168.0.70:5060;user=phone;transport=udp SIP/2.0 Via: SIP/2.0/UDP 192.168.0.1:5060;branch=z9hG4bK286113b7;rport From: "123" <sip:123 at 192.168.0.1>;tag=as0cd1aab0 To: <sip:1 at 192.168.0.70:5060;user=phone;transport=udp> Call-ID: 3daa9e730e767bf932a9196a35200e36 at 192.168.0.1 CSeq: 102 CANCEL User-Agent: Asterisk PBX Max-Forwards: 70 Content-Length: 0 --- Scheduling destruction of SIP dialog '3daa9e730e767bf932a9196a35200e36 at 192.168.0.1' in 6400 ms (Method: INVITE) [Aug 27 02:53:44] NOTICE[21820]: pbx_spool.c:341 attempt_thread: Call failed to go through, reason (3) Remote end Ringing gw*CLI> <--- SIP read from 192.168.0.70:5060 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.0.1:5060;branch=z9hG4bK286113b7;rport From: "123" <sip:123 at 192.168.0.1>;tag=as0cd1aab0 To: <sip:1 at 192.168.0.70:5060;user=phone;transport=udp>;tag=2035093099 Call-ID: 3daa9e730e767bf932a9196a35200e36 at 192.168.0.1 CSeq: 102 CANCEL Server: Cisco ATA 186 v3.2.1 atasip (050616A) Supported: replaces Content-Length: 0 <-------------> --- (9 headers 0 lines) --- gw*CLI> <--- SIP read from 192.168.0.70:5060 ---> SIP/2.0 487 Request Cancelled Via: SIP/2.0/UDP 192.168.0.1:5060;branch=z9hG4bK286113b7;rport From: "123" <sip:123 at 192.168.0.1>;tag=as0cd1aab0 To: <sip:1 at 192.168.0.70:5060;user=phone;transport=udp>;tag=2035093099 Call-ID: 3daa9e730e767bf932a9196a35200e36 at 192.168.0.1 CSeq: 102 INVITE Server: Cisco ATA 186 v3.2.1 atasip (050616A) Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, OPTIONS, REFER, REGISTER, PRACK, UPDATE Content-Length: 0 <-------------> --- (9 headers 0 lines) --- Transmitting (no NAT) to 192.168.0.70:5060: ACK sip:1 at 192.168.0.70:5060;user=phone;transport=udp SIP/2.0 Via: SIP/2.0/UDP 192.168.0.1:5060;branch=z9hG4bK286113b7;rport From: "123" <sip:123 at 192.168.0.1>;tag=as0cd1aab0 To: <sip:1 at 192.168.0.70:5060;user=phone;transport=udp>;tag=2035093099 Contact: <sip:123 at 192.168.0.1> Call-ID: 3daa9e730e767bf932a9196a35200e36 at 192.168.0.1 CSeq: 102 ACK User-Agent: Asterisk PBX Max-Forwards: 70 Content-Length: 0 --- These are the events received from the AMI: Event: Newchannel Privilege: call,all Timestamp: 1188194254.782040 Channel: SIP/1-081d3ba0 State: Down CallerIDNum: <unknown> CallerIDName: <unknown> Uniqueid: 1188194254.9 Event: Newcallerid Privilege: call,all Timestamp: 1188194254.782548 Channel: SIP/1-081d3ba0 CallerID: 123 CallerIDName: 123 Uniqueid: 1188194254.9 CID-CallingPres: 0 (Presentation Allowed, Not Screened) Event: Newcallerid Privilege: call,all Timestamp: 1188194254.782694 Channel: SIP/1-081d3ba0 CallerID: 123 CallerIDName: 123 Uniqueid: 1188194254.9 CID-CallingPres: 0 (Presentation Allowed, Not Screened) Event: Newstate Privilege: call,all Timestamp: 1188194254.811535 Channel: SIP/1-081d3ba0 State: Ringing CallerID: 123 CallerIDName: 123 Uniqueid: 1188194254.9 Event: Hangup Privilege: call,all Timestamp: 1188194264.781755 Channel: SIP/1-081d3ba0 Uniqueid: 1188194254.9 Cause: 16 Cause-txt: Normal Clearing Thanks in advance, Francisco. ____________________________________________________________________________________ ?S? un mejor ambientalista! Encontr? consejos para cuidar el lugar donde vivimos en http://ar.yahoo.com/promos/mejorambientalista.html