<div dir="ltr">I have checked that I'm , experiencing the same problem when the redirection to voicemail is originated by the destination UAC via 302 message. Kamailio sends the packet to the destination UAC, even when I set $du to null.<br>
??¿?¿?¿¿??¿<br><br><br>if ($rU=~"^voicemail.*") {<br><br> $du = $null; <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">sipproxy.a.com</a>;uid=$rU;did=<a href="http://sipproxy.a.com">sipproxy.a.com</a>;\r\n"); <br>
$ru = "sip:" + $rU + "@" + "<a href="http://192.168.0.197:5080">192.168.0.197:5080</a>";<br> $du = $null;<br> route(RELAY); <br> exit;<br> }<br><br><br>Conv.| Time | 192.168.3.20 | 192.168.0.167 |<br>
| | | 192.168.0.197 | <br>0 |3,574 | INVITE SDP ( telephone-event) | |SIP From: <a href="mailto:sip%3A4095@192.168.0.197">sip:4095@192.168.0.197</a> <a href="mailto:To%3Asip%3A4440@192.168.0.197">To:sip:4440@192.168.0.197</a><br>
| |(5060) ------------------> (5060) | |<br>0 |3,575 | 407 Proxy Authentication Required | |SIP Status<br> | |(5060) <------------------ (5060) | |<br>
0 |3,577 | ACK | | |SIP Request<br> | |(5060) ------------------> (5060) | |<br>0 |3,577 | INVITE SDP ( telephone-event) | |SIP From: <a href="mailto:sip%3A4095@192.168.0.197">sip:4095@192.168.0.197</a> <a href="mailto:To%3Asip%3A4440@192.168.0.197">To:sip:4440@192.168.0.197</a><br>
| |(5060) ------------------> (5060) | |<br>0 |3,584 | 100 trying -- your call is important to us | |SIP Status<br> | |(5060) <------------------ (5060) | |<br>
0 |3,585 | | INVITE SDP ( telephone-event) |SIP Request<br> | | |(5060) ------------------> (5060) |<br>0 |3,587 | | 100 Trying| |SIP Status<br>
| | |(5060) <------------------ (5060) |<br>0 |3,587 | | 302 Moved Temporarily |SIP Status<br> | | |(5060) <------------------ (5060) |<br>
0 |3,588 | | ACK | |SIP Request<br> | | |(5060) ------------------> (5060) |<br>0 |3,592 | 302 Moved Temporarily | |SIP Status<br>
| |(5060) <------------------ (5060) | |<br>0 |3,594 | ACK | | |SIP Request<br> | |(5060) ------------------> (5060) | |<br>
-----------------------------------------------------------------------------<br>1 |3,596 | INVITE SDP ( telephone-event) | |SIP From: <a href="mailto:sip%3A4095@192.168.0.197">sip:4095@192.168.0.197</a> <a href="http://To:sip:voicemail4440@192.168.0.167:5060">To:sip:voicemail4440@192.168.0.167:5060</a><br>
| |(5060) ------------------> (5060) | |<br>1 |3,596 | 407 Proxy Authentication Required | |SIP Status<br> | |(5060) <------------------ (5060) | |<br>
1 |3,600 | ACK | | |SIP Request<br> | |(5060) ------------------> (5060) | |<br>1 |3,601 | INVITE SDP ( telephone-event) | |SIP From: <a href="mailto:sip%3A4095@192.168.0.197">sip:4095@192.168.0.197</a> <a href="http://To:sip:voicemail4440@192.168.0.167:5060">To:sip:voicemail4440@192.168.0.167:5060</a><br>
| |(5060) ------------------> (5060) | |<br>1 |3,608 | 100 trying -- your call is important to us | |SIP Status<br> | |(5060) <------------------ (5060) | |<br>
1 |3,608 | | INVITE SDP ( telephone-event) |SIP Request<br> | | |(5060) ------------------> (5060) |<br>1 |3,608 | | 404 Not Found |SIP Status<br>
| | |(5060) <------------------ (5060) |<br>1 |3,609 | | ACK | |SIP Request<br> | | |(5060) ------------------> (5060) |<br>
1 |3,614 | 404 Not Found | |SIP Status<br> | |(5060) <------------------ (5060) | |<br>1 |3,615 | ACK | | |SIP Request<br>
| |(5060) ------------------> (5060) | |<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/7/25 LAA <span dir="ltr"><<a href="mailto:ornitorrinco7424@gmail.com" target="_blank">ornitorrinco7424@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>OK, Daniel and thanks for your help,<br><br></div>I see that you don't append brach but you are calling route(RELAY) instead of t_relay() directly. I have tryed with this configuration within failure route:<div class="im">
<br>
<br>if (t_check_status("486|408")) {<br> <br></div> #revert_uri(); <br><div class="im"> 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=$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></div> #append_branch();<br> route(RELAY);<br> #t_relay();<br> <br> }<br>}<br><br></div>And kamailio gets into a strange behavior<br><br>|Time | 192.168.3.20 | 192.168.0.167 |<br>
| | | 192.168.0.197 | <br>|3,366 | 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,370 | 407 Proxy Authentication Required | |SIP Status<br>| |(5060) <------------------ (5060) | |<div class="im">
<br>
|3,380 | ACK | | |SIP Request<br>| |(5060) ------------------> (5060) | |<br></div>|3,382 | 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,393 | 100 trying -- your call is important to us | |SIP Status<br>| |(5060) <------------------ (5060) | |<br>
|3,394 | | INVITE SDP ( telephone-event) |SIP Request<br>| | |(5060) ------------------> (5060) |<br>|3,395 | | 100 Trying| |SIP Status<br>
| | |(5060) <------------------ (5060) |<br>|3,395 | | 486 Busy Here |SIP Status<br>| | |(5060) <------------------ (5060) |<br>
|3,398 | | ACK | |SIP Request<br>| | |(5060) ------------------> (5060) |<br>|3,416 | 500 I'm terribly sorry, server error occurred ...SL) | |SIP Status<br>
| |(5060) <------------------ (5060) | |<br>|3,416 | 486 Busy Here | |SIP Status<br>| |(5060) <------------------ (5060) | |<br>
|3,418 | ACK | | |SIP Request<br>| |(5060) ------------------> (5060) | |<br>|3,418 | ACK | | |SIP Request<br>
| |(5060) ------------------> (5060) | |<br>|3,872 | 486 Busy Here | |SIP Status<br>| |(5060) <------------------ (5060) | |<br>
|3,873 | ACK | | |SIP Request<br>| |(5060) ------------------> (5060) | |<br>|4,875 | 486 Busy Here | |SIP Status<br>
| |(5060) <------------------ (5060) | |<br>|4,876 | ACK | | |SIP Request<br>| |(5060) ------------------> (5060) | |<br>
<div><br><br></div><div>Are you using this sequence within failure route? or in the call routing section? I'm using this sequence in the route section that is working OK:<br><br>if ($rU=~"^voicemail.*") {<div class="im">
<br>
remove_hf("P-App-Name");<br> append_hf("P-App-Name: voicemail\r\n"); <br></div> append_hf("P-App-Param: mod=box;usr=$rU;dom=<a href="http://sipproxy.a.com" target="_blank">sipproxy.a.com</a>;uid=$rU;did=<a href="http://sipproxy.a.com" target="_blank">sipproxy.a.com</a>;\r\n"); <br>
<div class="im">
$ru = "sip:" + $rU + "@" + "<a href="http://192.168.0.197:5080" target="_blank">192.168.0.197:5080</a>"; <br></div> route(RELAY); <br> exit;<br> }<br><br></div><div>
The problem is when I try to get a call forwarded by kamailio to voice mail when it gets a busy message to the destination message. In your implementation are you expecting a 302 (temporary unavailable) message from the destination UAC?<br>
<br>Regards.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>L.<br></div><div><br><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">2013/7/25 Daniel Tryba <span dir="ltr"><<a href="mailto:daniel@pocos.nl" target="_blank">daniel@pocos.nl</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Thursday 25 July 2013 16:30:21 you wrote:<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><br>
> ;uid=$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>
</div>Taking a look at my config which I found to work after the long struggle you<br>
are experiencing right now.<br>
<br>
if($avp(dst_voicemail))<br>
{<br>
$du=$null;<br>
$ru = "sip:tovm-" + $avp(dst_voicemail) + "@" +<br>
$sel(cfg_get.voicemail.srv_ip) + ":" + $sel(cfg_get.voicemail.srv_port);<br>
route(RELAY);<br>
<br>
exit;<br>
}<br>
<br>
Which effectively sets $du to null (if not null the message would get relayed<br>
to the original destination (the proxy itself)) and rewrites $ru to something<br>
like<br>
"sip:tovm-0123456789@voicemail:5060"<br>
and then just do the normal relay route to deliver the message. Your *_hf<br>
shouldn't have any effect on routing.<br>
<div><div><br>
--<br>
<br>
POCOS B.V. - Croy 9c - 5653 LC Eindhoven<br>
Telefoon: 040 293 8661 - Fax: 040 293 8658<br>
<a href="http://www.pocos.nl/" target="_blank">http://www.pocos.nl/</a> - <a href="http://www.sipo.nl/" target="_blank">http://www.sipo.nl/</a><br>
K.v.K. Eindhoven 17097024<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>