<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7036.0">
<TITLE>SIP Channel hangup problem with re-INVITE enabled - ugrent</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi List</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I have UAs&nbsp; registered with Asterisk and make outbound calls via ITSP1, everything is fine without re-INVITE. When people call 178, the actual number 112233445566 at ITSP1 network will be called.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">When UA or called telephone (112233445566) hang up, the call and associated channels are cleared.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Sip.conf</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">[general]</FONT>

<BR><FONT SIZE=2 FACE="Arial">canreinvite=no</FONT>

<BR><FONT SIZE=2 FACE="Arial">nat=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">[ITSP1]</FONT>

<BR><FONT SIZE=2 FACE="Arial">type=peer</FONT>

<BR><FONT SIZE=2 FACE="Arial">host=A.B.C.D</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Extensions.conf</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">exten =&gt; 178,1,Answer()</FONT>

<BR><FONT SIZE=2 FACE="Arial">exten =&gt; 178,n,Dial(SIP/112233445566@ITSP1,60)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT>

<BR><FONT SIZE=2 FACE="Arial">exten =&gt; 178,n,Hangup()</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">However, when I enabled re-INVITE like below, the call still happen, people can talk with each other. If remote called telephone (112233445566) hang up, then the call is cleared. But if the Asterisk user (US) Softphone hang up first, the remote telephone still in talking mode (with no sound, of course).</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Sip.conf</FONT>

<BR><FONT SIZE=2 FACE="Arial">[ITSP1]</FONT>

<BR><FONT SIZE=2 FACE="Arial">type=peer</FONT>

<BR><FONT SIZE=2 FACE="Arial">host=A.B.C.D</FONT>

<BR><FONT SIZE=2 FACE="Arial">Canreinvite=yes</FONT>

<BR><FONT SIZE=2 FACE="Arial">Nat=yes</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">In this case, when Asterisk user hang up and remote phone still not hang up, I do show like this</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Show channel verbose</FONT>

<BR><FONT SIZE=2 FACE="Arial">0 active channels</FONT>

<BR><FONT SIZE=2 FACE="Arial">0 active calls</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">Sip show channels</FONT>

<BR><FONT SIZE=2 FACE="Arial">Peer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; User/ANR&nbsp;&nbsp;&nbsp; Call ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Seq (Tx/Rx)&nbsp; Form&nbsp; Hold&nbsp;&nbsp;&nbsp;&nbsp; Last Message&nbsp;&nbsp; </FONT>

<BR><FONT SIZE=2 FACE="Arial">A.B.C.D&nbsp;&nbsp;&nbsp; 112233445566&nbsp; 14448d41170&nbsp; 00103/00104&nbsp; unkn&nbsp; No&nbsp; (d)&nbsp; Rx: BYE&nbsp; </FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">CLI&gt; sip show channel 14448d41170ac3a66a41602575476d5f@W.X.Y.Z</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; * SIP Call</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; Direction:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Outgoing</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; Call-ID:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 14448d41170ac3a66a41602575476d5f@W.X.Y.Z</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; Our Codec Capability:&nbsp;&nbsp; 256</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; Non-Codec Capability:&nbsp;&nbsp; 1</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; Their Codec Capability:&nbsp;&nbsp; 256</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; Joint Codec Capability:&nbsp;&nbsp; 256</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; Format&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unknown</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; Theoretical Address:&nbsp;&nbsp;&nbsp; A.B.C.D:5060</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; Received Address:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A.B.C.D:5060</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; NAT Support:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Always</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; Audio IP:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; W.X.Y.Z(local)</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; Our Tag:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; as5436f254</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; Their Tag:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; caba969d04802f1091a1000000000000--558</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; SIP User agent:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Asterisk</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; Username:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 112233445566</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; Peername:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 112233445566</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; Original uri:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sip:112233445566@A.B.C.D:5060</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; Need Destroy:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; Last Message:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Rx: BYE</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; Promiscuous Redir:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; No</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; Route:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sip:112233445566@A.B.C.D:5060;transport=UDP</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; DTMF Mode:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rfc2833</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; SIP Options:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (none)</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">In this case, when Asterisk user hang up and remote phone still not hang up, there's still active SIP channel, which should be cleared when BYE received from any of peers.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">In Asterisk Console, I can see BYE from Asterisk user (UA Softphone) to Asterisk and OK from Asterisk to UA. But Asterisk DO NOT send BYE to ITSP1, which is wrong?</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Pls. advice</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Brgds</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Hoa</FONT>
</P>
<BR>
<BR>
<BR>

</BODY>
</HTML>