Am 07.01.2021 um 23:49 schrieb Alexander Perkins:
Hi All.  We have old Asterisk servers, 1,89, (we cannot upgrade because of several reasons) and we are now implementing SHAKEN via our provider.  We place a SIP call to our provider and they return a 302 (information below).  I am trying to get the X-Identity information below, but I do not seem to be able to do so.  Can somebody help me with this?  Any suggestions on how to get it?

I use SIP_HEADER to extract information from inbound SIP packets and SIPAddHeader to copy that info to the outgoing call leg. Maybe this helps you?

Example:

exten => _+X.,1,NoOp(${CALLERID(num)})
exten => _+X.,n,Set(PAI=${SIP_HEADER(P-Asserted-Identity)})
exten => _+X.,n,Set(PAI=${CUT(PAI,:,2)})
exten => _+X.,n,Set(PAI=${CUT(PAI,@,1)})
exten => _+X.,n,GotoIf($["${CALLERID(num)}" = "anonymous"]?anonymous:cli)
exten => _+X.,n(anonymous),SIPAddHeader(P-Asserted-Identity: "${PAI}" <sip:${PAI}@1.2.3.4>)
exten => _+X.,n,SIPAddHeader(Privacy: user\;id)
exten => _+X.,n,Goto(dial)
exten => _+X.,n(cli),SIPAddHeader(P-Asserted-Identity: "${PAI}" <sip:${PAI}@1.2.3.4>)
exten => _+X.,n,SIPAddHeader(Privacy: id)
exten => _+X.,n,Goto(dial)



--
_____________________________________________________________________
-- 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

Reply via email to