<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'>Kamailio 3.1.2<div>Here is my setup:</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-tab-span" style="white-space:pre">                </span> <span class="Apple-style-span" style="white-space: normal;">Phone1 (10.10.1.114)</span></span></div><div><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="white-space: normal;"> <span class="Apple-tab-span" style="white-space:pre">        </span> |</span></span></div><div><span class="Apple-tab-span" style="white-space:pre">                </span> Kamailio (10.10.1.230)</div><div> / \</div><div> / \</div><div> Freeswitch1 Freeswitch2 ----------------------> Other phones</div><div>(10.10.1.222) (10.10.1.223)</div><div><br></div><div>Both Freeswitch's share the same REGISTRATION information. Phone1 is already registered with Freeswitch. When I try to dial 'Other phones' using phone1, the dispatcher always get into FAILURE route although the log shows that kamailio did send INVITE to 10.10.1.222 and received '407 - Proxy Authentication Required' from Freexwitch1 and then dispatcher send INVITE to 10.10.1.223 and also received '407 - Proxy Authentication Required' from Freexwitch2 and eventually failed.</div><div><br></div><div>Any idea?</div><div><br></div><div>Here is my configuration:</div><div><div>modparam("dispatcher", "db_url", DBURL)</div><div>modparam("dispatcher", "table_name", "dispatcher")</div><div>modparam("dispatcher", "ds_ping_interval", 10000)</div><div>modparam("dispatcher", "ds_probing_threshhold", 3)</div><div>#modparam("dispatcher", "ds_ping_reply_codes", "class=2;class=4")</div><div>modparam("dispatcher", "ds_ping_method", "OPTIONS")</div><div>modparam("dispatcher", "ds_probing_mode", 1)</div><div>modparam("dispatcher", "ds_ping_from", "sip:proxy@SIP-router1.testnet.net")</div><div>modparam("dispatcher", "dst_avp", "$avp(dsdst)")</div><div>modparam("dispatcher", "grp_avp", "$avp(dsgrp)")</div><div>modparam("dispatcher", "cnt_avp", "$avp(dscnt)")</div><div>modparam("dispatcher", "attrs_avp", "$avp(dsattrs)")</div><div>modparam("dispatcher", "flags", 3)</div><div>modparam("dispatcher", "force_dst", 1)</div></div><div><br></div><div>route {</div><div>....</div><div><div> if ( ds_select_dst("$var(group)", "9") ){</div><div> route(RELAY_DS);</div><div> return;</div></div><div>...</div><div>}</div><div><div>route[[RELAY_DS]</div><div> if (is_method("INVITE")) {</div><div> t_on_branch("BRANCH_ONE");</div><div> t_on_reply("NAT_REPLY");</div><div> t_on_failure("FAIL_DS");</div><div> }</div><div> if (!t_relay()) {</div><div> sl_reply_error();</div><div> }</div><div>}</div></div><div><div>failure_route[FAIL_DS] {</div><div> if (t_check_status("408")) {</div><div> ds_mark_dst("i");</div><div> }</div><div> if (!ds_next_dst()) {</div><div> t_reply("503", "Service unavailable: no more dst");</div><div> exit;</div><div> }</div><div> t_on_failure("FAIL_DS");</div><div> route(RELAY_DS);</div><div>}</div></div><div><div>onreply_route[NAT_REPLY]</div><div>{</div><div> xlog("L_INFO", "REPLY_ROUTE: S=$rs - $rr F=$fu T=$tu IP=$avp(s:ip):$avp(s:port) ($si:$sp) ID=$ci\n");</div><div> </div></div><div>}</div><div><br></div><div>And here is the SIP messages from ngrep:</div><div><div>U 10.10.1.144:51029 -> 10.10.1.230:5060</div><div> INVITE sip:1001@fs2000.testnet.net;user=phone SIP/2.0..Via: SIP/2.0/UDP 10.10.1.144:5060;branch=z9hG4bK116d554d..F</div><div> rom: "Line1" <sip:5022441011@fs2000.testnet.net>;tag=00082166efcb002153bc0a31-20004ffd..To: <sip:1001@fs2000.testnet</div><div> .net;user=phone>..Call-ID: 00082166-efcb0013-692f44d9-6760a891@10.10.1.144..Max-Forwards: 70..Date: Thu, 02 Jun 2011</div><div> 19:14:14 GMT..CSeq: 101 INVITE..User-Agent: Cisco-CP7960G/7.5..Contact: <sip:5022441011@10.10.1.144:5060>..Expires:</div><div> 180..Accept: application/sdp..Allow: ACK,BYE,CANCEL,INVITE,NOTIFY,OPTIONS,REFER,REGISTER,UPDATE..Supported: replaces..C</div><div> ontent-Length: 261..Content-Type: application/sdp..Content-Disposition: session;handling=optional....v=0..o=Cisco-SIPUA</div><div> 10962 0 IN IP4 10.10.1.144..s=SIP Call..t=0 0..m=audio 20372 RTP/AVP 0 8 18 101..c=IN IP4 10.10.1.144..a=rtpmap:</div><div> 0 PCMU/8000..a=rtpmap:8 PCMA/8000..a=rtpmap:18 G729/8000..a=rtpmap:101 telephone-event/8000..a=fmtp:101 0-15..a=sendrecv</div><div> ..</div><div>#</div><div>U 10.10.1.230:5060 -> 10.10.1.144:5060</div><div> SIP/2.0 100 trying -- your call is important to us..Via: SIP/2.0/UDP 10.10.1.144:5060;branch=z9hG4bK116d554d..From:</div><div> "Line1" <sip:5022441011@fs2000.testnet.net>;tag=00082166efcb002153bc0a31-20004ffd..To: <sip:1001@fs2000.testnet.net;</div><div> user=phone>..Call-ID: 00082166-efcb0013-692f44d9-6760a891@10.10.1.144..CSeq: 101 INVITE..Server: kamailio (3.1.2 (x8</div><div> 6_64/linux))..Content-Length: 0....</div><div>#</div><div>U 10.10.1.230:5060 -> 10.10.1.222:5060</div><div> INVITE sip:1001@fs2000.testnet.net;user=phone SIP/2.0..Record-Route: <sip:10.10.1.230;lr=on;nat=yes>..Via: SIP/2.0/</div><div> UDP 10.10.1.230;branch=z9hG4bK1ef6.c9d52d72.0..Via: SIP/2.0/UDP 10.10.1.144:5060;branch=z9hG4bK116d554d..From: "L</div><div> ine1" <sip:5022441011@fs2000.testnet.net>;tag=00082166efcb002153bc0a31-20004ffd..To: <sip:1001@fs2000.testnet.net;us</div><div> er=phone>..Call-ID: 00082166-efcb0013-692f44d9-6760a891@10.10.1.144..Max-Forwards: 69..Date: Thu, 02 Jun 2011 19:14:</div><div> 14 GMT..CSeq: 101 INVITE..User-Agent: Cisco-CP7960G/7.5..Contact: <sip:5022441011@10.10.1.144:5060>..Expires: 180..A</div><div> ccept: application/sdp..Allow: ACK,BYE,CANCEL,INVITE,NOTIFY,OPTIONS,REFER,REGISTER,UPDATE..Supported: replaces..Content-</div><div> Length: 277..Content-Type: application/sdp..Content-Disposition: session;handling=optional....v=0..o=Cisco-SIPUA 10962 0</div><div> IN IP4 10.10.1.231..s=SIP Call..t=0 0..m=audio 38426 RTP/AVP 0 8 18 101..c=IN IP4 10.10.1.231..a=rtpmap:0 PCMU/80</div><div> 00..a=rtpmap:8 PCMA/8000..a=rtpmap:18 G729/8000..a=rtpmap:101 telephone-event/8000..a=fmtp:101 0-15..a=sendrecv..a=nortp</div><div> proxy:yes..</div><div>#</div><div>U 10.10.1.222:5060 -> 10.10.1.230:5060</div><div> SIP/2.0 100 Trying..Via: SIP/2.0/UDP 10.10.1.230;branch=z9hG4bK1ef6.c9d52d72.0..Via: SIP/2.0/UDP 10.10.1.144:5060</div><div> ;branch=z9hG4bK116d554d..Record-Route: <sip:10.10.1.230;lr=on;nat=yes>..From: "Line1" <sip:5022441011@fs2000.lightyea</div><div> r.net>;tag=00082166efcb002153bc0a31-20004ffd..To: <sip:1001@fs2000.testnet.net;user=phone>..Call-ID: 00082166-efcb0013</div><div> -692f44d9-6760a891@10.10.1.144..CSeq: 101 INVITE..User-Agent: FreeSWITCH-mod_sofia/1.0.head-git-f17e962 2011-04-19 0</div><div> 3-05-32 -0400..Content-Length: 0....</div><div>#</div><div>U 10.10.1.222:5060 -> 10.10.1.230:5060</div><div> SIP/2.0 407 Proxy Authentication Required..Via: SIP/2.0/UDP 10.10.1.230;branch=z9hG4bK1ef6.c9d52d72.0..Via: SIP/2.0/U</div><div> DP 10.10.1.144:5060;branch=z9hG4bK116d554d..From: "Line1" <sip:5022441011@fs2000.testnet.net>;tag=00082166efcb0021</div><div> 53bc0a31-20004ffd..To: <sip:1001@fs2000.testnet.net;user=phone>;tag=6mjQm2eayZ49j..Call-ID: 00082166-efcb0013-692f44d9</div><div> -6760a891@10.10.1.144..CSeq: 101 INVITE..User-Agent: FreeSWITCH-mod_sofia/1.0.head-git-f17e962 2011-04-19 03-05-32 -</div><div> 0400..Accept: application/sdp..Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY,</div><div> PUBLISH, SUBSCRIBE..Supported: timer, precondition, path, replaces..Allow-Events: talk, hold, presence, dialog, line-se</div><div> ize, call-info, sla, include-session-description, presence.winfo, message-summary, refer..Proxy-Authenticate: Digest rea</div><div> lm="fs2000.testnet.net", nonce="8da1ddb1-e393-442c-8be0-17e439457363", algorithm=MD5, qop="auth"..Content-Length: 0...</div><div> .</div><div>#</div><div>U 10.10.1.230:5060 -> 10.10.1.222:5060</div><div> ACK sip:1001@fs2000.testnet.net;user=phone SIP/2.0..Via: SIP/2.0/UDP 10.10.1.230;branch=z9hG4bK1ef6.c9d52d72.0..Fro</div><div> m: "Line1" <sip:5022441011@fs2000.testnet.net>;tag=00082166efcb002153bc0a31-20004ffd..To: <sip:1001@fs2000.testnet.n</div><div> et;user=phone>;tag=6mjQm2eayZ49j..Call-ID: 00082166-efcb0013-692f44d9-6760a891@10.10.1.144..Max-Forwards: 69..CSeq:</div><div> 101 ACK..Content-Length: 0....</div><div>#</div><div>U 10.10.1.230:5060 -> 10.10.1.223:5060</div><div> INVITE sip:1001@fs2000.testnet.net;user=phone SIP/2.0..Record-Route: <sip:10.10.1.230;lr=on;nat=yes;nat=yes>..Via:</div><div> SIP/2.0/UDP 10.10.1.230;branch=z9hG4bK1ef6.c9d52d72.1..Via: SIP/2.0/UDP 10.10.1.144:5060;branch=z9hG4bK116d554d..</div><div> From: "Line1" <sip:5022441011@fs2000.testnet.net>;tag=00082166efcb002153bc0a31-20004ffd..To: <sip:1001@fs2000.lightyea</div><div> r.net;user=phone>..Call-ID: 00082166-efcb0013-692f44d9-6760a891@10.10.1.144..Max-Forwards: 69..Date: Thu, 02 Jun 201</div><div> 1 19:14:14 GMT..CSeq: 101 INVITE..User-Agent: Cisco-CP7960G/7.5..Contact: <sip:5022441011@10.10.1.144:5060>..Expires</div><div> : 180..Accept: application/sdp..Allow: ACK,BYE,CANCEL,INVITE,NOTIFY,OPTIONS,REFER,REGISTER,UPDATE..Supported: replaces..</div><div> Content-Length: 328..Content-Type: application/sdp..Content-Disposition: session;handling=optional....v=0..o=Cisco-SIPUA</div><div> 10962 0 IN IP4 10.10.1.23110.10.1.231..s=SIP Call..t=0 0..m=audio 3842638426 RTP/AVP 0 8 18 101..c=IN IP4 216.49.</div><div> 129.23110.10.1.231..a=rtpmap:0 PCMU/8000..a=rtpmap:8 PCMA/8000..a=rtpmap:18 G729/8000..a=rtpmap:101 telephone-event/8</div><div> 000..a=fmtp:101 0-15..a=sendrecv..a=nortpproxy:yes..a=nortpproxy:yes..</div><div>#</div><div>U 10.10.1.223:5060 -> 10.10.1.230:5060</div><div> SIP/2.0 100 Trying..Via: SIP/2.0/UDP 10.10.1.230;branch=z9hG4bK1ef6.c9d52d72.1..Via: SIP/2.0/UDP 10.10.1.144:5060</div><div> ;branch=z9hG4bK116d554d..Record-Route: <sip:10.10.1.230;lr=on;nat=yes;nat=yes>..From: "Line1" <sip:5022441011@fs2000.</div><div> testnet.net>;tag=00082166efcb002153bc0a31-20004ffd..To: <sip:1001@fs2000.testnet.net;user=phone>..Call-ID: 00082166-</div><div> efcb0013-692f44d9-6760a891@10.10.1.144..CSeq: 101 INVITE..User-Agent: FreeSWITCH-mod_sofia/1.0.head-git-f17e962 2011</div><div> -04-19 03-05-32 -0400..Content-Length: 0....</div><div>#</div><div>U 10.10.1.223:5060 -> 10.10.1.230:5060</div><div> SIP/2.0 407 Proxy Authentication Required..Via: SIP/2.0/UDP 10.10.1.230;branch=z9hG4bK1ef6.c9d52d72.1..Via: SIP/2.0/U</div><div> DP 10.10.1.144:5060;branch=z9hG4bK116d554d..From: "Line1" <sip:5022441011@fs2000.testnet.net>;tag=00082166efcb0021</div><div> 53bc0a31-20004ffd..To: <sip:1001@fs2000.testnet.net;user=phone>;tag=Ky0XB4gDeDy6F..Call-ID: 00082166-efcb0013-692f44d9</div><div> -6760a891@10.10.1.144..CSeq: 101 INVITE..User-Agent: FreeSWITCH-mod_sofia/1.0.head-git-f17e962 2011-04-19 03-05-32 -</div><div> 0400..Accept: application/sdp..Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY,</div><div> PUBLISH, SUBSCRIBE..Supported: timer, precondition, path, replaces..Allow-Events: talk, hold, presence, dialog, line-se</div><div> ize, call-info, sla, include-session-description, presence.winfo, message-summary, refer..Proxy-Authenticate: Digest rea</div><div> lm="fs2000.testnet.net", nonce="8769298b-c52d-43b8-b69c-6ebf26f3184d", algorithm=MD5, qop="auth"..Content-Length: 0...</div><div> .</div><div>#</div><div>U 10.10.1.230:5060 -> 10.10.1.223:5060</div><div> ACK sip:1001@fs2000.testnet.net;user=phone SIP/2.0..Via: SIP/2.0/UDP 10.10.1.230;branch=z9hG4bK1ef6.c9d52d72.1..From: "Line1" <sip:5022441011@fs2000.testnet.net>;tag=00082166efcb002153bc0a31-20004ffd..To: <sip:1001@fs2000.testnet.n</div><div> et;user=phone>;tag=Ky0XB4gDeDy6F..Call-ID: 00082166-efcb0013-692f44d9-6760a891@10.10.1.144..Max-Forwards: 69..CSeq:</div><div> 101 ACK..Content-Length: 0....</div><div>#</div><div>U 10.10.1.230:5060 -> 10.10.1.144:5060</div><div> SIP/2.0 503 Service unavailable: no more dst..Via: SIP/2.0/UDP 10.10.1.144:5060;branch=z9hG4bK116d554d..From: "Line1</div><div> " <sip:5022441011@fs2000.testnet.net>;tag=00082166efcb002153bc0a31-20004ffd..To: <sip:1001@fs2000.testnet.net;user=p</div><div> hone>;tag=a6a1c5f60faecf035a1ae5b6e96e979a-2c94..Call-ID: 00082166-efcb0013-692f44d9-6760a891@10.10.1.144..CSeq: 101</div><div> INVITE..Server: kamailio (3.1.2 (x86_64/linux))..Content-Length: 0....</div><div>#</div><div>U 10.10.1.144:51030 -> 10.10.1.230:5060</div><div> ACK sip:1001@fs2000.testnet.net;user=phone SIP/2.0..Via: SIP/2.0/UDP 10.10.1.144:5060;branch=z9hG4bK116d554d..From</div><div> : "Line1" <sip:5022441011@fs2000.testnet.net>;tag=00082166efcb002153bc0a31-20004ffd..To: <sip:1001@fs2000.testnet.ne</div><div> t;user=phone>;tag=a6a1c5f60faecf035a1ae5b6e96e979a-2c94..Call-ID: 00082166-efcb0013-692f44d9-6760a891@10.10.1.144..D</div><div> ate: Thu, 02 Jun 2011 19:14:14 GMT..CSeq: 101 ACK..Content-Length: 0....</div></div><div><br></div><div><br></div><div>Gary Chen</div></div></body></html>