Discussion:
[OpenSIPS-Users] P-Asserted-ID
Sahil Gupta
2014-11-11 18:15:24 UTC
Permalink
Hi,
I'm trying to add P-Asserted-ID by default on one of our OpenSIPS
deployments.

In my config file I have:
$var(from)='sip:+'+$var(cid)+'@54.76.30.63';

$var(from)='sip:+'+$var(cid)+'@54.76.30.63';

route[PAID]{
if (is_present_hf("Remote-Party-ID")) {
remove_hf("Remote-Party-ID");
}
if (is_present_hf("P-Asserted-Identity")) {
remove_hf("P-Asserted-Identity");
}
if (is_present_hf("Privacy")) {
remove_hf("Privacy");
}
append_hf("P-Asserted-Identity: <+$var(from)>\r\n");
}

However, unless the CID is set with a + it doesn't seem to automatically
prefix the "+" sign.
--
Thanks,
Sahil
Răzvan Crainea
2014-11-12 09:09:45 UTC
Permalink
Hi, Sahil!

Are you sure the PAID function is called at all? The PAI header you are
adding contains an invalid URI, it is something like +sip:+***@54.76.30.63.
Try to add some xlogs in the PAID route to check if it is really called.

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com
Post by Sahil Gupta
Hi,
I'm trying to add P-Asserted-ID by default on one of our OpenSIPS
deployments.
<http://54.76.30.63>';
<http://54.76.30.63>';
route[PAID]{
if (is_present_hf("Remote-Party-ID")) {
remove_hf("Remote-Party-ID");
}
if (is_present_hf("P-Asserted-Identity")) {
remove_hf("P-Asserted-Identity");
}
if (is_present_hf("Privacy")) {
remove_hf("Privacy");
}
append_hf("P-Asserted-Identity: <+$var(from)>\r\n");
}
However, unless the CID is set with a + it doesn't seem to
automatically prefix the "+" sign.
--
Thanks,
Sahil
_______________________________________________
Users mailing list
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Sahil Gupta
2014-11-12 09:35:52 UTC
Permalink
Hi Razvan,
Thanks for getting back to me.

The code was:
$var(from)='sip:'+$var(cid)+'@54.76.30.63';

I modified it to become:
var(from)='sip:+'+$var(cid)+'@54.76.30.63';

The PAID function is definately being called as our far end carrier
receives the P-Asserted-ID but they don't see a "+" before the CLI unless
the caller sends it.

