On Fri, 24 Jan 2020, Benoit Panizzon wrote:
I have stumbled of this problem.I need the P-Asserted-Identity header in an AGI scrip. In the Dial-Plan I do: same => n,Set(PAI=${PJSIP_HEADER(read,P-Asserted-Identity)}) In the AGI I do: my $pai = $AGI->get_variable(PAI); This works fine, unless the PAI contains quotes: P-Asserted-Identity: <sip:[email protected]:5060;user=phone> I get "<sip:[email protected]:5060;user=phone>" in the variable $pai. P-Asserted-Identity: "John Doe" <sip:[email protected]:5060;user=phone> Is getting me $pai containing just "John". Anyone a clue how I could get the whole header?
1) Does the PAI channel variable contain the full header? Try 'verbose(PAI = ${PAI})' or something similar.
2) How about doing 'GET FULL VARIABLE' in your Perl script? You can set the channel variable PAI in the AGI if needed back in the dialplan.
-- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards [email protected] Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281 -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
