<br>Hi Julian.<br><br><div class="gmail_quote">On Sun, Feb 22, 2009 at 4:44 PM, Julian Yap <span dir="ltr"><<a href="mailto:julianokyap@gmail.com">julianokyap@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Sergio and OpenSIPS users,<br>
<br>
Damn, I feel so stupid. Changing that modparam worked for me.<br>
</blockquote><div><br>Do not worry; these things are a continuous learning process.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
For those wondering, here is how I load it up:<br>
if ($avp(s:rpid)) {<br>
append_hf("P-Asserted-Identity: <sip:$avp(s:rpid)@$fd>\r\n");<br>
};<br>
<br>
One general question on AVP's. When I select AVP to have an integer<br>
value 302 in the modparam statement, what is 302? Is that just an<br>
arbitrary value? Or is value '302' preassigned somewhere? I'm<br>
working from examples and AVP's are still kind of confusing.<br>
<font color="#888888"></font></blockquote><div><br>302 is just an index; when you define an AVP, you could name it with a string or with a integer; you choose at your will the integer index or the string you use; AVP with integer indexes are faster to handle within OpenSIPS Core; AVP with String names are easier to remember for Script writer.<br>
<br>You cand find more information about AVP's at:<br><br><a href="http://www.voice-system.ro/docs/avpops/index.html">http://www.voice-system.ro/docs/avpops/index.html</a><br><a href="http://www.opensips.org/html/docs/modules/1.4.x/avpops.html">http://www.opensips.org/html/docs/modules/1.4.x/avpops.html</a><br>
<br>Feel free to keep asking about anything you do not understand well.<br><br>Best regards.<br><br>Sergio.<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font color="#888888"><br>
- Julian<br>
</font><div><div></div><div class="Wj3C7c"><br>
On Sun, Feb 22, 2009 at 8:08 AM, Sergio Gutierrez <<a href="mailto:saguti@gmail.com">saguti@gmail.com</a>> wrote:<br>
><br>
> Hi Julian.<br>
><br>
> Are you using the syntax you pasted for modparam?<br>
><br>
> Try the following syntax:<br>
><br>
> modparam("auth|lcr", "rpid_avp", "$avp(i:302)")<br>
><br>
> Regards.<br>
><br>
> Sergio G.<br>
><br>
><br>
> On Sun, Feb 22, 2009 at 7:36 AM, Julian Yap <<a href="mailto:julianokyap@gmail.com">julianokyap@gmail.com</a>> wrote:<br>
>><br>
>> Hi all,<br>
>><br>
>> I'm intending on loading rpid_avp from auth. This will be used with a<br>
>> P-Asserted-Identity header. I am storing the RPID in the 'rpid' of<br>
>> the subscriber column of my database.<br>
>><br>
>> I believe that s:rpid should then get loaded during authentication but<br>
>> I think I'm missing something.<br>
>><br>
>> Here is my module load line:<br>
>> modparam("^auth$|lcr", "rpid_avp", "$avp(i:302)")<br>
>><br>
>> Then later on, setting the $avp(i:302) manually works:<br>
>> $avp(i:302) = "<<a href="mailto:sip%3A8085331000@mysip.server.com">sip:8085331000@mysip.server.com</a>>";<br>
>> append_hf("P-Asserted-Identity: $avp(i:302)\r\n");<br>
>><br>
>> Any clues here? Basically I want to eliminate the line where I'm<br>
>> hard-coding in the $avp(i:302) value. I'm kinda confused with the<br>
>> documentation and haven't found any examples.<br>
>><br>
>> Thanks,<br>
>> Julian<br>
>><br>
>> _______________________________________________<br>
>> Users mailing list<br>
>> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
>> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
><br>
><br>
> --<br>
> Sergio Gutiérrez<br>
><br>
</div></div></blockquote></div>