<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt">hi all,<br>please help to correct configure in carrierroute module.<br>i have configure carrierroute in kamailio as bellow.<br>=========<br>kamailio.cfg<br>===<br>route[1] {<br> # route calls based on hash over callid<br> # choose route domain 0 of the default carrier<br> if(!cr_route("default", "default", "$rU", "$rU", "call_id")){<br> sl_send_reply("403", "Not allowed");<br> } else {<br> # In case of failure, re-route the
request<br> t_on_failure("1");<br> # Relay the request to the gateway<br> t_relay();<br> }<br>}<br><br>failure_route[1] {<br> # In case of failure, send it to an alternative route:<br> if (t_check_status("408|5[0-9][0-9]")) {<br><br> #choose route domain 1 of the default carrier<br> if(!cr_route("default", "default", "$rU", "$rU", "call_id")){<br> } else {<br>xlog("failure
2");<br> t_on_failure("2");<br> t_relay();<br> }<br> }<br>}<br><br><br>=========\<br>in database:<br>mysql> select * from carrierroute;<br>+----+---------+--------+-------------+-------+------+------+-------+--------------+----------------+----------------+-------------+<br>|
id | carrier | domain | scan_prefix | flags | mask | prob | strip |
rewrite_host | rewrite_prefix | rewrite_suffix | description |<br>+----+---------+--------+-------------+-------+------+------+-------+--------------+----------------+----------------+-------------+<br>| 1
| 1 | 1 | 1000 | 0 | 0 | 1 | 0 | 192.168.1.42 | | | FRANCE |<br>+----+---------+--------+-------------+-------+------+------+-------+--------------+----------------+----------------+-------------+<br>1 row in set (0.00 sec)<br>mysql> select * from carrier_name;<br>+----+---------+<br>| id | carrier |<br>+----+---------+<br>| 1 | default |<br>+----+---------+<br>mysql> select * from domain_name;<br>+----+---------+<br>| id | domain |<br>+----+---------+<br>| 1 | default |<br>+----+---------+<br>================<br>in server 192.168.1.40
: subscriber table:<br>mysql> select * from subscriber;<br>+----+----------+--------------+----------+---------------+----------------------------------+----------------------------------+------+<br>|
id | username | domain | password | email_address |
ha1 | ha1b |
rpid |<br>+----+----------+--------------+----------+---------------+----------------------------------+----------------------------------+------+<br>| 1 | 1 | 192.168.1.40 | 1
| | b8ee4a7080092d7fd27357de1799b111 | d1343e4f0259199ed6b06d6338d39903 | NULL |<br>|
2 | 2 | 192.168.1.40 | 2 | |
25f61f90a19afe508629127838c11509 | 7f4ec87f39f48d0d8f8a537cfc34c5c9 |
NULL |<br>| 3 | 3 | <a target="_blank" href="http://kamailio.com/"><span class="yshortcuts" id="lw_1282540176_0">kamailio.com</span></a> | 3 | | 63a131bf02b4123073970731a4525470 | 64e49a4f89317c5ee757ba0366ec9307 | NULL |<br>| 4 | 1000 | 192.168.1.40 | 1000 | | 8e9f00da8e49cc8b844b6cee1752b949 |
2bff4783b0ce3412bf33e7400fbbedce | NULL |<br>| 5 | 4 |
192.168.1.40 | 4 | |
037cf4277ce31c104e4b1bc7bbcf8ad4 | cb2321d9ac8bfe749cedc1d66cad5d73 |
NULL |<br>| 6 | 1 | kamailio.com | 1 | |
31fb6891a2fcb9b13a952ce3f12359c9 | 84add6cffd100f8ca3c8660c3c9617b5 |
NULL |<br>| 7 | 1 | 192.168.1.42 | 1 | |
ad57b2abdf288984bc4a897a9e7f2ba9 | 60b9ab690724e5a535df794131e2345f |
NULL |<br>| 8 | 1000 | 192.168.1.42 |
1000 | | 0a9fb3a1de135a32b9090798a0dcb240 | bf5a95934a59b480dbf85abe386144b6 | NULL |<br>+----+----------+--------------+----------+---------------+----------------------------------+----------------------------------+------+<br><br>I try to make call from 1@192.168.1.40 to 1000@192.168.1.42<br>but the call failed.<br>sip client 1@192.168.1.40 show that : server failure<br>and sip client 1000@192.168.1.42 ringing.<br>============<br>sip trace for 192.168.1.40:<br><br>U 192.168.1.40:5060 -> 192.168.1.42:5060<br>INVITE sip:1000@192.168.1.42 SIP/2.0.<br>Record-Route: <sip:192.168.1.40;lr=on>.<br>Via: SIP/2.0/UDP 192.168.1.40;branch=z9hG4bKf92a.649f39e3.0.<br>Via: SIP/2.0/UDP 192.168.1.10:50495;branch=z9hG4bK-d8754z-ec188605061deb73-1---d8754z-;rport=50495.<br>Max-Forwards: 69.<br>Contact:
<sip:1@192.168.1.10:50495;rinstance=9a88ebaf62e2a935>.<br>To: <sip:1000@192.168.1.40:5060>.<br>From: <sip:1@192.168.1.40:5060>;tag=fd3fe92e.<br>Call-ID: MmNjYTZjMjNmOWZkN2RkZWE3NWUxOWZlNWUyOTY3ZmM..<br>CSeq: 2 INVITE.<br>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO.<br>Content-Type: application/sdp.<br>Supported: replaces.<br>User-Agent: 3CXPhone 4.0.10858.0.<br>Content-Length: 279.<br>.<br>v=0.<br>o=3cxVCE 96031755 <span class="yshortcuts" id="lw_1282540176_1">384028260</span> IN IP4 192.168.1.10.<br>s=3cxVCE Audio Call.<br>c=IN IP4 192.168.1.10.<br>t=0 0.<br>m=audio 40002 RTP/AVP 0 8 3 101.<br>a=rtpmap:0 PCMU/8000.<br>a=rtpmap:8 PCMA/8000.<br>a=rtpmap:3 GSM/8000.<br>a=rtpmap:101 telephone-event/8000.<br>a=fmtp:101 0-15.<br>a=ptime:20.<br>a=sendrecv.<br><br><br>U 192.168.1.40:5060 -> 192.168.1.10:50495<br>SIP/2.0 500 I'm terribly sorry, server error occurred (6/SL).<br>Via: SIP/2.0/UDP
192.168.1.10:50495;branch=z9hG4bK-d8754z-ec188605061deb73-1---d8754z-;rport=50495.<br>To: <sip:1000@192.168.1.40:5060>;tag=ae07808f44ebda0182a54cf170e36dbe.ba60.<br>From: <sip:1@192.168.1.40:5060>;tag=fd3fe92e.<br>Call-ID: MmNjYTZjMjNmOWZkN2RkZWE3NWUxOWZlNWUyOTY3ZmM..<br>CSeq: 2 INVITE.<br>Server: kamailio (3.0.1 (i386/linux)).<br>Content-Length: 0.<br>.<br><br><br>U 192.168.1.10:50495 -> 192.168.1.40:5060<br>ACK sip:1000@192.168.1.40:5060 SIP/2.0.<br>Via: SIP/2.0/UDP 192.168.1.10:50495;branch=z9hG4bK-d8754z-ec188605061deb73-1---d8754z-;rport.<br>Max-Forwards: 70.<br>To: <sip:1000@192.168.1.40:5060>;tag=ae07808f44ebda0182a54cf170e36dbe.ba60.<br>From: <sip:1@192.168.1.40:5060>;tag=fd3fe92e.<br>Call-ID: MmNjYTZjMjNmOWZkN2RkZWE3NWUxOWZlNWUyOTY3ZmM..<br>CSeq: 2 ACK.<br>Content-Length: 0.<br><br><br>and sip trace in 192.168.1.42:<br><br>====<br>U 192.168.1.40:5060 -> 192.168.1.42:5060<br>INVITE sip:1000@192.168.1.42
SIP/2.0.<br>Record-Route: <sip:192.168.1.40;lr=on>.<br>Via: SIP/2.0/UDP 192.168.1.40;branch=z9hG4bKc4e.5ee44227.0.<br>Via: SIP/2.0/UDP 192.168.1.10:50495;branch=z9hG4bK-d8754z-7e347d55637cf134-1---d8754z-;rport=50495.<br>Max-Forwards: 69.<br>Contact: <sip:1@192.168.1.10:50495;rinstance=9a88ebaf62e2a935>.<br>To: <sip:1000@192.168.1.40:5060>.<br>From: <sip:1@192.168.1.40:5060>;tag=722dc40c.<br>Call-ID: ZGY0YTY5YmYzM2E2MzEzNDgzODhkMTllN2RiY2ExOGM..<br>CSeq: 2 INVITE.<br>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO.<br>Content-Type: application/sdp.<br>Supported: replaces.<br>User-Agent: 3CXPhone 4.0.10858.0.<br>Content-Length: 280.<br>.<br>v=0.<br>o=3cxVCE 227296140 367695825 IN IP4 192.168.1.10.<br>s=3cxVCE Audio Call.<br>c=IN IP4 192.168.1.10.<br>t=0 0.<br>m=audio 40000 RTP/AVP 0 8 3 101.<br>a=rtpmap:0 PCMU/8000.<br>a=rtpmap:8 PCMA/8000.<br>a=rtpmap:3 GSM/8000.<br>a=rtpmap:101
telephone-event/8000.<br>a=fmtp:101 0-15.<br>a=ptime:20.<br>a=sendrecv.<br><br><br>U 192.168.1.42:5060 -> 192.168.1.40:5060<br>SIP/2.0 100 trying -- your call is important to us.<br>Via: SIP/2.0/UDP 192.168.1.40;branch=z9hG4bKc4e.5ee44227.0.<br>Via: SIP/2.0/UDP 192.168.1.10:50495;branch=z9hG4bK-d8754z-7e347d55637cf134-1---d8754z-;rport=50495.<br>To: <sip:1000@192.168.1.40:5060>.<br>From: <sip:1@192.168.1.40:5060>;tag=722dc40c.<br>Call-ID: ZGY0YTY5YmYzM2E2MzEzNDgzODhkMTllN2RiY2ExOGM..<br>CSeq: 2 INVITE.<br>Server: kamailio (3.0.1 (i386/linux)).<br>Content-Length: 0.<br>.<br><br><br>U 192.168.1.42:5060 -> 192.168.1.10:6872<br>INVITE sip:1000@192.168.1.10:6872;rinstance=c308344d9524d1a4 SIP/2.0.<br>Record-Route: <sip:192.168.1.42;lr=on>.<br>Record-Route: <sip:192.168.1.40;lr=on>.<br>Via: SIP/2.0/UDP 192.168.1.42;branch=z9hG4bKc4e.f9fad397.0.<br>Via: SIP/2.0/UDP 192.168.1.40;branch=z9hG4bKc4e.5ee44227.0.<br>Via: SIP/2.0/UDP
192.168.1.10:50495;branch=z9hG4bK-d8754z-7e347d55637cf134-1---d8754z-;rport=50495.<br>Max-Forwards: 68.<br>Contact: <sip:1@192.168.1.10:50495;rinstance=9a88ebaf62e2a935>.<br>To: <sip:1000@192.168.1.40:5060>.<br>From: <sip:1@192.168.1.40:5060>;tag=722dc40c.<br>Call-ID: ZGY0YTY5YmYzM2E2MzEzNDgzODhkMTllN2RiY2ExOGM..<br>CSeq: 2 INVITE.<br>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO.<br>Content-Type: application/sdp.<br>Supported: replaces.<br>User-Agent: 3CXPhone 4.0.10858.0.<br>Content-Length: 280.<br>.<br>v=0.<br>o=3cxVCE 227296140 367695825 IN IP4 192.168.1.10.<br>s=3cxVCE Audio Call.<br>c=IN IP4 192.168.1.10.<br>t=0 0.<br>m=audio 40000 RTP/AVP 0 8 3 101.<br>a=rtpmap:0 PCMU/8000.<br>a=rtpmap:8 PCMA/8000.<br>a=rtpmap:3 GSM/8000.<br>a=rtpmap:101 telephone-event/8000.<br>a=fmtp:101 0-15.<br>a=ptime:20.<br>a=sendrecv.<br><br><br>U 192.168.1.10:6872 -> 192.168.1.42:5060<br>SIP/2.0 180
Ringing.<br>Via: SIP/2.0/UDP 192.168.1.42;branch=z9hG4bKc4e.f9fad397.0.<br>Via: SIP/2.0/UDP 192.168.1.40;branch=z9hG4bKc4e.5ee44227.0.<br>Via: SIP/2.0/UDP 192.168.1.10:50495;branch=z9hG4bK-d8754z-7e347d55637cf134-1---d8754z-;rport=50495.<br>Record-Route: <sip:192.168.1.42;lr>.<br>Record-Route: <sip:192.168.1.40;lr=on>.<br>Contact: <sip:1000@192.168.1.10:6872;rinstance=c308344d9524d1a4>.<br>To: <sip:1000@192.168.1.40:5060>;tag=660be63a.<br>From: <sip:1@192.168.1.40:5060>;tag=722dc40c.<br>Call-ID: ZGY0YTY5YmYzM2E2MzEzNDgzODhkMTllN2RiY2ExOGM..<br>CSeq: 2 INVITE.<br>User-Agent: PortGo v6.0, Build 07282010.<br>Content-Length: 0.<br><br><br> <br><br>========================<br>and in server 192.168.1.42:subscriber table:<br>mysql> select * from subscriber;<br>
+----+----------+--------------+----------+---------------+----------------------------------+----------------------------------+------+<br>
| id | username | domain | password | email_address |
ha1 | ha1b |
rpid |<br>
+----+----------+--------------+----------+---------------+----------------------------------+----------------------------------+------+<br>
| 1 | 1000 | 192.168.1.42 | 1000 | |
0a9fb3a1de135a32b9090798a0dcb240 | bf5a95934a59b480dbf85abe386144b6 |
NULL |<br>
| 2 | 1 | 192.168.1.42 | 1 | |
ad57b2abdf288984bc4a897a9e7f2ba9 | 60b9ab690724e5a535df794131e2345f |
NULL |<br>
| 3 | 1 | 192.168.1.40 | 1 | |
b8ee4a7080092d7fd27357de1799b111 | d1343e4f0259199ed6b06d6338d39903 |
NULL |<br><br><br>please suggest to get correct configue.<br>thanks for looking.<br><div> </div>TRUONG NGOC THANH<br><span style="border-bottom: 2px dotted rgb(54, 99, 136); cursor: pointer; background: none repeat scroll 0% 0% transparent;" class="yshortcuts" id="lw_1282540176_2">Telecommunications Engineer</span><br>Tel: <span class="skype_pnh_print_container">0984 480 646</span><span dir="ltr" class="skype_pnh_container"><span class="skype_pnh_mark"> begin_of_the_skype_highlighting</span> <span dir="ltr" title="Call this phone number in Vietnam with Skype: +84984480646" class="skype_pnh_highlighting_inactive_common"><span skypeaction="skype_dropdown" class="skype_pnh_left_span"> </span><span skypeaction="skype_dropdown" title="Skype actions" class="skype_pnh_dropart_span"><span skypeaction="skype_dropdown" style="background-position: -4659px 1px ! important;"
class="skype_pnh_dropart_flag_span"> </span> </span><span class="skype_pnh_textarea_span"><span class="skype_pnh_text_span"> 0984 480 646</span></span><span class="skype_pnh_right_span"> </span></span> <span class="skype_pnh_mark">end_of_the_skype_highlighting</span></span><br>Y!M: ngoc217thanh</div><br>
</body></html>