<br><br><div class="gmail_quote">2010/4/22 Laszlo <span dir="ltr"><<a href="mailto:laszlo@voipfreak.net">laszlo@voipfreak.net</a>></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><br><div class="gmail_quote">2010/4/22 dcomms <span dir="ltr"><<a href="mailto:info@dcomms.net" target="_blank">info@dcomms.net</a>></span><div class="im"><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("REGISTER")) {<br>
# authenticate the REGISTER requests<br>
if (!www_authorize("", "subscriber")) {<br>
www_challenge("", "0");<br>
exit;<br>
}<br>
<br>
if (!db_check_to()) {<br>
sl_send_reply("403","Forbidden auth ID");<br>
exit;<br>
}<br>
<br>
# auth done -> send it to registrar<br>
consume_credentials();<br>
# rewritehostport("<a href="http://192.168.10.2:5060" target="_blank">192.168.10.2:5060</a>");<br>
<br>
if (!save("location")) {<br>
log(1,"Location Error\n");<br>
sl_reply_error();<br>
};<br>
<br>
<br>
log(1,"Trying to Save location\n");<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><div><br>Something like this:<div class="im">
<br>
<br>if (is_method("REGISTER")) {<br> # authenticate the REGISTER requests<br> if (!www_authorize("", "subscriber")) {<br> www_challenge("", "0");<br>
exit;<br> }<br><br> if (!db_check_to()) {<br> sl_send_reply("403","Forbidden auth ID");<br> exit;<br> }<br><br> # auth done -> send it to registrar<br>
consume_credentials();<br></div> $du="sip:<a href="http://192.168.10.2:5060" target="_blank">192.168.10.2:5060</a>");<br></div></div></blockquote><div><br>made a mistake here.<br>correctly it's: $du = "sip:<a href="http://192.168.10.2:5060">192.168.10.2:5060</a>"; <br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="gmail_quote"><div> t_relay();<br> exit;<br>} <br></div>
</div><br><div style="display: inline;">
</div>
</blockquote></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>