<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">They really shouldn't be challenging the bye like that because not every device can answer the challenge properly. &nbsp;Either case it doesn't matter if you have a proper domain 206.57.23.143 in your user directory with the proper user and realm set to meet this challenge. &nbsp; We have a setting in FreeSWITCH to auth all packets and when we did that we found out that some devices just do not work properly when doing that. &nbsp;I need to see your original gateway XML. &nbsp;You can email it off list if you like and let me try to solve this.<div><br></div><div>/b</div><div><br><div><div>On Oct 30, 2008, at 7:52 PM, Wellie Chao wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; ">Here is the BYE from Freeswitch to Metaswitch:<br><br>send 683 bytes to udp/[64.115.128.6]:5060 at 00:44:46.607025:<br><br>------------------------------------------------------------------------<br>&nbsp;&nbsp;&nbsp;BYE<span class="Apple-converted-space">&nbsp;</span><a href="sip:9172388084@64.115.128.6:5060;transport=udp">sip:9172388084@64.115.128.6:5060;transport=udp</a><span class="Apple-converted-space">&nbsp;</span>SIP/2.0<br>&nbsp;&nbsp;&nbsp;Via: SIP/2.0/UDP 216.57.23.143;rport;branch=z9hG4bKNa693jZ8SD54D<br>&nbsp;&nbsp;&nbsp;Max-Forwards: 70<br>&nbsp;&nbsp;&nbsp;From: &lt;<a href="sip:2675379325@216.57.23.143">sip:2675379325@216.57.23.143</a>>;tag=r4yBmtX3U0Hrr<br>&nbsp;&nbsp;&nbsp;To:<span class="Apple-converted-space">&nbsp;</span><br>&lt;<a href="sip:9172388084@64.115.128.6:5060;transport=udp">sip:9172388084@64.115.128.6:5060;transport=udp</a>>;tag=Broadview1+1+25f76f+cc3ba534<br>&nbsp;&nbsp;&nbsp;Call-ID: CEB9027F@Broadview1<br>&nbsp;&nbsp;&nbsp;CSeq: 106588607 BYE<br>&nbsp;&nbsp;&nbsp;Contact: &lt;<a href="sip:mod_sofia@216.57.23.143:5060;transport=udp">sip:mod_sofia@216.57.23.143:5060;transport=udp</a>><br>&nbsp;&nbsp;&nbsp;User-Agent: FreeSWITCH-mod_sofia/1.0.1-9171<br>&nbsp;&nbsp;&nbsp;Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE,<span class="Apple-converted-space">&nbsp;</span><br>NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH<br>&nbsp;&nbsp;&nbsp;Supported: 100rel, timer, precondition, path, replaces<br>&nbsp;&nbsp;&nbsp;Reason: Q.850;cause=16;text="NORMAL_CLEARING"<br>&nbsp;&nbsp;&nbsp;Content-Length: 0<br><br><br>------------------------------------------------------------------------<br><br>Metaswitch is not so happy with the BYE message:<br><br>recv 491 bytes from udp/[64.115.128.6]:5060 at 00:44:46.630445:<br><br>------------------------------------------------------------------------<br>&nbsp;&nbsp;&nbsp;SIP/2.0 401 Unauthorized<br>&nbsp;&nbsp;&nbsp;Via: SIP/2.0/UDP<span class="Apple-converted-space">&nbsp;</span><br>216.57.23.143;received=216.57.23.143;branch=z9hG4bKNa693jZ8SD54D;rport=5060<br>&nbsp;&nbsp;&nbsp;From: &lt;<a href="sip:2675379325@216.57.23.143">sip:2675379325@216.57.23.143</a>>;tag=r4yBmtX3U0Hrr<br>&nbsp;&nbsp;&nbsp;To:<span class="Apple-converted-space">&nbsp;</span><br>&lt;<a href="sip:9172388084@64.115.128.6:5060;transport=udp">sip:9172388084@64.115.128.6:5060;transport=udp</a>>;tag=Broadview1+1+25f76f+cc3ba534<br>&nbsp;&nbsp;&nbsp;Call-ID: CEB9027F@Broadview1<br>&nbsp;&nbsp;&nbsp;CSeq: 106588607 BYE<br>&nbsp;&nbsp;&nbsp;WWW-Authenticate: Digest<span class="Apple-converted-space">&nbsp;</span><br>realm="SipLocal",nonce="3e952db60fb8",stale=false,algorithm=MD5,qop="auth"<br>&nbsp;&nbsp;&nbsp;Server: DC-SIP/2.0<br>&nbsp;&nbsp;&nbsp;Organization:<br>&nbsp;&nbsp;&nbsp;Supported: 100rel<br>&nbsp;&nbsp;&nbsp;Content-Length: 0<br><br><br>------------------------------------------------------------------------<br><br>Right after receiving the 401 Unauthorized message from Metaswitch,<span class="Apple-converted-space">&nbsp;</span><br>Freeswitch emits the following error on the console:<br><br>2008-10-30 20:44:46 [ERR] sofia_reg.c:1089<span class="Apple-converted-space">&nbsp;</span><br>sofia_reg_handle_sip_r_challenge() No Matching gateway found<br><br>At this point, the caller (the endpoint connected to Metaswitch) just<span class="Apple-converted-space">&nbsp;</span><br>remains on the line, never having received the BYE.<br><br>Did you take a look at the packet traces I captured? The carrier<span class="Apple-converted-space">&nbsp;</span><br>gave me a packet trace for an Aastra PBX/softswitch, and it had the same<span class="Apple-converted-space">&nbsp;</span><br>interaction, but immediately upon receiving the 401 Unauthorized from<span class="Apple-converted-space">&nbsp;</span><br>Metaswitch, the Aastra machine then sent a second BYE, this time with<span class="Apple-converted-space">&nbsp;</span><br>authentication. Is there some way I can tell Freeswitch to do the same?<br><br>Regards,<br>Wellie</span></blockquote></div><br></div></body></html>