Projet

Général

Profil

Mise en place d'un menu IVR

Ajouté par yoann kontas il y a presque 7 ans

Bonjour à tous, débutant dans la téléphonie je mène quelques test.

Le serveur tourne sur une Xivo 13.13.1. Deux lignes SIP free sont connectée dessus, la réception et les envoi d'appel fonctionnent.

Pour aller plus loin j'ai voulu essayer de mettre en place un message d'accueil avec un menu. Quand on appel, le menu est bien lancé, le serveur semble comprendre les commandes faites par les appelant, sauf que j'ai un message indiquant "Il n'y a pas d'usager correspondant au numéro demandé"

Dans les fichiers de log j'ai ceci :

[May 16 10:53:22] VERBOSE[15980][C-00000056] pbx.c: Executing [s@dp-ivr-example:10] NoOp("SIP/trunk_free_stf-00000067", "variable "counter" is set to 0") in new stack
[May 16 10:53:22] VERBOSE[15980][C-00000056] pbx.c: Executing [s@dp-ivr-example:11] Set("SIP/trunk_free_stf-00000067", "counter=0") in new stack
[May 16 10:53:22] VERBOSE[15980][C-00000056] pbx.c: Executing [s@dp-ivr-example:12] NoOp("SIP/trunk_free_stf-00000067", "variable "counter" is incremented and the label "start" is defined") in new stack
[May 16 10:53:22] VERBOSE[15980][C-00000056] pbx.c: Executing [s@dp-ivr-example:13] Set("SIP/trunk_free_stf-00000067", "counter=1") in new stack
[May 16 10:53:22] VERBOSE[15980][C-00000056] pbx.c: Executing [s@dp-ivr-example:14] NoOp("SIP/trunk_free_stf-00000067", "counter variable is now = 1") in new stack
[May 16 10:53:22] VERBOSE[15980][C-00000056] pbx.c: Executing [s@dp-ivr-example:15] NoOp("SIP/trunk_free_stf-00000067", "waiting for 1 second before reading the message that indicate all choices") in new stack
[May 16 10:53:22] VERBOSE[15980][C-00000056] pbx.c: Executing [s@dp-ivr-example:16] Wait("SIP/trunk_free_stf-00000067", "1") in new stack
[May 16 10:53:23] VERBOSE[15980][C-00000056] pbx.c: Executing [s@dp-ivr-example:17] NoOp("SIP/trunk_free_stf-00000067", "play the message ivr-example-choices that contain all choices") in new stack
[May 16 10:53:23] VERBOSE[15980][C-00000056] pbx.c: Executing [s@dp-ivr-example:18] BackGround("SIP/trunk_free_stf-00000067", "/var/lib/xivo/sounds/playback/menu") in new stack
[May 16 10:53:23] VERBOSE[15980][C-00000056] file.c: <SIP/trunk_free_stf-00000067> Playing '/var/lib/xivo/sounds/playback/menu.slin' (language 'fr_FR')
[May 16 10:53:25] DTMF[15980][C-00000056] channel.c: DTMF begin '1' received on SIP/trunk_free_stf-00000067
[May 16 10:53:25] DTMF[15980][C-00000056] channel.c: DTMF begin ignored '1' on SIP/trunk_free_stf-00000067
[May 16 10:53:25] DTMF[15980][C-00000056] channel.c: DTMF end '1' received on SIP/trunk_free_stf-00000067, duration 89 ms
[May 16 10:53:25] DTMF[15980][C-00000056] channel.c: DTMF end passthrough '1' on SIP/trunk_free_stf-00000067
[May 16 10:53:25] VERBOSE[15980][C-00000056] pbx.c: Executing [1@dp-ivr-example:1] NoOp("SIP/trunk_free_stf-00000067", "pressed digit is 1, redirect to 101 in from_free context") in new stack
[May 16 10:53:25] VERBOSE[15980][C-00000056] pbx.c: Executing [1@dp-ivr-example:2] Goto("SIP/trunk_free_stf-00000067", "from_free,101,1") in new stack
[May 16 10:53:25] VERBOSE[15980][C-00000056] pbx_builtins.c: Goto (from_free,101,1)
[May 16 10:53:25] VERBOSE[15980][C-00000056] pbx.c: Channel 'SIP/trunk_free_stf-00000067' sent to invalid extension: context,exten,priority=from_free,101,1
[May 16 10:53:25] VERBOSE[15980][C-00000056] pbx.c: Executing [i@from_free:1] Playback("SIP/trunk_free_stf-00000067", "no-user-find") in new stack
[May 16 10:53:25] VERBOSE[15980][C-00000056] file.c: <SIP/trunk_free_stf-00000067> Playing 'no-user-find.slin' (language 'fr_FR')
[May 16 10:53:29] VERBOSE[15980][C-00000056] pbx.c: Executing [i@from_free:2] Hangup("SIP/trunk_free_stf-00000067", "") in new stack
[May 16 10:53:29] VERBOSE[15980][C-00000056] pbx.c: Spawn extension (from_free, i, 2) exited non-zero on 'SIP/trunk_free_stf-00000067'

Apparemment il y'aurai un problème d'extension dans le context. J'ai essayer de voir ou cela pouvait coincé, mais je sèche.