Thanks,
Sahil
Post by Răzvan Crainea
Hi, Sahil!
Are you sure the PAID function is called at all? The PAI header you are
.
Try to add some xlogs in the PAID route to check if it is really called.
Best regards,
Răzvan Crainea
OpenSIPS Solutionswww.opensips-solutions.com
Hi,
I'm trying to add P-Asserted-ID by default on one of our OpenSIPS
deployments.
route[PAID]{
if (is_present_hf("Remote-Party-ID")) {
remove_hf("Remote-Party-ID");
}
if (is_present_hf("P-Asserted-Identity")) {
remove_hf("P-Asserted-Identity");
}
if (is_present_hf("Privacy")) {
remove_hf("Privacy");
}
append_hf("P-Asserted-Identity: <+$var(from)>\r\n");
}
However, unless the CID is set with a + it doesn't seem to automatically
prefix the "+" sign.
--
Thanks,
Sahil
_______________________________________________
_______________________________________________
Users mailing list
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Thanks,
Sahil
Răzvan Crainea
2014-11-12 10:31:35 UTC
Permalink
I was pointing to the way you are building the header in append_hf()
function.

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com
Post by Sahil Gupta
Hi Razvan,
Thanks for getting back to me.
The PAID function is definately being called as our far end carrier
receives the P-Asserted-ID but they don't see a "+" before the CLI
unless the caller sends it.
Thanks,
Sahil
Hi, Sahil!
Are you sure the PAID function is called at all? The PAI header
you are adding contains an invalid URI, it is something like
Try to add some xlogs in the PAID route to check if it is really called.
Best regards,
Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com <http://www.opensips-solutions.com>
Post by Sahil Gupta
Hi,
I'm trying to add P-Asserted-ID by default on one of our OpenSIPS
deployments.
route[PAID]{
if (is_present_hf("Remote-Party-ID")) {
remove_hf("Remote-Party-ID");
}
if (is_present_hf("P-Asserted-Identity")) {
remove_hf("P-Asserted-Identity");
}
if (is_present_hf("Privacy")) {
remove_hf("Privacy");
}
append_hf("P-Asserted-Identity: <+$var(from)>\r\n");
}
However, unless the CID is set with a + it doesn't seem to
automatically prefix the "+" sign.
--
Thanks,
Sahil
_______________________________________________
Users mailing list
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Thanks,
Sahil
_______________________________________________
Users mailing list
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Sahil Gupta
2014-11-12 10:33:34 UTC
Permalink
The + before the $var(from) was removed.
Post by Răzvan Crainea
I was pointing to the way you are building the header in append_hf()
function.
Best regards,
Răzvan Crainea
OpenSIPS Solutionswww.opensips-solutions.com
Hi Razvan,
Thanks for getting back to me.
The PAID function is definately being called as our far end carrier
receives the P-Asserted-ID but they don't see a "+" before the CLI unless
the caller sends it.
Thanks,
Sahil
Post by Răzvan Crainea
Hi, Sahil!
Are you sure the PAID function is called at all? The PAI header you are
adding contains an invalid URI, it is something like +
Try to add some xlogs in the PAID route to check if it is really called.
Best regards,
Răzvan Crainea
OpenSIPS Solutionswww.opensips-solutions.com
Hi,
I'm trying to add P-Asserted-ID by default on one of our OpenSIPS
deployments.
route[PAID]{
if (is_present_hf("Remote-Party-ID")) {
remove_hf("Remote-Party-ID");
}
if (is_present_hf("P-Asserted-Identity")) {
remove_hf("P-Asserted-Identity");
}
if (is_present_hf("Privacy")) {
remove_hf("Privacy");
}
append_hf("P-Asserted-Identity: <+$var(from)>\r\n");
}
However, unless the CID is set with a + it doesn't seem to
automatically prefix the "+" sign.
--
Thanks,
Sahil
_______________________________________________
_______________________________________________
Users mailing list
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Thanks,
Sahil
_______________________________________________
_______________________________________________
Users mailing list
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Thanks,
Sahil
Kristian F. Høgh
2014-11-12 10:46:51 UTC
Permalink
Hi,

OK, you should have the following lines now (if I understand correctly)
var(from)='sip:+'+$var(cid)+'@54.76.30.63';
append_hf("P-Asserted-Identity: <$var(from)>\r\n");

I suggest you add xlog line after append_hf like:
xlog("P-Asserted-Identity: <$var(from)>");

Also run tcpdump/ngrep/sipgrep to capture a modified INVITE
Depending on your traffic load, you could try
tcpdump -nlevs0 -i eth1 udp port 5060 | grep "P-Asserted-Identity"

Send the output from xlog, and the matching line from tcpdump

Regards,
Kristian Høgh
Post by Sahil Gupta
The + before the $var(from) was removed.
Post by Răzvan Crainea
I was pointing to the way you are building the header in append_hf()
function.
Best regards,
Răzvan Crainea
OpenSIPS Solutionswww.opensips-solutions.com
Hi Razvan,
Thanks for getting back to me.
The PAID function is definately being called as our far end carrier
receives the P-Asserted-ID but they don't see a "+" before the CLI unless
the caller sends it.
Thanks,
Sahil
Post by Răzvan Crainea
Hi, Sahil!
Are you sure the PAID function is called at all? The PAI header you are
adding contains an invalid URI, it is something like +
Try to add some xlogs in the PAID route to check if it is really called.
Best regards,
Răzvan Crainea
OpenSIPS Solutionswww.opensips-solutions.com
Hi,
I'm trying to add P-Asserted-ID by default on one of our OpenSIPS
deployments.
route[PAID]{
if (is_present_hf("Remote-Party-ID")) {
remove_hf("Remote-Party-ID");
}
if (is_present_hf("P-Asserted-Identity")) {
remove_hf("P-Asserted-Identity");
}
if (is_present_hf("Privacy")) {
remove_hf("Privacy");
}
append_hf("P-Asserted-Identity: <+$var(from)>\r\n");
}
However, unless the CID is set with a + it doesn't seem to
automatically prefix the "+" sign.
--
Thanks,
Sahil
_______________________________________________
Users mailing
stinfo/users
_______________________________________________
Users mailing list
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Thanks,
Sahil
_______________________________________________
Users mailing
tinfo/users
_______________________________________________
Users mailing list
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Loading...