On Tue, Aug 29, 2006 at 04:47:14PM -0300, Daniel Mirrha Santos wrote:
Seems you are in wrong mail list, because you use OpenSer :-) Our list is
only for Iptel SER.
Ok, I have some ifs separating the traffic by the
called number, and I want
to use the credentials for each called number (like mobile, long distance),
like a public switch.
As I told you in the last mail, you should to use "proxy_authorize" before
your code:
if(!proxy_authorize("my_realm.com", "subscriber"))
{
proxy_challenge("my_realm.com", "0");
break;
}
if
(uri=~"^sip:[0][1-9][0-9][7-9][0-9][0-9][0-9][0-9].*@.*")
{
if(!is_user_in("credentials", "vc23")) {
sl_send_reply("403", "Sem direito para
efetuar chamadas VC2 e VC3");
break;
};
consume_credentials();
strip(1);
prefix("55");
route(10);
break;
};
if
(uri=~"^sip:[7-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].*@.*") {
if(!is_user_in("credentials", "vc1")) {
sl_send_reply("403", "Sem direito para
efetuar chamadas VC1");
break;
};
consume_credentials();
prefix("5511");
route(10);
break;
};
It stops working suddenly, and I don't know why.
-----Mensagem original-----
De: Alexandr Dubovikov [mailto:shurik@start4.info]
Enviada em: ter?a-feira, 29 de agosto de 2006 16:30
Para: Daniel Mirrha Santos
Cc: 'Ser'
Assunto: Re: [Serusers] Error with credentials
On Tue, Aug 29, 2006 at 02:32:10PM -0300, Daniel Mirrha Santos wrote:
Does anybody know what is this error about
"is_user_in(): No
authorized credentials found (error in scripts)"?
do u mean "is_user()" ?
anyway you don't have credentials in this SIP message. "is_user()" should
be
call after "proxy_authorize()" or "www_challenge()". Please check
module
"auth_db".
Thanks,
Daniel
_______________________________________________
Serusers mailing list
Serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
Wbr,
--
Alexandr Dubovikov * baron@iRC RusNet * mailto:shurik@start4.info
AD1-UANIC * ICQ: 122351182 *
http://www.start4.info
--
Alexandr Dubovikov * baron@iRC RusNet * mailto:shurik@start4.info
AD1-UANIC * ICQ: 122351182 *
http://www.start4.info