Hi all,
I’m trying to read a SIP header from a REFER packet, here’s the packet:
REFER sip:redacted;transport=ws SIP/2.0
Via: SIP/2.0/WSS 8eqih34l1f85.invalid;received=redacted;branch=z9hG4bK3848701
Max-Forwards: 69
To: redacted;tag=dc0472c5-34a8-4fd1-abe6-6f771eca5ddf
From: sip:redacted;tag=0aaqq26p7v
Call-ID: 56c69406-5502-4771-85b3-e629085a3da1
CSeq: 6549 REFER
X-Redirect: pause
X-Foo: Bar
Refer-To: sip:pause@redacted:8089
Referred-By: sip:redacted
Contact: sip:i9pivj14@8eqih34l1f85.invalid;transport=ws
Allow: INVITE, ACK, CANCEL, BYE, UPDATE, MESSAGE, OPTIONS, REFER, INFO, NOTIFY
Supported: outbound
User-Agent: Redacted
Content-Length: 0
Content-Length: 0
Using the following:
[pause]
exten => s,1,Set(FOO=${PJSIP_HEADER(read,X-Foo)})
exten => s,n,NoOp( *** ${FOO} *** )
The variable FOO always reports empty. This works on invites, for some reason struggling with refers.
Any help appreciated! Might be doing something boneheaded here dunno.
BK