Je précise qu'avant que je configure les appels entrant vers le menu interactif, les softphones était bien ciblé lors des appels externes.

Merci


Réponses (3)

RE: Mise en place d'un menu IVR - Ajouté par dudu clx il y a presque 7 ans

yop,

tu peux fournir le dialplan utilisé ?

ça semble être ton Goto() qui est mal écrit.

tu peux lire quelques exemples dans un topic tout récent:
https://projects.xivo.solutions/boards/1/topics/190

++

RE: Mise en place d'un menu IVR - Ajouté par yoann kontas il y a presque 7 ans

Bonjour, et merci pour ta réponse.

C'était bien le fichier de configuration qui n'était pas bon.

Dans l'exmple que je poste plus bas, il y'a deux versions pour la redirection vers le numéro de téléphone voulu, un avec la fonction Dial(Local/101@default) qui fonctionne et l'autre avec la fonction Goto(${IVR_DESTINATION_CONTEXT},102,1) qui elle ne fonctionne pas. Donc soit c'est un problème avec la fonctio, soit peut être avec la variable IVR_DESTINATION_CONTEXT, qui portant est bien déclaré plus haut dans le fichier. Donc ca fonctionne si j'utilise Dial :)

[dp-ivr-example] 

exten = s,1,NoOp(### dp-ivr-example.conf ###) 
same = n,NoOp(Set the context containing your ivr destinations.) 
same = n,Set(IVR_DESTINATION_CONTEXT=from_free) 
same = n,NoOp(Set the directory containing your ivr sounds.) 
same = n,Set(GV_DIRECTORY_SOUNDS=/var/lib/xivo/sounds/playback) 
same = n,NoOp(the system answers the call and waits for 1 second before continuing) 
same = n,Answer(1000) 

same = n,NoOp(the system plays the first part of the audio file "welcome to ...") 
same = n(first),Playback(${GV_DIRECTORY_SOUNDS}/menu) 

same = n,NoOp(variable "counter" is set to 0) 
same = n(beginning),Set(counter=0) 

same = n,NoOp(variable "counter" is incremented and the label "start" is defined) 
same = n(start),Set(counter=$[${counter} + 1]) 

same = n,NoOp(counter variable is now = ${counter}) 
same = n,NoOp(waiting for 1 second before reading the message that indicate all choices) 
same = n,Wait(1) 
same = n,NoOp(play the message ivr-example-choices that contain all choices) 
same = n,Background(${GV_DIRECTORY_SOUNDS}/menu) 
same = n,NoOp(waiting for DTMF during 5s) 
same = n,Waitexten(5) 

;##### CHOICE 1 ##### 
exten = 1,1,NoOp(pressed digit is 1, redirect to 101 in ${IVR_DESTINATION_CONTEXT} context) 
exten = 1,n,Dial(Local/101@default) 

;##### CHOICE 2 ##### 
exten = 2,1,NoOp(pressed digit is 2, redirect to 102 in ${IVR_DESTINATION_CONTEXT} context) 
exten = 2,n,Goto(${IVR_DESTINATION_CONTEXT},102,1) 

;##### CHOICE 4 ##### 
exten = 4,1,NoOp(pressed digit is 4, redirect to start label in this context) 
exten = 4,n,Goto(s,start) 

;##### TIMEOUT ##### 
exten = t,1,NoOp(no digit pressed for 5s, process it like an error) 
exten = t,n,Goto(i,1) 

;##### INVALID CHOICE ##### 
exten = i,1,NoOp(if counter variable is 3 or more, then goto label "error") 
exten = i,n,GotoIf($[${counter}>=3]?error) 
exten = i,n,NoOp(pressed digit is invalid and less than 3 errors: the guide ivr-exemple-invalid-choice is now played) 
exten = i,n,Playback(${GV_DIRECTORY_SOUNDS}/menu) 
exten = i,n,Goto(s,start) 
exten = i,n(error),Playback(${GV_DIRECTORY_SOUNDS}/menu) 
exten = i,n,Hangup() 

Merci encore

RE: Mise en place d'un menu IVR - Ajouté par dudu clx il y a presque 7 ans

re,

bon, c'est déjà plus clair.

dis toi bien que exten = , signifie la touche.
same = déclare des actions quand on a appuyé sur cette touche

or, dans ton dialplan, tu remets toujours exten = à chaque début de ligne, pour une même action

;##### CHOICE 1 #####
exten = 1,1,NoOp(pressed digit is 1, redirect to 101 in ${IVR_DESTINATION_CONTEXT} context)
same = n,Dial(Local/101@default)

;##### CHOICE 2 #####
exten = 2,1,NoOp(pressed digit is 2, redirect to 102 in ${IVR_DESTINATION_CONTEXT} context)
same = n,Goto(${IVR_DESTINATION_CONTEXT},102,1)

;##### CHOICE 4 #####
exten = 4,1,NoOp(pressed digit is 4, redirect to start label in this context)
same = n,Goto(s,start)

dans ton choix 2, tu va bien sur l’extension 102 du contexte from_free ...
si cela ne marche pas, alors il faudrait voir en ajoutant un appel entrant sur ce numéro, et bien vérifier le contexte.

Pour le timeout et invalid choice, ça fonctionne comme tu veux ?
l'utilisation du same me semble là aussi plus appropriée.

++

    (1-3/3)