Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] partially match a SIP header


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
jeff at jeff.net
Guest





PostPosted: Fri Oct 23, 2015 1:19 pm    Post subject: [asterisk-users] partially match a SIP header Reply with quote

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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services