2010/4/22 Laszlo <[email protected]>

>
>
> 2010/4/22 dcomms <[email protected]>
>
>
>> Hi,
>> I have configure the load balancer as per opensips
>> http://www.opensips.org/Resources/DocsTutLoadbalancing
>>
>> My question is how can i forward registration requests to asterisk. What
>> am
>> i doing wrong
>>
>> Thanks
>>
>>
>> if (is_method("REGISTER"))   {
>>         # authenticate the REGISTER requests
>>         if (!www_authorize("", "subscriber")) {
>>             www_challenge("", "0");
>>             exit;
>>         }
>>
>>         if (!db_check_to()) {
>>             sl_send_reply("403","Forbidden auth ID");
>>             exit;
>>         }
>>
>>         # auth done -> send it to registrar
>>        consume_credentials();
>> #       rewritehostport("192.168.10.2:5060");
>>
>>  if (!save("location")) {
>>    log(1,"Location Error\n");
>>    sl_reply_error();
>>  };
>>
>>
>>        log(1,"Trying to Save location\n");
>>
>>
>>        t_relay();
>>
>>         exit;
>>     }
>>
>>
>>
>>
>
> Something like this:
>
>
> if (is_method("REGISTER"))   {
>             # authenticate the REGISTER requests
>             if (!www_authorize("", "subscriber")) {
>                 www_challenge("", "0");
>                 exit;
>             }
>
>             if (!db_check_to()) {
>                 sl_send_reply("403","Forbidden auth ID");
>                 exit;
>             }
>
>             # auth done -> send it to registrar
>            consume_credentials();
>            $du="sip:192.168.10.2:5060");
>

made a mistake here.
correctly it's: $du = "sip:192.168.10.2:5060";

           t_relay();
>            exit;
> }
>
>
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to