Hi All,
If an endpoint is sending us the remote party ID header, I know how to extract $(re{uri.user}) - how would I check if the Privacy Flag was true in Kamailio script?
Version 1.41
Thanks, Brian
Brian,
Remote-Party-ID is a long-obsolete draft that never became an RFC; why are you still using it?
Anyway, if you know the 'privacy' header parameter will always be there, you can do this, assuming is_present_hf("Remote-Party-ID"), of course.
$var(x) = $(hdr(Remote-Party-ID){s.select,1,>});
xlog("L_INFO", "Remote Party ID privacy value: $(var(x){param.value,privacy})\n");
RPID header is sent by linksys/sipura ATAs... I have a lot of headaches with those wide spread ATAs here in USA... PAP series are OK, but SPA series send RPID.
On Friday 17 June 2011, Alex Balashov wrote:
Brian,
Remote-Party-ID is a long-obsolete draft that never became an RFC; why are you still using it?
Anyway, if you know the 'privacy' header parameter will always be there, you can do this, assuming is_present_hf("Remote-Party-ID"), of course.
$var(x) = $(hdr(Remote-Party-ID){s.select,1,>}); xlog("L_INFO", "Remote Party ID privacy value:
$(var(x){param.value,privacy})\n");
On 17 June 2011 18:22, Alex Balashov abalashov@evaristesys.com wrote:
Brian,
Remote-Party-ID is a long-obsolete draft that never became an RFC; why are you still using it?
Carriers in Europe seem to still like to use it..
Anyway, if you know the 'privacy' header parameter will always be there, you can do this, assuming is_present_hf("Remote-Party-**ID"), of course.
$var(x) = $(hdr(Remote-Party-ID){s.**select,1,>});
xlog("L_INFO", "Remote Party ID privacy value: $(var(x){param.value,privacy})**\n");
Great, thanks, will try later.
Brian
-- Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/
______________________________**_________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**usershttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 17 June 2011 18:22, Alex Balashov abalashov@evaristesys.com wrote:
Brian,
Remote-Party-ID is a long-obsolete draft that never became an RFC; why are you still using it?
Anyway, if you know the 'privacy' header parameter will always be there, you can do this, assuming is_present_hf("Remote-Party-**ID"), of course.
$var(x) = $(hdr(Remote-Party-ID){s.**select,1,>});
xlog("L_INFO", "Remote Party ID privacy value: $(var(x){param.value,privacy})**\n");
Hi Alex,
This doesn't seem to be working for me..
/sbin/kamailio[25291]: INFO: <script>: Remote Party ID privacy value:
From the initial invite: Remote-Party-ID: <sip:1234567@domain.ie
;privacy=full;screen=no>
Let me know if I'm doing something wrong.
Thanks Brian.
-- Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/
______________________________**_________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**usershttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 06/23/2011 12:58 PM, dotnetdub wrote:
On 17 June 2011 18:22, Alex Balashov <abalashov@evaristesys.com mailto:abalashov@evaristesys.com> wrote:
Brian, Remote-Party-ID is a long-obsolete draft that never became an RFC; why are you still using it? Anyway, if you know the 'privacy' header parameter will always be there, you can do this, assuming is_present_hf("Remote-Party-__ID"), of course. $var(x) = $(hdr(Remote-Party-ID){s.__select,1,>}); xlog("L_INFO", "Remote Party ID privacy value: $(var(x){param.value,privacy})__\n");
Hi Alex,
This doesn't seem to be working for me..
/sbin/kamailio[25291]: INFO: <script>: Remote Party ID privacy value:
From the initial invite: Remote-Party-ID: <sip:1234567@domain.ie mailto:sip%3A1234567@domain.ie;privacy=full;screen=no>
Let me know if I'm doing something wrong.
Oh, 'privacy' is a URI parameter, not a header parameter. (it's inside the angle-brackets). That calls for a different approach:
$var(privacy) = $(hdr(Remote-Party_ID){uri.param,privacy});
Hi Alex,
On 23 June 2011 22:00, Alex Balashov abalashov@evaristesys.com wrote:
$(hdr(Remote-Party_ID){uri.**param,privacy});
Still not working..
ERROR: <core> [lvalue.c:351]: non existing right pvar assignment failed at pos: (110,13-110,54) INFO: <script>: Remote Party ID privacy value:
Thanks, Brian
On 06/23/2011 05:37 PM, dotnetdub wrote:
Hi Alex,
On 23 June 2011 22:00, Alex Balashov <abalashov@evaristesys.com mailto:abalashov@evaristesys.com> wrote:
$(hdr(Remote-Party_ID){uri.__param,privacy});
Still not working..
ERROR: <core> [lvalue.c:351]: non existing right pvar assignment failed at pos: (110,13-110,54) INFO: <script>: Remote Party ID privacy value:
Yeah, there's a typo there on my part. Remote-Party-ID instead of Remote-Party_ID.
On 23 June 2011 22:39, Alex Balashov abalashov@evaristesys.com wrote:
On 06/23/2011 05:37 PM, dotnetdub wrote:
Hi Alex,
On 23 June 2011 22:00, Alex Balashov <abalashov@evaristesys.com <mailto:abalashov@evaristesys.**com abalashov@evaristesys.com>> wrote:
$(hdr(Remote-Party_ID){uri.__**param,privacy});
Still not working..
ERROR: <core> [lvalue.c:351]: non existing right pvar assignment failed at pos: (110,13-110,54) INFO: <script>: Remote Party ID privacy value:
Yeah, there's a typo there on my part. Remote-Party-ID instead of Remote-Party_ID.
Thanks.
Just tried again.
$var(x) = $(hdr(Remote-Party-ID){uri.param,privacy}); xlog("L_INFO", "Remote Party ID privacy value: $(var(x){param.value,privacy})\n");
ERROR: pv [pv_trans.c:522]: invalid uri [sip:1234567@domain.ie ;privacy=full;screen=no] /sbin/kamailio[27389]: ERROR: <core> [lvalue.c:351]: non existing right pvar /sbin/kamailio[27389]: ERROR: <core> [lvalue.c:411]: assignment failed at pos: (110,13-110,54) /sbin/kamailio[27389]: INFO: <script>: Remote Party ID privacy value:
-- Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/
______________________________**_________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**usershttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 06/23/2011 05:52 PM, dotnetdub wrote:
ERROR: pv [pv_trans.c:522]: invalid uri [<sip:1234567@domain.ie mailto:sip%3A1234567@domain.ie;privacy=full;screen=no>] /sbin/kamailio[27389]: ERROR: <core> [lvalue.c:351]: non existing right pvar /sbin/kamailio[27389]: ERROR: <core> [lvalue.c:411]: assignment failed at pos: (110,13-110,54) /sbin/kamailio[27389]: INFO: <script>: Remote Party ID privacy value:
Oh, I guess uri.params operates on a bare URI, rather than parsing it out of a larger header. That's kind of obvious, in retrospect, but for some reason wasn't intuitive to me. Anyway, try it on just the URI:
$var(x) = $(re{uri.param,privacy});
Second, make sure you're printing the value of $var(x).
On 23 June 2011 22:55, Alex Balashov abalashov@evaristesys.com wrote:
On 06/23/2011 05:52 PM, dotnetdub wrote:
ERROR: pv [pv_trans.c:522]: invalid uri [<sip:1234567@domain.ie
<mailto:sip%3A1234567@domain.**ie sip%253A1234567@domain.ie
;privacy=full;screen=no>]
/sbin/kamailio[27389]: ERROR: <core> [lvalue.c:351]: non existing right pvar /sbin/kamailio[27389]: ERROR: <core> [lvalue.c:411]: assignment failed at pos: (110,13-110,54) /sbin/kamailio[27389]: INFO: <script>: Remote Party ID privacy value:
Oh, I guess uri.params operates on a bare URI, rather than parsing it out of a larger header. That's kind of obvious, in retrospect, but for some reason wasn't intuitive to me. Anyway, try it on just the URI:
$var(x) = $(re{uri.param,privacy});
Second, make sure you're printing the value of $var(x).
Thanks
Works perfectly.
-- Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/
______________________________**_________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**usershttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users