[Freeswitch-users] Variable manipulation in the dialplan

Saeed Ahmed saeedahmad1981 at gmail.com
Wed Jun 24 03:53:30 PDT 2009


Can we also test dialplan using CLI, like "dial" in asterisk?






-----Original Message-----
From: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Cavalera
Claudio Luigi
Sent: Wednesday, June 24, 2009 12:36 PM
To: freeswitch-users at lists.freeswitch.org
Subject: Re: [Freeswitch-users] Variable manipulation in the dialplan

> From: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of
Anthony Minessale
	
> play with it from the cli
	
> freeswitch> eval ${foo:-4:4}
> API CALL [eval(${foo:-4:4})] output:
> 2345


Thanks anthm!
This way to test directly on the cli is really nice, I didn't know of
it.
If I've understood well, a negative number as first parameter will make
the second parameter useless/meaningless.
Besides, the second parameter is useless/meaningless if set equal to 0
or lesser than 0.

I still think that we could benefit from more power here in the
dialplan,
if I have 
12346578 at domain.org
I'm not able to grab out the number (of which I don't know the length)
even if I know that domain.org is always the same length.
I've looked for something useful in
http://apr.apache.org/docs/apr/1.3/apr__strings_8h.html
and switch_apr.c
but I think I'll end up calling an external script. :)

Best Regars,
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 at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org





More information about the FreeSWITCH-users mailing list