From miconda@gmail.com Wed Nov 1 16:53:22 2017 From: Daniel-Constantin Mierla To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] Reading the P-Assserted-identity header Date: Wed, 01 Nov 2017 16:53:13 +0100 Message-ID: In-Reply-To: <20171101153417.GB22077@tlaquepaque.localdomain> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2025942547==" --===============2025942547== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, you can test with is_present_hf("P-Asserted-Identity"), if this function returns true, then the variable should work, as Alex said. Cheers, Daniel On 01.11.17 16:34, Alex Balashov wrote: > Hi, > > $hdr(P-Asserted-Identity) should work, if the header is present. > > On Wed, Nov 01, 2017 at 04:32:00PM +0100, Gertjan Wolzak wrote: > >> Hello Kamailions, >> >> I receive anonymous calls where the PAI has a prefix which I need to strip >> before forwarding the call to a proxy. >> >> I am trying to read the the header with $hdr(P-Asserted-Identity) and I >> tried the $ai pseudovariable, but I get an empty reply back every time. >> >> xlog("PAI is $ai"); results in ; "Nov 1 16:19:55 proxy04 >> /usr/local/sbin/kamailio[14814]: ERROR: