[Spce-user] Rewrite Rules for P-Asserted-Identity(cli)

Daniel Grotti dgrotti at sipwise.com
Tue Nov 5 10:34:17 EST 2013


Hi,

if you need to change only PAI and only for one peer, you can change you
/etc/ngcpc-onfig/templates/etc/kamailio/proxy/proxy.cfg.customtt.tt2
change the default :


if($var(ccli_user) != 0)
                {
                        $var(caller_uri) = "sip:" + $var(ccli_user) +
"@" + $var(ccli_domain);
                        xlog("L_NOTICE", "Setting PAI to
'<$var(caller_uri)>' - [% logreq -%]\n");
                        append_hf("P-Asserted-Identity:
<$var(caller_uri)>\r\n");
                }



with something like:


if($var(ccli_user) != 0)
        {
            if($rd == "DOMAIN_OF_YOUR_TARGET_HOST")
            {
                $var(caller_uri) = "sip:" + "YOUR_PREFIX" +
$var(ccli_user) + "@" + $var(ccli_domain);
            }
            else
            {
                $var(caller_uri) = "sip:" + $var(ccli_user) + "@" +
$var(ccli_domain);
            }
            xlog("L_NOTICE", "Setting PAI to '<$var(caller_uri)>' - [%
logreq -%]\n");
            append_hf("P-Asserted-Identity: <$var(caller_uri)>\r\n");
        }



So if the domain part is your target host you will prefix YOUR_PREFIX,
else do the default stuff.

Daniel






On 11/05/2013 04:18 PM, Barry Flanagan wrote:
> Hi
> 
> You can specify where the PAI header is taken from using
> the outbound_pai_user setting. You should then be able to for example
> manipulate the From: header then use that for the PAI.
> 
> Hope this helps.
> 
> -Barry Flanagan
> 
> -Barry Flanagan
> 
> 
> 
> 
> 
> 
> 
> On 5 November 2013 15:04, Martin Stix <ms at pluteus.at
> <mailto:ms at pluteus.at>> wrote:
> 
>     Hi!
> 
>     ____
> 
>     On of my peers needs an prefix placed in front of
>     P-Asserted-Identity.____
> 
>     So rewrite rules only address from and to headers, how can I let
>     p-asserted-identity be rewritten?____
> 
>     __ __
> 
>     Does spce forward p-asserted-identity from client if needed?____
> 
>     __ __
> 
>     Thanks____
> 
>     __ __
> 
>     __ __
> 
>     mit freundlichen Grüßen
>     best regards____
> 
>     *Martin Stix____*
> 
>     CEO
>     pluteus communication solutions
>     ms at pluteus.at <mailto:ms at pluteus.at>____
> 
>     www.pluteus.at <http://www.pluteus.at>____
> 
>     Dampfsägestraße 17
>     3300 Amstetten
>     Austria
>     tel.: +43 7472 28165 20 <tel:%2B43%207472%2028165%2020>
>     fax.: +43 7472 28165 22 <tel:%2B43%207472%2028165%2022>____
> 
>     __ __
> 
> 
>     _______________________________________________
>     Spce-user mailing list
>     Spce-user at lists.sipwise.com <mailto:Spce-user at lists.sipwise.com>
>     http://lists.sipwise.com/listinfo/spce-user
> 
> 
> 
> 
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> http://lists.sipwise.com/listinfo/spce-user
> 




More information about the Spce-user mailing list