<div dir="ltr"><pre>Hello Hero,<br><br></pre><pre>Thanks for your help.<br></pre><pre>May be I'm loosing something. I have changed my config as you suggested (I thing so...):<br><br>if (t_check_status("486|408")) {<br>
<br> revert_uri(); <br> prefix("voicemail"); <br> remove_hf("P-App-Name");<br> append_hf("P-App-Name: voicemail\r\n"); <br>
append_hf("P-App-Param: mod=box;usr= $rU;dom=<a href="http://sipproxy.a.com" target="_blank">sipproxy.a.com</a>;uid=$</pre><div dir="ltr">rU;did=<a href="http://sipproxy.a.com" target="_blank">sipproxy.a.com</a>;\r\n"); <br>
rewritehostport("<a href="http://192.168.0.197:5080" target="_blank">192.168.0.197:5080</a>");<br>
$du = $null;<br> #$du = "sip:192.168.0.197";<br> append_branch();<br> t_relay();<br> <br> }<br>}</div><pre>Kamailio sends back 200 OK to the UAC that originated the call, but it never sends the new INVITE<br>
<br>|Time | 192.168.3.20 </pre><div dir="ltr"> | 192.168.0.167 |<br>| | | 192.168.0.197 | <br>|3,151 | INVITE SDP ( telephone-event) | |SIP From: <a href="mailto:sip%3A4095@192.168.0.197" target="_blank">sip:4095@192.168.0.197</a> <a href="mailto:To%3Asip%3A4440@192.168.0.197" target="_blank">To:sip:4440@192.168.0.197</a><br>
| |(5060) ------------------> (5060) | |<br>|3,159 | 407 Proxy Authentication Required | |SIP Status<br>| |(5060) <------------------ (5060) | |<br>
|3,161 | ACK | | |SIP Request<br>| |(5060) ------------------> (5060) | |<br>|3,161 | INVITE SDP ( telephone-event) | |SIP From: <a href="mailto:sip%3A4095@192.168.0.197" target="_blank">sip:4095@192.168.0.197</a> <a href="mailto:To%3Asip%3A4440@192.168.0.197" target="_blank">To:sip:4440@192.168.0.197</a><br>
| |(5060) ------------------> (5060) | |<br>|3,174 | 100 trying -- your call is important to us | |SIP Status<br>| |(5060) <------------------ (5060) | |<br>
|3,174 | | INVITE SDP ( telephone-event) |SIP Request<br>| | |(5060) ------------------> (5060) |<br>|3,176 | | 100 Trying| |SIP Status<br>
| | |(5060) <------------------ (5060) |<br>|3,177 | | 486 Busy Here |SIP Status<br>| | |(5060) <------------------ (5060) |<br>
|3,180 | | ACK | |SIP Request<br>| | |(5060) ------------------> (5060) |<br>|3,195 | 200 OK SDP ( telephone-event) | |SIP Status<br>
| |(5060) <------------------ (5060) | |<br>|3,200 | ACK | | |SIP Request<br>| |(5060) ------------------> (5060) | |<br>
|3,213 | RTP (GSM) | | |RTP Num packets:204 Duration:4.069s SSRC:0x8494958<br>| |(49222) ------------------> (10028) | |<br>|7,288 | BYE | | |SIP Request<br>
| |(5060) ------------------> (5060) | |<br>|7,295 | 200 OK | | |SIP Status<br>| |(5060) <------------------ (5060) | |</div>
<pre><br></pre><pre>what am I loosing?<br><br></pre><pre>Regards<br><br></pre><pre>LAA<br></pre><pre><br><br>*************<br><br><br>had the same issue here. you have to manually set $du=$null, else it
doesn't get reset for the failure branch.
On 7/23/13, LAA <<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">ornitorrinco7424 at gmail.com</a>> wrote:
><i> Hi all,
</i>><i>
</i>><i> I'm running Kamailio 3.0.0, with SEMS integration as Media Server for Voice
</i>><i> mail. I'm trying to get a configuration to forward calls on busy to voice
</i>><i> mail. I have followed without success some examples. I'm using
</i>><i> revert_uri(), rewritehostport() and append_branch(), within failure_route.
</i>><i> It seems to be modifying R-URI properly, and generating the new branch, but
</i>><i> Kamailio is sending the new invite packet to the IP address of the original
</i>><i> destination UAC, and not to the IP address of the voicemail, that was
</i>><i> indicated in the R-URI. Here you can see the packet flow:
</i>><i>
</i>><i> |Time | 192.168.3.20
</i>><i> | 192.168.0.167 |
</i>><i> | | | 192.168.0.197 |
</i>><i> |5,069 | INVITE SDP ( telephone-event)
</i>><i> | |SIP From: sip:<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">4095 at 192.168.0.197</a>
</i>><i> To:sip:<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">4440 at 192.168.0.197</a>
</i>><i> | |(5060) ------------------> (5060) | |
</i>><i> |5,071 | 407 Proxy Authentication Required
</i>><i> | |SIP Status
</i>><i> | |(5060) <------------------ (5060) | |
</i>><i> |5,074 | ACK | | |SIP
</i>><i> Request
</i>><i> | |(5060) ------------------> (5060) | |
</i>><i> |5,076 | INVITE SDP ( telephone-event)
</i>><i> | |SIP From: sip:<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">4095 at 192.168.0.197</a>
</i>><i> To:sip:<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">4440 at 192.168.0.197</a>
</i>><i> | |(5060) ------------------> (5060) | |
</i>><i> |5,084 | 100 trying -- your call is important to us
</i>><i> | |SIP Status
</i>><i> | |(5060) <------------------ (5060) | |
</i>><i> |5,085 | | INVITE SDP (
</i>><i> telephone-event) |SIP Request
</i>><i> | | |(5060) ------------------> (5060) |
</i>><i> |5,088 | | 100 Trying| |SIP
</i>><i> Status
</i>><i> | | |(5060) <------------------ (5060) |
</i>><i> |5,088 | | 486 Busy Here |SIP
</i>><i> Status
</i>><i> | | |(5060) <------------------ (5060) |
</i>><i> |5,091 | | ACK | |SIP
</i>><i> Request
</i>><i> | | |(5060) ------------------> (5060) |
</i>><i> |5,101 | | INVITE SDP (
</i>><i> telephone-event) |SIP Request
</i>><i> | | |(5060) ------------------> (5060) |
</i>><i> |5,102 | | 404 Not Found |SIP
</i>><i> Status
</i>><i> | | |(5060) <------------------ (5060) |
</i>><i> |5,102 | | ACK | |SIP
</i>><i> Request
</i>><i> | | |(5060) ------------------> (5060) |
</i>><i> |5,103 | 404 Not Found | |SIP
</i>><i> Status
</i>><i> | |(5060) <------------------ (5060) | |
</i>><i> |5,106 | ACK | | |SIP
</i>><i> Request
</i>><i> | |(5060) ------------------> (5060) | |
</i>><i>
</i>><i> And the RAW capture of the INVITE message in timestamp 5,101.
</i>><i>
</i>><i>
</i>><i>
</i>><i> No. Time Source Destination Protocol
</i>><i> Info
</i>><i> 1235 5.100698 192.168.0.197 192.168.0.167 SIP/SDP
</i>><i> Request: INVITE sip:<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">voicemail4440 at 192.168.0.197</a>:5080, with session
</i>><i> description
</i>><i>
</i>><i> Frame 1235 (1151 bytes on wire, 1151 bytes captured)
</i>><i> Ethernet II, Src: CadmusCo_96:31:84 (08:00:27:96:31:84), Dst:
</i>><i> Micro-St_6d:77:54 (00:21:85:6d:77:54)
</i>><i> Internet Protocol, Src: 192.168.0.197 (192.168.0.197), Dst: 192.168.0.167
</i>><i> (192.168.0.167)
</i>><i> User Datagram Protocol, Src Port: sip (5060), Dst Port: sip (5060)
</i>><i> Session Initiation Protocol
</i>><i> Request-Line: INVITE sip:<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">voicemail4440 at 192.168.0.197</a>:5080 SIP/2.0
</i>><i> Method: INVITE
</i>><i> Request-URI: sip:<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">voicemail4440 at 192.168.0.197</a>:5080
</i>><i> [Resent Packet: True]
</i>><i> [Suspected resend of frame: 1233]
</i>><i> Message Header
</i>><i> Record-Route: <sip:192.168.0.197;lr=on;nat=
</i>><i> yes>
</i>><i> Via: SIP/2.0/UDP 192.168.0.197;branch=z9hG4bKafce.403718a6.1
</i>><i> Via: SIP/2.0/UDP
</i>><i> 192.168.57.20;received=192.168.3.20;rport=5060;branch=z9hG4bK0a00030f0000003151ed60b85ec2c3de000000c8
</i>><i> Content-Length: 386
</i>><i> Contact: <sip:<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">4095 at 192.168.3.20</a>:5060>
</i>><i> Call-ID: <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">8EAF9EC2-1DD2-11B2-B110-C84E476664B0 at 10.0.3.15</a>
</i>><i> Content-Type: application/sdp
</i>><i> CSeq: 2 INVITE
</i>><i> From: "4095"<sip:<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">4095 at 192.168.0.197</a>>;tag=121754238352072516
</i>><i> Max-Forwards: 69
</i>><i> To: <sip:<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">4440 at 192.168.0.197</a>>
</i>><i> User-Agent: SJphone/1.60.299a/L (SJ Labs)
</i>><i> P-App-Name: voicemail
</i>><i> P-App-Param: mod=box;usr= voicemail4440;dom=<a href="http://sipproxy.a.com">sipproxy.a.com</a>
</i>><i> ;uid=voicemail4440;did=<a href="http://sipproxy.a.com">sipproxy.a.com</a>;
</i>><i> Message Body
</i>><i>
</i>><i> Here you can see the failure_route in my kamailio.cfg file:
</i>><i>
</i>><i> # Sample failure route
</i>><i> failure_route[FAIL_ONE] {
</i>><i> #ifdef WITH_NAT
</i>><i> if (is_method("INVITE")
</i>><i> && (isbflagset("6") || isflagset(5))) {
</i>><i> unforce_rtp_proxy();
</i>><i> }
</i>><i> #endif
</i>><i>
</i>><i> if (t_is_canceled()) {
</i>><i> exit;
</i>><i> }
</i>><i>
</i>><i> # uncomment the following lines if you want to block client
</i>><i> # redirect based on 3xx replies.
</i>><i> ##if (t_check_status("3[0-9][0-9]")
</i>><i> ) {
</i>><i> ##t_reply("404","Not found");
</i>><i> ## exit;
</i>><i> ##}
</i>><i>
</i>><i> # uncomment the following lines if you want to redirect the failed
</i>><i> # calls to a different new destination
</i>><i> if (t_check_status("486|408")) {
</i>><i> revert_uri();
</i>><i> prefix("voicemail");
</i>><i> remove_hf("P-App-Name");
</i>><i> append_hf("P-App-Name: voicemail\r\n");
</i>><i> append_hf("P-App-Param: mod=box;usr= $rU;dom=<a href="http://sipproxy.a.com">sipproxy.a.com</a>
</i>><i> ;uid=$rU;did=<a href="http://sipproxy.a.com">sipproxy.a.com</a>;\r\n");
</i>><i> $ru = "sip:" + $rU + "@" + "<a href="http://192.168.0.197:5080">192.168.0.197:5080</a>";
</i>><i> #rewritehostport("<a href="http://192.168.0.197:5080">192.168.0.197:5080</a>");
</i>><i> #append_branch("sip:<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">4888 at 192.168.0.102</a>");
</i>><i> append_branch();
</i>><i> # do not set the missed call flag again
</i>><i> t_relay();
</i>><i> }
</i>><i> }
</i>><i>
</i>><i> Has anybody experienced this problem? Any help would be wellcome
</i>><i>
</i>><i> Best Regards
</i>><i>
</i>><i> LAA
</i>></pre></div>