[Kamailio-Users] Kamailio 3.0.1
dotnetdub
dotnetdub at gmail.com
Thu Mar 25 22:53:59 CET 2010
Attached:
if(is_uri_host_local()) {
if(!allow_trusted()) {
if(!proxy_authorize("", "subscriber")) {
proxy_challenge("", "1");
exit;
}
else if(!check_from()) {
sl_send_reply("403", "Forbidden");
exit;
}
}
else {
sl_send_reply("403", "Forbidden");
exit;
}
}
append_rpid_hf();
consume_credentials();
On 25 March 2010 21:51, Alex Balashov <abalashov at evaristesys.com> wrote:
> Can you paste the (relatively complete) code block in which all this takes
> place in order to provide context?
>
>
> On 03/25/2010 05:49 PM, dotnetdub wrote:
>
> Hi Alex,
>>
>> I moved it to before the consume_credentials() in my route script:
>>
>> The sequence:
>>
>> if(!proxy_authorize("" {
>>
>> SCRIPT SCRIPT
>>
>> append_rpid_hf();
>>
>> consume_credentials();
>>
>>
>> Still getting:
>>
>> sip[6820]: DEBUG: auth [rpid.c:177]: no rpid AVP
>>
>> This worked perfectly in kamailio 1.x.x
>>
>>
>> Stephen.
>>
>>
>>
>>
>> On 25 March 2010 21:33, Alex Balashov <abalashov at evaristesys.com
>> <mailto:abalashov at evaristesys.com>> wrote:
>>
>> On 03/25/2010 05:32 PM, dotnetdub wrote:
>>
>> Hi Alex,
>>
>> Do I need to do something different in the script to 1.5.3 ? As
>> you can
>> see from my first mail I am loading the avp from the DB as before.
>>
>> I just did this in my route:
>>
>> xlog("L_INFO", "[ROUTE-4 ->] rpid test: $avp(s:rpid) ");
>>
>> Result:
>>
>> INFO: <script>: [ROUTE-4 ->] rpid test: <null>
>>
>> Not sure what I'm missing here:
>>
>> # auth
>>
>> modparam("auth", "rpid_avp", "$avp(s:rpid)")
>>
>> My subscriber table has column rpid and value is valid for this
>> subscriber.
>>
>>
>> Those AVPs are only loaded when www_authorize()/proxy_authorize() is
>> called. Make sure you are doing append_rpid_hf() before
>> consume_credentials(), also.
>>
>>
>> --
>> Alex Balashov - Principal
>> Evariste Systems LLC
>>
>> Tel : +1 678-954-0670
>> Direct : +1 678-954-0671
>> Web : http://www.evaristesys.com/
>>
>>
>>
>
> --
> Alex Balashov - Principal
> Evariste Systems LLC
>
> Tel : +1 678-954-0670
> Direct : +1 678-954-0671
> Web : http://www.evaristesys.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/users/attachments/20100325/44dd1da1/attachment.htm>
More information about the Users
mailing list