[Freeswitch-users] Dialplan check if header is present
Grant Bagdasarian
GB at cm.nl
Thu Sep 19 09:40:44 MSD 2013
Right! Sounds logical.
Thanks!
From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Steven Ayre
Sent: Thursday, September 19, 2013 1:48 AM
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] Dialplan check if header is present
A missing header will be treated as an empty string
The expression="." regex will work better. That will match any character, therefore any nonempty string. Simpler than yours, faster (it only needs to check the first character not the entire string) and will match many yours will not (anything with non-alphanumerics, such as whitespace)
On Wednesday, September 18, 2013, Grant Bagdasarian wrote:
Hello,
In the dialplan, how would I check if a header is present?
Should I just check if it has a value like below?
<condition field="${sip_h_X-MyHeader }" expression="^[a-zA-Z0-9]+$ " break="never">
</condition>
Regards,
Grant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130919/6c811cbf/attachment.html
Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users
mailing list