Hi,
I have some INVITES where the called number is in the P-Called-Party-ID header:
P-Called-Party-ID: sip:+123456789@sip-trunk.example.com;user=phone
Is there any function or variable where the user is stored or made available? In this case +123456789
Thanks, Benjamin
Hi Benjamin, looking for something like this ?
$var(user) = $(hdr(P-Called-Party-ID){s.replace,<,}{s.replace,>,}{uri.user})
*Paolo Visintin* evosip.cloud [image: Risultati immagini per evosip]
Il giorno ven 12 lug 2019 alle ore 13:24 Benjamin Tietz < btietzkamailio@gmail.com> ha scritto:
Hi,
I have some INVITES where the called number is in the P-Called-Party-ID header:
P-Called-Party-ID: sip:+123456789@sip-trunk.example.com;user=phone
Is there any function or variable where the user is stored or made available? In this case +123456789
Thanks, Benjamin _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hi Paolo,
I have something similar that I have to test:
$var(pcpid) = $hdr("P-Called-Party-ID") $var(pcpidu) = $(var(pcpid){re.subst,/^(.*)@/\1/}); $rU = $var(pcpidu)
But this will take some time now untli I can test our solutions :-)
Thanks!
Am Fr., 12. Juli 2019 um 14:48 Uhr schrieb * Paolo Visintin - evosip.cloud paolo.visintin@evosip.cloud:
Hi Benjamin, looking for something like this ?
$var(user) = $(hdr(P-Called-Party-ID){s.replace,<,}{s.replace,>,}{uri.user})
*Paolo Visintin* evosip.cloud [image: Risultati immagini per evosip]
Il giorno ven 12 lug 2019 alle ore 13:24 Benjamin Tietz < btietzkamailio@gmail.com> ha scritto:
Hi,
I have some INVITES where the called number is in the P-Called-Party-ID header:
P-Called-Party-ID: sip:+123456789@sip-trunk.example.com;user=phone
Is there any function or variable where the user is stored or made available? In this case +123456789
Thanks, Benjamin _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hi Benjamin, imho the string transformations provided by kamailio ( https://www.kamailio.org/wiki/cookbooks/5.1.x/transformations) allow you to use the magic {uri.xxxxx} that has a more elegant output !
Cheers
*Paolo Visintin* evosip.cloud [image: Risultati immagini per evosip]
Il giorno ven 12 lug 2019 alle ore 15:17 Benjamin Tietz < btietzkamailio@gmail.com> ha scritto:
Hi Paolo,
I have something similar that I have to test:
$var(pcpid) = $hdr("P-Called-Party-ID") $var(pcpidu) = $(var(pcpid){re.subst,/^(.*)@/\1/}); $rU = $var(pcpidu)
But this will take some time now untli I can test our solutions :-)
Thanks!
Am Fr., 12. Juli 2019 um 14:48 Uhr schrieb * Paolo Visintin - evosip.cloud paolo.visintin@evosip.cloud:
Hi Benjamin, looking for something like this ?
$var(user) = $(hdr(P-Called-Party-ID){s.replace,<,}{s.replace,>,}{uri.user})
*Paolo Visintin* evosip.cloud [image: Risultati immagini per evosip]
Il giorno ven 12 lug 2019 alle ore 13:24 Benjamin Tietz < btietzkamailio@gmail.com> ha scritto:
Hi,
I have some INVITES where the called number is in the P-Called-Party-ID header:
P-Called-Party-ID: sip:+123456789@sip-trunk.example.com;user=phone
Is there any function or variable where the user is stored or made available? In this case +123456789
Thanks, Benjamin _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users