Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

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

[Freeswitch-users] How to check if a channel variable is present or NULL


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
Claudio.Cavalera at it...
Guest





PostPosted: Wed Jul 01, 2009 11:30 am    Post subject: [Freeswitch-users] How to check if a channel variable is pre Reply with quote

Hello,
I'm trying to implement this kind of logic in the dialplan

if the channel variable sip_refer_to matches regexp
than do action
else if sip_refer_to exists (not NULL) but does not match regexp
than do anti-action
else if sip_refer_to does not exist as a channel_variable (NULL ??)
than do another action

is there a way to check if a channel variable exists or not?
Maybe a special regexp to match?

Thanks,
Claudio


Internet Email Confidentiality Footer
-----------------------------------------------------------------------------------------------------
La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto.

This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred.
-----------------------------------------------------------------------------------------------------


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
mrene_lists at avgs.ca
Guest





PostPosted: Wed Jul 01, 2009 12:02 pm    Post subject: [Freeswitch-users] How to check if a channel variable is pre Reply with quote

it will match ^$ if the var isnt defined

Math

On 1-Jul-09, at 12:25 PM, Cavalera Claudio Luigi wrote:

Quote:
Hello,
I'm trying to implement this kind of logic in the dialplan

if the channel variable sip_refer_to matches regexp
than do action
else if sip_refer_to exists (not NULL) but does not match regexp
than do anti-action
else if sip_refer_to does not exist as a channel_variable (NULL ??)
than do another action

is there a way to check if a channel variable exists or not?
Maybe a special regexp to match?

Thanks,
Claudio


Internet Email Confidentiality Footer
-----------------------------------------------------------------------------------------------------
La presente comunicazione, con le informazioni in essa contenute e
ogni documento o file allegato, e' rivolta unicamente alla/e persona/
e cui e' indirizzata ed alle altre da questa autorizzata/e a
riceverla. Se non siete i destinatari/autorizzati siete avvisati che
qualsiasi azione, copia, comunicazione, divulgazione o simili basate
sul contenuto di tali informazioni e' vietata e potrebbe essere
contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia
di protezione dei dati personali). Se avete ricevuto questa
comunicazione per errore, vi preghiamo di darne immediata notizia al
mittente e di distruggere il messaggio originale e ogni file
allegato senza farne copia alcuna o riprodurne in alcun modo il
contenuto.

This e-mail and its attachments are intended for the addressee(s)
only and are confidential and/or may contain legally privileged
information. If you have received this message by mistake or are not
one of the addressees above, you may take no action based on it, and
you may not copy or show it to anyone; please reply to this e-mail
and point out the error which has occurred.
-----------------------------------------------------------------------------------------------------


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH 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