jeff at jeff.net Guest
|
Posted: Fri Oct 23, 2015 1:19 pm Post subject: [asterisk-users] partially match a SIP header |
|
|
Hi,
I have a need to pass through SIP headers that start with a particular
prefix, without knowing beforehand what the full name of the header
actually is. For example I need to test for any headers on an inbound
channel that start with "FOO_" and then use SIPAddHeader() to add them
to the outbound channel. Straightforward when I know the whole name,
but I'd like something more generic that I won't have to update when we
come up with a new header to add on the client side.
This is working fine:
exten => _X.,1,Set(FOO_ONE=${SIP_HEADER(FOO_ONE)})
exten => _X.,n,NoOp(Got Header ${FOO_ONE})
exten => _X.,n,SIPAddHeader(FOO_ONE: ${FOO_ONE})
exten => _X.,n,Dial(SIP/${EXTEN},80)
exten => _X.,n,Hangup
Any ideas?
Thanks,
j
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|