[asterisk-dev] SIP headers not available on REFER

Olle E. Johansson oej at edvina.net
Fri Oct 2 00:35:40 CDT 2009


1 okt 2009 kl. 19.59 skrev Brent Thomson:

> The SIP debug on the CLI shows that the header is in the message
> received in both cases. Any ideas why I can't query the header in the
> REFER scenario?

Because SIP_HEADER is documented to ONLY support the latest INVITE.
It's the only message we store in the pvt.

We could potentially save the REFER message in the transfer  
substructure of the PVT but then we need a new function to check those  
headers.

Maybe we should consider adding some logic that certain headers in the  
message that caused dialplan execution is automatically added as  
channel variables.

sip.conf:

[general]
chanvarheaderfilter=X-foo-	; Store all headers prefixed with  X-foo-  
as channel variables for INVITE, REFER, 302

X-foo-gurka: tomat

Would result in

GURKA=tomat

in the channel variables for the channel.

Note that this would overwrite variables too, like if you had a call  
with an incoming INVITE that later get a REFER.

/O



More information about the asterisk-dev mailing list