<div dir="ltr">No problem.<div><br></div><div>If that&#39;s all you want to do, then just include it within a route{} block and you should be good to go.</div><div><br></div><div>I will say, of that&#39;s all you want to do, when you &#39;load balance the invite to FS&#39;, FS will respond with a 100 trying - and at the minute your script will reply to FS with a 405..</div><div><br></div><div>Perhaps you should spend some time reading about SIP, as it&#39;ll help you more easily implement stuff on OpenSIPS</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 8, 2016 at 10:12 AM, Francjos <span dir="ltr">&lt;<a href="mailto:35633@heb.be" target="_blank">35633@heb.be</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thank you for redirecting me to the tutorial. I picked up a part of what i<br>
need,i think i can adjust it to my needs but the problem i still have is<br>
where to include the logic of load balancing in opensips.cfg. The logic is<br>
the following:<br>
<br>
 if (is_method(&quot;INVITE&quot;)) {<br>
                if (!load_balance(&quot;1&quot;,&quot;pstn&quot;,&quot;1&quot;)) {<br>
                        send_reply(&quot;503&quot;,&quot;Service Unavailable&quot;);<br>
                        exit;<br>
                }<br>
        }<br>
        else if (is_method(&quot;REGISTER&quot;)) {<br>
                if (!ds_select_dst(&quot;1&quot;, &quot;0&quot;)) {<br>
                        send_reply(&quot;503&quot;,&quot;Service Unavailable&quot;);<br>
                        exit;<br>
                }<br>
        }<br>
        else {<br>
                send_reply(&quot;405&quot;,&quot;Method Not Allowed&quot;);<br>
                exit;<br>
        }<br>
<br>
So that Opensips can routes calls to the write Freeswitch.<br>
<br>
Thanks again.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-SIP-trunk-call-handling-tp7602552p7602558.html" rel="noreferrer" target="_blank">http://opensips-open-sip-server.1449251.n2.nabble.com/Opensips-SIP-trunk-call-handling-tp7602552p7602558.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the OpenSIPS - Users mailing list archive at Nabble.com.<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" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div>