[Users] new textops functions
daniel at voice-system.ro
Wed Nov 23 22:01:44 CET 2005
there are a set of new functions added to textops module:
- insert_hf(txt) - inserts the 'txt' as header before the first header
of the SIP message
- insert_hf(txt, hdr) - inserts the 'txt' as header before the first
'hdr' header of the SIP message
- append_hf(txt, hdr) - adds the 'txt' as header after the first 'hdr'
header of the SIP message
The 'txt' parameter can contain pseudo-variables which will be replaced
at run time.
For the existing function 'append_hf(txt)' was added support for
pseudo-variables in 'txt' parameter as well. This functions adds the
'txt' as header after the last header of the SIP message.
Note that if some other functions inserts headers in different positions
(e.g., record_route()), so the result will be according to the order of
using such functions.
To give an example, if you want to add a header composed from src-ip and
src port just after From header:
append_hf("From-addr: $si:$sp\r\n", "From");
Updated documentation for textops module:
The list with pseudo-variables:
More information about the Users