[Freeswitch-users] FS does not set response headers in channel variables

Dahlberg, David david.dahlberg at fkie.fraunhofer.de
Mon Jan 20 11:18:36 MSK 2014


Am Montag, den 13.01.2014, 10:47 +0100 schrieb Karsten Horsmann:
> Hello,
> 
> it will ONLY work if you X- prefix your self SIP-Headers. Non-standard SIP
> headers should be preceded with an X-.

Both sentences are not true. "X-" header prefixes are now depricated by
the IETF (RFC 6648/BCP 178).

And you indeed CAN set non-X-headers with the FS and mod_sofia. The only
problem seem to be, that 

a) headers set by api calls like hangup() (e.g. "Reason:" with namespace
   "Q.931" etc.) will be overwritten and
b) you cannot access those variables, on incoming calls (i.e. if you 
   have not set them on your own).

The only limitation seems to be in mod_sofia (not in Sofia SIP as the
Wiki claims). I do not have access to the git right now, but if I
remember correctly, Sofia distinguishes between "known headers",
including "x-headers" and "unknown headers" which are saved in a
different struct. Mod_sofia already contains all the necessary functions
to retrieve "unknown headers" as the module needs some of them itself.
But IIRC the according functions are only ever invoked with constant
strings, so there is definitely no easy way of reading them. Writing is
possible though as I previously mentioned.

Regards
	David






-- 
David Dahlberg     

Fraunhofer FKIE, Dept. Communication Systems (KOM) | Tel: +49-228-9435-845
Fraunhoferstr. 20, 53343 Wachtberg, Germany        | Fax: +49-228-856277


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list