Try something like this:
if (method=="INVITE") { if (!www_authorize("xxx.org", "subscriber")) { www_challenge("xxx.org", "0"); break; }; if (!check_from()) { sl_send_reply("403", "Only registered users are allowed"); break; };
};
.Daniel
On 03/26/04 12:48, Raymond Chen wrote:
Now we understand what the what the message means after reading the message a few times. We are trying to do PSTN(as5300) ---> ser -----> pstn (AS5300), and to authorize the calling number (callerid) in the INVITE message against URI table. But check_from command needs to call proxy_authorize, which it requires username and password. we setup the configuration like this
if (method=="INVITE" & proxy_authorize("xxx.org", "subscriber") if (!check_from()) { sl_send_reply("403", "Only registered users are allowed"); break; } }
Because cisco does not have sip password setting, so we have
0(3173) check_username(): No authorized credentials found (error in scripts) 0(3173) check_username(): Call {www,proxy}_authorize before calling check_* function !
Does anyone has a solution?
Regards
-----Original Message----- From: Daniel-Constantin Mierla [mailto:daniel@iptel.org] Sent: Friday, March 26, 2004 6:18 PM To: Raymond Chen Cc: serdev@lists.iptel.org Subject: Re: [Serdev] check_from
Hello, the last error message is self explanatory. You need to call either www_authorize() or proxy_authorize() before calling check_from() because this method compares the data from From header with what is in credentials (response to a authentication challenge).
.Daniel
On 03/26/04 04:35, Raymond Chen wrote:
Dear all,
We have configured Ser to check from username field to authorize user “unknown”
if (!check_from()) {
sl_send_reply("403", "Only registered users are allowed");
break;
};
We have error message
0(2568) check_username(): No authorized credentials found (error in scripts)
0(2568) check_username(): Call {www,proxy}_authorize before calling check_* function !
We have “unknown” username entry in uri table.
Regards
Serdev mailing list serdev@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serdev
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers