Programming ivr

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?

Check the spelling on line 1, it should be “Answer”

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)

exten => 1234,3,Gotoif($["${LEN(${CALLERID(num)})}" = “13”]?6)

Not tested, but should work.

I also tried that one but it’s not working.

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),

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)

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)

Thank you so mutch for your information, but do you maby know what im doing wrong?