What you are do is wrong. You are forwarding leg B to Asterisk and at the same time telling leg A that destination not found. So its obvious that you will get 6xx response.<br><br>The right way to do it is set Asterisk as next destination in failure route and let asterisk play the IVR in 183 early media and then return congestion. So, call will again will be returned again in failure route where you will check that it came from you Asterisk server (and not from upstream carrier), so you change the congestion code 480 (or whatever you get from asterisk) to 404 not found and return to caller.<br>
<br>This way both caller and CDRs will get right call response.<br><br>Thank you.<br><br><br><div class="gmail_quote">On Sun, Oct 14, 2012 at 11:55 AM, Remco . <span dir="ltr"><<a href="mailto:remconl87@gmail.com" target="_blank">remconl87@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Max. That does the trick for the Asterisk part. However, calls are now returned with 603-declined. Anyone on how to make opensips wait for the message to complete, and then return 404?<br>
<br><div class="gmail_quote"><div><div class="h5">
On Sat, Oct 13, 2012 at 11:06 PM, Max Mühlbronner <span dir="ltr"><<a href="mailto:mm@42com.com" target="_blank">mm@42com.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">
<div link="blue" vlink="purple" lang="DE"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">regarding asterisk as media-server, you could use the “noanswer” option for playback(). Then it will signal audio via progress messages but will not answer (200 OK) the call.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Best Regards<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Max M.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Von:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a> [mailto:<a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a>] <b>Im Auftrag von </b>Remco .<br>
<b>Gesendet:</b> Samstag, 13. Oktober 2012 22:52<br><b>An:</b> OpenSIPS users mailling list<br><b>Betreff:</b> [OpenSIPS-Users] Route to media-server, but reply negative<u></u><u></u></span></p></div><div><div>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Hi all,<br><br>I have the following in the failure_route, for invalid destinations:<br><br> if(t_check_status("404")) {<br> # Dialed phone number does not exist<br>
<br> # Cancel call billing<br> resetflag(1);<br><br> # Start announcement<br> seturi("<a>sip:AN_invalidnumber@[ip of mediaserver]:5060</a>");<br>
t_relay();<br><br> #t_reply("404", "Not found");<br> exit;<br> }<br><br>When a 404 reply is received from upstream carrier(s) I would like to play an announcement to let the user know they made a mistake in the phone number.<br>
On the other hand, I would like those calls to show up as '404' in my statistics. Ideally the announcement should be played in the early media (don't know if that's possible with Asterisk as a media server?).<br>
The announcement works, however returns 200-OK. If I uncomment the 't_reply', the call is ended to soon without allowing the announcement to be played.<br><br>Does anyone how to solve this? I tried branching but I cannot get it to work.<br>
<br>Thanks,<br>Remco.<u></u><u></u></p></div></div></div></div><br></div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Muhammad Shahzad<br>-----------------------------------<br>CISCO Rich Media Communication Specialist (CRMCS)<br>CISCO Certified Network Associate (CCNA)<br>Cell: +92 334 422 40 88<br>
MSN: <a href="mailto:shari_786pk@hotmail.com">shari_786pk@hotmail.com</a><br>Email: <a href="mailto:shaheryarkh@googlemail.com">shaheryarkh@googlemail.com</a><br>