<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. 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. 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. I need to see your original gateway XML. 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> BYE<span class="Apple-converted-space"> </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"> </span>SIP/2.0<br> Via: SIP/2.0/UDP 216.57.23.143;rport;branch=z9hG4bKNa693jZ8SD54D<br> Max-Forwards: 70<br> From: <<a href="sip:2675379325@216.57.23.143">sip:2675379325@216.57.23.143</a>>;tag=r4yBmtX3U0Hrr<br> To:<span class="Apple-converted-space"> </span><br><<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> Call-ID: CEB9027F@Broadview1<br> CSeq: 106588607 BYE<br> Contact: <<a href="sip:mod_sofia@216.57.23.143:5060;transport=udp">sip:mod_sofia@216.57.23.143:5060;transport=udp</a>><br> User-Agent: FreeSWITCH-mod_sofia/1.0.1-9171<br> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE,<span class="Apple-converted-space"> </span><br>NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH<br> Supported: 100rel, timer, precondition, path, replaces<br> Reason: Q.850;cause=16;text="NORMAL_CLEARING"<br> 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> SIP/2.0 401 Unauthorized<br> Via: SIP/2.0/UDP<span class="Apple-converted-space"> </span><br>216.57.23.143;received=216.57.23.143;branch=z9hG4bKNa693jZ8SD54D;rport=5060<br> From: <<a href="sip:2675379325@216.57.23.143">sip:2675379325@216.57.23.143</a>>;tag=r4yBmtX3U0Hrr<br> To:<span class="Apple-converted-space"> </span><br><<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> Call-ID: CEB9027F@Broadview1<br> CSeq: 106588607 BYE<br> WWW-Authenticate: Digest<span class="Apple-converted-space"> </span><br>realm="SipLocal",nonce="3e952db60fb8",stale=false,algorithm=MD5,qop="auth"<br> Server: DC-SIP/2.0<br> Organization:<br> Supported: 100rel<br> Content-Length: 0<br><br><br>------------------------------------------------------------------------<br><br>Right after receiving the 401 Unauthorized message from Metaswitch,<span class="Apple-converted-space"> </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"> </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"> </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"> </span><br>gave me a packet trace for an Aastra PBX/softswitch, and it had the same<span class="Apple-converted-space"> </span><br>interaction, but immediately upon receiving the 401 Unauthorized from<span class="Apple-converted-space"> </span><br>Metaswitch, the Aastra machine then sent a second BYE, this time with<span class="Apple-converted-space"> </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>