<div>Hi,</div>
<div>&nbsp;</div>
<div>I couldn&#39;t followup for a few days, sorry about that. But I am new to SER and couldn&#39;t get this up and running still. I tried a few options but couldn&#39;t get it working. Any config file which is working could be of great help for me. I&nbsp;did try to refer to many mails&nbsp;that most of the people have posted&nbsp;regarding the same&nbsp;query of Call forward not being working for &quot;no answer&quot; and &quot;busy&quot; but none of them help.
</div>
<div>&nbsp;</div>
<div>Thanks and Regards,</div>
<div>Ranganath B<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 5/22/07, <b class="gmail_sendername">Greger V. Teigre</b> &lt;<a href="mailto:greger@teigre.com">greger@teigre.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div text="#000000" bgcolor="#ffffff">Think of a branch as something that can be used and then must be discarded, so in failure route you must append a new branch. This is how SER keeps track of status for each.<br>The appending of branches works a bit strange unless you know how it works (a bit simplified): Each time you call append_branch(), a copy of the whole message (
i.e. transaction state) is copied and everything in there is inaccessible from ser.cfg. So, you need to change the request-uri before you append a branch. In regular route, if you want to parallel branch, you thus need to change the request-uri to where you want to branch, append_branch() and then change the request-uri to another destination. When the script hits t_reply(), two INVITEs will be sent.
<br><br>In failure route, the current transaction has failed and can thus not be forwarded again. You change the request-uri and then append_branch(). Now, as there is one failed and one new, only one will be sent when you hit t_reply(). If you want to add more parallel branches, you do the same: change request-uri, then append_branch(). Now you have three, where one has failed.
<br><br>So, after calling append_branch(), you have spun off a new branch,and are back to the original branch, regardless of where you are in the script.<br><br>Note that on_branch route in SER 2.0 is called once for each parallel branch, so you can do extra stuff there (but not change everything).
<br><span class="sg"><br>g-)</span> 
<div><span class="e" id="q_112b24054872bd28_2"><br><br>Ranganath B wrote: 
<blockquote type="cite">
<div>Hi Greger,</div>
<div>&nbsp;</div>
<div>Thanks for replying&nbsp;and your help.&nbsp;I was able to solve the issue. But now the call forward on no answer and busy&nbsp;are failing&nbsp;due to&nbsp;a different reason. I get the following error message on the /var/log/messages</div>

