I’ve come up with something that works:
$var(contact_uri) = $sel(contact.uri);
$var(tgrp) = $(var(contact_uri){param.value,tgrp});
Not sure if « $sel(contact.uri.params) » is supposed to work as I think it should…
De : sr-users <sr-users-bounces@lists.kamailio.org>
De la part de Chaigneau, Nicolas
Envoyé : vendredi 18 décembre 2020 15:08
À : Kamailio (SER) - Users Mailing List
Objet : [SR-Users] Trying to use $sel(contact.uri.params)
Hello,
I’d like to use a « select » as described here:
http://www.kamailio.org/wiki/cookbooks/5.4.x/selects#contactparams_s
I’m trying to extract a parameter from the Contact URI.
What I’ve tried to do:
xlog("L_INFO", "contact.uri: $sel(contact.uri)\n"); # OK
xlog("L_INFO", "contact.uri.params: $sel(contact.uri.params)\n"); # null ??
This does not seem to work… see output here :
3(10316) INFO: {1 INVITE r8wEHsAgxNIS5OJL} <script>: contact.uri:
sip:+33145678901;tgrp=YC031;trunk-context=YC90@10.31.22.2:5099
3(10316) INFO: {1 INVITE r8wEHsAgxNIS5OJL} <script>: contact.uri.params: <null>
What am I doing wrong ?
Maybe this is the wrong approach for what I’m trying to do ?
Regards,
Nicolas.