[OpenSIPS-Users] opensips with asterisk => relay REGISTER

Uwe Kastens kiste at kiste.org
Tue Sep 15 17:21:14 CEST 2009


Hello Bogdan,

Thank you for the example. In that case the asterisk have to accept the
registration without starting a auth itself?

BR

Uwe


Bogdan-Andrei Iancu schrieb:
> Hi Uwe,
> 
> If you look at the default opensips script, you have a section (by 
> default commented out) where the REGISTER requests are authenticated and 
> if passing the auth doing save("location").
> 
> What you have to do is, after the REGISTER auth, instead of pushing the 
> REGISTER to the local registrar (via save()), simply forward it further 
> to Asterisk:
> 
> 
>  if (is_method("REGISTER"))   {
>         # authenticate the REGISTER requests
>         if (!www_authorize("", "subscriber")) {
>             www_challenge("", "0");
>             exit;
>         }
>        
>         if (!check_to()) {
>             sl_send_reply("403","Forbidden auth ID");
>             exit;
>         }
> 
>         # auth done -> send it to registrar
>         consume_credentials();
>         $du = "sip:ASTERISK_IP:ASTERISK_PORT";
>         t_relay();
> 
>         exit;
>     }
> 
> 
> Regards,
> Bogdan
> 
> 
> Uwe Kastens wrote:
>> Hello,
>>
>> Has anybody a starting point for me to achieve the following:
>>
>> UAC should register with asterisk put should be "pre-authorized" with
>> opensips. I saw an EMail from Bogdan, that this should be possible but
>> ATM I could only use opensips as a registrar or route all sip messages
>> through opensips.
>>
>> Anyone has maybe a hint where to start or maybe an example?
>>
>> BR
>>
>> Uwe
>>
>>   
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-- 

kiste lat: 54.322684, lon: 10.13586



More information about the Users mailing list