[asterisk-users] Get a SHAKEN Identity Token
Markus
universe at truemetal.org
Fri Jan 22 07:06:31 CST 2021
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)
More information about the asterisk-users
mailing list