[Freeswitch-users] Dialplan check if header is present

Steven Ayre steveayre at gmail.com
Thu Sep 19 03:47:46 MSD 2013


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/96f90cb3/attachment.html 


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