<br><br><div class="gmail_quote">2010/4/22 dcomms <span dir="ltr">&lt;<a href="mailto:info@dcomms.net">info@dcomms.net</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Hi,<br>
I have configure the load balancer as per opensips<br>
<a href="http://www.opensips.org/Resources/DocsTutLoadbalancing" target="_blank">http://www.opensips.org/Resources/DocsTutLoadbalancing</a><br>
<br>
My question is how can i forward registration requests to asterisk. What am<br>
i doing wrong<br>
<br>
Thanks<br>
<br>
<br>
if (is_method(&quot;REGISTER&quot;))   {<br>
         # authenticate the REGISTER requests<br>
         if (!www_authorize(&quot;&quot;, &quot;subscriber&quot;)) {<br>
             www_challenge(&quot;&quot;, &quot;0&quot;);<br>
             exit;<br>
         }<br>
<br>
         if (!db_check_to()) {<br>
             sl_send_reply(&quot;403&quot;,&quot;Forbidden auth ID&quot;);<br>
             exit;<br>
         }<br>
<br>
         # auth done -&gt; send it to registrar<br>
        consume_credentials();<br>
#       rewritehostport(&quot;<a href="http://192.168.10.2:5060" target="_blank">192.168.10.2:5060</a>&quot;);<br>
<br>
 if (!save(&quot;location&quot;)) {<br>
    log(1,&quot;Location Error\n&quot;);<br>
    sl_reply_error();<br>
  };<br>
<br>
<br>
        log(1,&quot;Trying to Save location\n&quot;);<br>
<br>
<br>
        t_relay();<br>
<br>
         exit;<br>
     }<br>
<font color="#888888"><br>
<br></font></blockquote><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><font color="#888888">  <br></font></blockquote><div><br>Something like this:<br>
<br>if (is_method(&quot;REGISTER&quot;))   {<br>            # authenticate the REGISTER requests<br>            if (!www_authorize(&quot;&quot;, &quot;subscriber&quot;)) {<br>                www_challenge(&quot;&quot;, &quot;0&quot;);<br>
                exit;<br>            }<br><br>            if (!db_check_to()) {<br>                sl_send_reply(&quot;403&quot;,&quot;Forbidden auth ID&quot;);<br>                exit;<br>            }<br><br>            # auth done -&gt; send it to registrar<br>
           consume_credentials();<br>           $du=&quot;sip:<a href="http://192.168.10.2:5060">192.168.10.2:5060</a>&quot;);<br>           t_relay();<br>           exit;<br>} <br></div></div><br><div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup">
</div><style type="text/css">#avg_ls_inline_popup {  position:absolute;  z-index:9999;  padding: 0px 0px;  margin-left: 0px;  margin-top: 0px;  width: 240px;  overflow: hidden;  word-wrap: break-word;  color: black;  font-size: 10px;  text-align: left;  line-height: 13px;}</style>