[OpenSIPS-Users] Script to get attr_avp from caller. How to do?
Răzvan Crainea
razvan at opensips.org
Thu Jun 16 10:58:05 CEST 2016
Hi, Rodrigo!
You can do something like this:
lookup("location","","$fu"); # note that this might fail, so you'll have
to treat this separately
$avp(caller_attr) = $avp(attr); # note that the caller might have
multiple contacts/attributes, so you'll have to handle this
Then continue with your logic, call lookup("location") and will load the
attributes of the callee, per branch, as in your snippet.
Regards,
Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com
On 06/15/2016 09:36 PM, Rodrigo Pimenta Carvalho wrote:
>
> Hi.
>
>
> In my script I use to use AVP to store specific additional information
> for each registration.
>
> When I have to get the attr_avp (Module Registrar) from the callee,
> during a call, I use to codify:
>
>
> branch_route[per_branch_ops] {
>
> myVariable = $(avp(attr)[$T_branch_idx]
>
> }
>
>
> What about the caller? I also need to get the attr_avp from caller, but
> I can't find a similar code in OpenSIPS documentation. How to do?
>
>
> P.S.: I'm using the configuration: modparam("usrloc", "db_mode", 0)
>
>
> Any hint will be very helpful!
>
> Best regards.
>
>
> RODRIGO PIMENTA CARVALHO
> Inatel Competence Center
> Software
> Ph: +55 35 3471 9200 RAMAL 979
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
More information about the Users
mailing list