Pour l'international, Ã longueur variable je trouve pas le patern :
si je mets _00. ça n'empeche pas de concatener un &.
Pour l'international, Ã longueur variable je trouve pas le patern :
si je mets _00. ça n'empeche pas de concatener un &.
Sinon tu peux aussi faire une agi ou un bout de dialplan pour vérifier si le résultat de EXTEN est ce que tu souhaites avant de la passer dans Dial().
Découvrez Wazo sous licence GPLv3 et accessible pour tous : http://www.wazo.community
Blog Wazo : http://blog.wazo.community
Wazo est un fork de XiVO.
Suivez moi sur Twitter !
en lisant le fichier, on trouve:
Using FILTER()
--------------
The FILTER() dialplan function is used to filter strings by only allowing
characters that you have specified. This is a perfect candidate for controlling
which characters you want to pass to the Dial() application, or any other
application which will contain dynamic information passed to Asterisk from an
external source. Lets take a look at how we can use FILTER() to control what
data we allow.
Using our previous example to accept any string length of 2 or more characters,
starting with a number of zero through nine, we can use FILTER() to limit what
we will accept to just numbers. Our example would then change to something like:
[incoming]
exten => _X.,1,Verbose(2,Incoming call to extension ${EXTEN})
exten => _X.,n,Dial(SIP/${FILTER(0-9,${EXTEN})})
exten => _X.,n,Hangup()
Note how we've wrapped the ${EXTEN} channel variable with the FILTER() function
which will then only pass back characters that fit into the numerical range that
we've defined.
Alternatively, if we didn't want to utilize the FILTER() function within the
Dial() application directly, we could save the value to a channel variable,
which has a side effect of being usable in other locations of your dialplan if
necessary, and to handle error checking in a separate location.
......
Ah très bien ça
je commence à prendre l'habitude, quand j'ai une question, à aller voir les fichiers source asterisk... sans lire le code, mais par exemple:
- tous les parametres de sip.conf sont bien expliqués dans le sip.conf.sample
- toutes les applications/fonctions ont leurs parametres détaillés depuis le CLI: core show application dial - par exemple, sinon, au début du fichier apps/app_dial.c
Ca a l'air bete comme chou.... mais ca aide vachement !!!
:-)
Je ne connaissais pas le filter, maintenant c'est fait grâce a toi, merci du retour
Non, non, il pose une vrai question, la dernière chaîne d'un numéro international est variable dans sa longueur.