SIP not hanging up

I’m slowly integrating an Asterisk system into an Iwatsu ECS system over SIP extensions (to and from Iwatsu). Most of it is working except for a small hang up problem. The system is is connected PSTN <–> Iwatsu <–> Asterisk. Both Iwatsu and Asterisk have phones connected to them and I can dial extensions between the two systems. After hanging up on a phone on the Asterisk end the Iwatsu end doesn’t get a hang up signal and just holds the line forever this can be either from calling an extension or calling an outside line through Iwatsu. Any ideas?


Your best bet is to debug the SIP session, you should see a BYE from Asterisk when the call hangs up. It is most likely a problem with your other PBX if Asterisk is sending the correct SIP messages.

Ok I turned full debugging on and I found a few SIP “BYE” message:

[Apr 10 08:23:23] VERBOSE[2824] logger.c: — (12 headers 0 lines) —
[Apr 10 08:23:26] VERBOSE[2824] logger.c:
<— SIP read from —>
BYE sip:233@ SIP/2.0
Via: SIP/2.0/UDP;branch=z9hG4bKd3c98bfeFD594E5D
From: “602” sip:602@;tag=1B7A2266-85225B1F
To: sip:233@;user=phone;tag=as63beda70
CSeq: 3 BYE
Call-ID: f17cb9da-5969ab70-e13c6f99@
Contact: sip:602@
User-Agent: PolycomSoundPointIP-SPIP_301-UA/
Proxy-Authorization: Digest username=“602”, realm=“asterisk”, nonce=“2e13a7be”, uri=“sip:233@;user=phone”, response=“f8c36817159b95f42985053d6f80b280”, algorithm=MD5
Max-Forwards: 70
Content-Length: 0

I’m curious is this stating that a BYE was sent from 602@ to 233@ If so I don’t understand because 233@ does not exist…233@iwatsu does…

Then after I hung up the phone that wouldn’t hang up I got:

[Apr 10 08:26:05] VERBOSE[2824] logger.c: — (10 headers 10 lines) —
[Apr 10 08:26:05] VERBOSE[2824] logger.c:
<— Transmitting (no NAT) to —>
SIP/2.0 481 Call leg/transaction does not exist
Via: SIP/2.0/UDP;branch=z9hG4bK-461b9051-2a0ec4b2-5164;received=
From: sip:233@iwatsu;tag=301a8c0-13c4-461b8fb0-2a0c4dea-4c1b
To: "602"sip:602@;tag=as2b429e68
Call-ID: 6407329472d76cef7addba2f5e4bb968@
CSeq: 1 BYE
User-Agent: Asterisk PBX
Supported: replaces
Content-Length: 0

So it looks like the asterisk system does know to route the BYE signal to @iwatsu instead of itself…any ideas?