nxswart
(woodbox)
June 22, 2013, 10:34am
1
Hello,
Im trying to make a simple ivr database connection. Here for I’m following the script on this page: http://www.freepbx.org/forum/freepbx/tips-and-tricks/simple-ivr-database-interaction Because I’m pretty new to this im first trying to program something easy. In the extensions_custom.conf i put the following code:
exten => 1234, 1, Ansner
exten => 1234, 2, Wait(1)
exten => 1234, 3, Playback(en/goodbye)
exten => 1234, 4, Hangup
I let the ivr send to a misc. destination and let that one call to 1234. Only if i’m testing and in the ivr i press the number to send to the misc the phone is directly hangup. Am I’m doing something wrong?
lgaetz
(Lorne Gaetz)
June 22, 2013, 5:11pm
2
Check the spelling on line 1, it should be “Answer”
nxswart
(woodbox)
June 25, 2013, 11:41pm
3
Thank you verry mutch for the reply. My program is almost finist only i have 1 problem left. My Gotoif function is not working do you maby see what im doing wrong? If i do a SayDigits(${LEN(${CALLERID(num)})}) the program is saying 13. Only in the Gotoif it won’t work. I also try with quots.
exten => 1234, 3, Gotoif($[${LEN(${CALLERID(num)})} = 13] 6)
lgaetz
(Lorne Gaetz)
June 25, 2013, 11:54pm
4
exten => 1234,3,Gotoif($["${LEN(${CALLERID(num)})}" = “13”]?6)
Not tested, but should work.
nxswart
(woodbox)
June 26, 2013, 5:14am
5
I also tried that one but it’s not working.
lgaetz
(Lorne Gaetz)
June 26, 2013, 12:36pm
6
Probably because you are not using the commands properly. We have to guess what you are trying to do since you chose not to explain it, but if your intent is to send the caller to Priority 6 based on the gotoif statement, it would look something like this:
exten => 1234,3,Gotoif($["${LEN(${CALLERID(num)})}" = “13”]?continue)
exten => 1234,4,
exten => 1234,5,
exten => 1234,6(continue),
nxswart
(woodbox)
June 26, 2013, 7:48pm
7
Sorry if i not explain my code good enough.
This is my code now:
exten => 1234, 1, Answer
exten => 1234, 2, Gotoif($["${LEN($CALLERID(num)})} = “13”] 6)
exten => 1234, 3, Gotoif($["${LEN($CALLERID(num)})} = “10”] 6)
exten => 1234, 4, Playback(custom/number-not-correct)
exten => 1234, 5, Hangup
exten => 1234, 6, Goto(custom-function, s,1)
nxswart
(woodbox)
June 26, 2013, 7:55pm
8
Sorry i had not typed the code correctly.
exten => 1234, 1, Answer
exten => 1234, 2, Gotoif($["${LEN($CALLERID(num)})}" = “13”] 6)
exten => 1234, 3, Gotoif($["${LEN($CALLERID(num)})}" = “10”] 6)
exten => 1234, 4, Playback(custom/number-not-correct)
exten => 1234, 5, Hangup
exten => 1234, 6, Goto(custom-function, s,1)
This is also not working:
exten => 1234, 1, Answer
exten => 1234, 2, Gotoif($["${LEN($CALLERID(num)})}" = “13”] continue)
exten => 1234, 3, Gotoif($["${LEN($CALLERID(num)})}" = “10”] continue)
exten => 1234, 4, Playback(custom/number-not-correct)
exten => 1234, 5, Hangup
exten => 1234, 6(continue), Goto(custom-function, s,1)
nxswart
(woodbox)
June 28, 2013, 9:40pm
9
Thank you so mutch for your information, but do you maby know what im doing wrong?