[OpenSIPS-Users] Loading rpid_avp from auth
Julian Yap
julianokyap at gmail.com
Sun Feb 22 22:44:47 CET 2009
Sergio and OpenSIPS users,
Damn, I feel so stupid. Changing that modparam worked for me.
For those wondering, here is how I load it up:
if ($avp(s:rpid)) {
append_hf("P-Asserted-Identity: <sip:$avp(s:rpid)@$fd>\r\n");
};
One general question on AVP's. When I select AVP to have an integer
value 302 in the modparam statement, what is 302? Is that just an
arbitrary value? Or is value '302' preassigned somewhere? I'm
working from examples and AVP's are still kind of confusing.
- Julian
On Sun, Feb 22, 2009 at 8:08 AM, Sergio Gutierrez <saguti at gmail.com> wrote:
>
> Hi Julian.
>
> Are you using the syntax you pasted for modparam?
>
> Try the following syntax:
>
> modparam("auth|lcr", "rpid_avp", "$avp(i:302)")
>
> Regards.
>
> Sergio G.
>
>
> On Sun, Feb 22, 2009 at 7:36 AM, Julian Yap <julianokyap at gmail.com> wrote:
>>
>> Hi all,
>>
>> I'm intending on loading rpid_avp from auth. This will be used with a
>> P-Asserted-Identity header. I am storing the RPID in the 'rpid' of
>> the subscriber column of my database.
>>
>> I believe that s:rpid should then get loaded during authentication but
>> I think I'm missing something.
>>
>> Here is my module load line:
>> modparam("^auth$|lcr", "rpid_avp", "$avp(i:302)")
>>
>> Then later on, setting the $avp(i:302) manually works:
>> $avp(i:302) = "<sip:8085331000 at mysip.server.com>";
>> append_hf("P-Asserted-Identity: $avp(i:302)\r\n");
>>
>> Any clues here? Basically I want to eliminate the line where I'm
>> hard-coding in the $avp(i:302) value. I'm kinda confused with the
>> documentation and haven't found any examples.
>>
>> Thanks,
>> Julian
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> --
> Sergio Gutiérrez
>
More information about the Users
mailing list