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");
On 17 June 2011 18:22, Alex Balashov abalashov@evaristesys.com wrote:
Carriers in Europe seem to still like to use it..
Great, thanks, will try later.
Brian
On 17 June 2011 18:22, Alex Balashov abalashov@evaristesys.com wrote:
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.
On 06/23/2011 12:58 PM, dotnetdub wrote:
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:
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:
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:
On 06/23/2011 05:52 PM, dotnetdub wrote:
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).