[SR-Users] Extract user from AOR

Daniel-Constantin Mierla miconda at gmail.com
Wed Sep 25 12:53:44 CEST 2019


Hello,

likely it is a result of not having a proper sip address, prefix the
value with "sip:" and give it another try...

Cheers,
Daniel

On 24.09.19 19:45, Grant Bagdasarian wrote:
> Hello,
>
> I've been trying to extract the user part from an AoR using
> transformations in Python (KEMI), but without success.
>
> The reg_fetch_contacts function has been called successfully before
> trying to access the AoR.
>
> None of the below statements work for me. They all return None.
>
> user = _.pv.get("$(ulc(profile=>aor){uri.user})")
> user = _.pv.get("$(ulc(profile=>aor){tobody.user})")
>
> or
>
> _.pv.sets("$var(aor)", _.pv.get("$(ulc(profile=>aor))"))
> user = _.pv.get("$(var(aor){tobody.user})")
> user = _.pv.get("$(var(aor){uri.user})")
>
> I'm not sure what's causing the None result.
> Could it be the curly braces being used for string interpolation in Python?
> Or are these transformations not able to extract the value since the
> AoR has the following format: user at domain?
>
> If the same can be accomplished in another way, please let me know.
>
> Regards,
>
> Grant
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- https://asipto.com/u/kat




More information about the sr-users mailing list