<div>&nbsp;</div>
<div>May 17 15:22:54 localhost /usr/local/sbin/ser[28719]: ERROR: t_forward_nonack: no branched for forwarding <br>May 17 15:22:54 localhost /usr/local/sbin/ser[28719]: ERROR: w_t_relay (failure mode): forwarding failed&nbsp; 
<br>May 17 15:22:54 localhost /usr/local/sbin/ser[28719]: ERROR: sl_reply_error used: I&#39;m terribly sorry, server error occurred (1/SL)</div>
<div>&nbsp;</div>
<div>I observed in one of the mailing list that the solution for this problem is to change the uri to the new, then append_branch. Any suggestions on how to do this? Please point me to the change that is needed to solve this issue. Here&#39;s the chunk of code for your reference from my 
ser.cfg:</div>
<div>&nbsp;</div>
<div><font size="2">
<p># -----------------------------------------------------------------</p>
<p># INVITE Message Handler</p>
<p># -----------------------------------------------------------------</p>
<p>if (client_nat_test(&quot;3&quot;)) {</p>
<p>setflag(7);</p>
<p>force_rport();</p>
<p>fix_nated_contact();</p>
<p>};</p>
<p>if (!allow_trusted()) {</p>
<p>if (!proxy_authorize(&quot;&quot;,&quot;subscriber&quot;)) {</p>
<p>proxy_challenge(&quot;&quot;,&quot;0&quot;);</p>
<p>break;</p>
<p>} else if (!check_from()) {</p>
<p>sl_send_reply(&quot;403&quot;, &quot;Use From=ID&quot;);</p>
<p>break;</p>
<p>};</p>
<p>consume_credentials();</p>
<p>};</p>
<p>if (uri=~&quot;^sip:1[0-9]{10}@&quot;) {</p>
<p>strip(1);</p>
<p>};</p>
<p>lookup(&quot;aliases&quot;);</p>
<p>if (!is_uri_host_local()) {</p>
<p>route(4);</p>
<p>route(1);</p>
<p>break;</p>
<p>};</p>
<p>if (uri=~&quot;^sip:011[0-9]*@&quot;) {</p>
<p>route(4);</p>
<p>route(5);</p>
<p>break;</p>
<p>};</p>
<p>if (avp_db_load(&quot;$ruri/username&quot;, &quot;s:callfwd&quot;)) {</p>
<p>setflag(22);</p>
<p>avp_pushto(&quot;$ruri&quot;, &quot;s:callfwd&quot;);</p>
<p>route(6);</p>
<p>break;</p>
<p>};</p>
<p>if (!lookup(&quot;location&quot;)) {</p>
<p>if (uri=~&quot;^sip:[0-9]{10}@&quot;) {</p>
<p>route(4);</p>
<p>route(5);</p>
<p>break;</p>
<p>};</p>
<p>sl_send_reply(&quot;404&quot;, &quot;User Not Found&quot;);</p>
<p>break;</p>
<p>};</p>
<p>if (avp_db_load(&quot;$ruri/username&quot;, &quot;s:fwdbusy&quot;)) {</p>
<p>if (!avp_check(&quot;s:fwdbusy&quot;, &quot;eq/$ruri/i&quot;)) {</p>
<p>setflag(26);</p>
<p>};</p>
<p>};</p>
<p>if (avp_db_load(&quot;$ruri/username&quot;, &quot;s:fwdnoanswer&quot;)) {</p>
<p>if (!avp_check(&quot;s:fwdnoanswer&quot;, &quot;eq/$ruri/i&quot;)) {</p>
<p>setflag(27);</p>
<p>};</p>
<p>};</p>
<p>t_on_failure(&quot;1&quot;);</p>
<p>route(4);</p>
<p>route(1);</p>
<p>}</p>
<p>route[4] {</p>
<p># -----------------------------------------------------------------</p>
<p># NAT Traversal Section</p>
<p># -----------------------------------------------------------------</p>
<p>if (isflagset(6) || isflagset(7)) {</p>
<p>if (!isflagset(8)) {</p>
<p>setflag(8);</p>
<p>use_media_proxy();</p>
<p>};</p>
<p>};</p>
<p>}</p>
<p>route[5] {</p>
<p># -----------------------------------------------------------------</p>
<p># PSTN Handler</p>
<p># -----------------------------------------------------------------</p>
<p>rewritehost(&quot;<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.0.2.245/" target="_blank">192.0.2.245</a>&quot;); # INSERT YOUR PSTN GATEWAY IP ADDRESS</p>
<p>avp_write(&quot;i:45&quot;, &quot;inv_timeout&quot;);</p>
<p>t_on_failure(&quot;1&quot;);</p>
<p>route(1);</p>
<p>}</p>
<p>route[6] {</p>
<p># ------------------------------------------------------------------------</p>
<p># Call Forwarding Reply Route Handler</p>
<p>#</p>
<p># This must be done as a route block because sl_send_reply() cannot be</p>
<p># called from the failure_route block</p>
<p># ------------------------------------------------------------------------</p>
<p>if (uri=~&quot;^sip:1[0-9]{10}@&quot;) {</p>
<p>strip(1);</p>
<p>};</p>
<p>lookup(&quot;aliases&quot;);</p>
<p>if (!is_uri_host_local()) {</p>
<p>if (!isflagset(22)) {</p>
<p>append_branch();</p>
<p>};</p>
<p>route(4);</p>
<p>route(1);</p>
<p>break;</p>
<p>};</p>
<p>if (uri=~&quot;^sip:011[0-9]*@&quot;) {</p>
<p>route(4);</p>
<p>route(5);</p>
<p>break;</p>
<p>};</p>
<p>if (!lookup(&quot;location&quot;)) {</p>
<p>if (uri=~&quot;^sip:[0-9]{10}@&quot;) {</p>
<p>route(4);</p>
<p>route(1);</p>
<p>break;</p>
<p>};</p>
<p>sl_send_reply(&quot;404&quot;, &quot;User Not Found&quot;);</p>
<p>};</p>
<p>route(4);</p>
<p>route(1);</p>
<p>}</p>
<p>onreply_route[1] {</p>
<p>if ((isflagset(6) || isflagset(7)) &amp;&amp; </p>
<p>(status=~&quot;(180)|(183)|2[0-9][0-9]&quot;)) {</p>
<p>if (!search(&quot;^Content-Length:[ ]*0&quot;)) {</p>
<p>use_media_proxy();</p>
<p>};</p>
<p>};</p>
<p>if (client_nat_test(&quot;1&quot;)) {</p>
<p>fix_nated_contact();</p>
<p>};</p>
<p>}</p>
<p>failure_route[1] {</p>
<p>if (t_check_status(&quot;487&quot;)) {</p>
<p>break;</p>
<p>};</p>
<p>if (isflagset(26) &amp;&amp; t_check_status(&quot;486&quot;)) {</p>
<p>if (avp_pushto(&quot;$ruri&quot;, &quot;s:fwdbusy&quot;)) {</p>
<p>avp_delete(&quot;s:fwdbusy&quot;);</p>
<p>resetflag(26);</p>
<p>route(6);</p>
<p>break;</p>
<p>};</p>
<p>};</p>
<p>if (isflagset(27) &amp;&amp; t_check_status(&quot;408&quot;)) {</p>
<p>if (avp_pushto(&quot;$ruri&quot;, &quot;s:fwdnoanswer&quot;)) {</p>
<p>avp_delete(&quot;s:fwdnoanswer&quot;);</p>
<p>resetflag(27);</p>
<p>route(6);</p>
<p>break;</p>
<p>};</p>
<p>};</p>
<p>end_media_session();</p>
<p>}</p></font></div>
<div>Thanks again,</div>
<div>Ranganath B</div>
<div>&nbsp;</div>
<div><br>&nbsp;</div>
<div><span class="gmail_quote">On 5/17/07, <b class="gmail_sendername">Greger Viken Teigre</b> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:greger@teigre.com" target="_blank">greger@teigre.com 
</a>&gt; wrote:</span> 
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Well, <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://ser.iptel.org/" target="_blank">
ser.iptel.org</a> does not exist in dns, so that&#39;s a uri that fails. Try a working uri. <br>g-)<br><br>------- Original message -------<br>From: Ranganath B &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:ranganath.b@gmail.com" target="_blank">
 ranganath.b@gmail.com</a>&gt;<br>Sent: 16.5.&#39;07,&nbsp;&nbsp;19:42<br><br>&gt; Hi,<br>&gt;<br>&gt; I could get the blind (unconditional) call forward option working with the configuration that is provided in the IPTEL website but using the same config file 
<br>and the ideas provided I couldn&#39;t get the call forward on busy and no answer working. I get the following error in the /var/log/messages:<br>&gt;<br>&gt; May 16 15:49:52 localhost /usr/local/sbin/ser[17563]: ERROR: mk_proxy: could not resolve hostname: &quot; 
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://ser.iptel.org/" target="_blank">ser.iptel.org</a>&quot;<br>&gt; May 16 15:49:52 localhost /usr/local/sbin/ser[17563]: ERROR: uri2proxy: bad host name in URI &lt; 
<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:sip:1234@ser.iptel.org" target="_blank">sip:1234@ser.iptel.org </a>&gt;<br>&gt; May 16 15:49:52 localhost /usr/local/sbin/ser[17563]: ERROR: t_forward_nonack: failure to add branches 
<br>&gt; May 16 15:49:52 localhost /usr/local/sbin/ser[17563]: ERROR: w_t_relay (failure mode): forwarding failed <br>&gt; May 16 15:49:52 localhost /usr/local/sbin/ser[17563]: error: mediaproxy/sendMediaproxyCommand(): can&#39;t connect to MediaProxy 
<br>&gt; May 16 15:49:52 localhost /usr/local/sbin/ser[17563]: ERROR: sl_reply_error used: I&#39;m terribly sorry, server error occurred (1/SL) <br>&gt;<br>&gt; It would be of great help if anybody provide me input on how to resolve this issue or a configuration file using which I can get the call forward on busy and 
<br>no response working. BTW, I am using the ser verison: 0.9.6 . I have populated an entry for call forward no answer/busy in the mysql database for the table<br>&quot;usr_preferences&quot;. Thanks in advance.<br>&gt;<br>
&gt; Regards,<br>&gt; Ranganath B<br><br></blockquote></div><br></blockquote></span></div></div></blockquote></div><br>