Why this code cannot work





exten => 110,1,Answer
exten => 110,2,Background(welcome) ;user input password number

; user key in I/C
exten => _xxxxxxxxxxxx#,1,MYSQL(Connect connid localhost userdatabase
passworddatabase IVR)
exten => _xxxxxxxxxxxx#,2,MYSQL(Query resultid ${connid}
exten => _xxxxxxxxxxxx#,3,Wait(1)
exten => _xxxxxxxxxxxx#,4,MYSQL(Clear ${resultid})
exten => _xxxxxxxxxxxx#,5,MYSQL(Disconnect ${connid})
exten => _xxxxxxxxxxxx#,6,Hangup

exten => 8000,1,Dial(SIP/8000)

i wanna connected in my database … osuing mysqld
but when i write in my extensions.conf this code cannot work ,

if any people know… plase help me

some budy plase help me… teach me or told me what my false…

because this codeing cant not function

this is are eror when i run the asterisk system …
i try setting ad cdr-mysql but same

– Executing Answer(“SIP/9000-b3fd”, “”) in new stack
– Executing BackGround(“SIP/9000-b3fd”, “welcome”) in new stack
– Playing ‘welcome’ (language ‘en’)
– Executing BackGround(“SIP/9000-b3fd”, “adddrop”) in new stack
Mar 3 12:13:08 WARNING[6379]: file.c:508 ast_openstream_full: File adddrop does not exist in any format
Mar 3 12:13:08 WARNING[6379]: file.c:820 ast_streamfile: Unable to open adddrop (format ulaw): No such file or directory
Mar 3 12:13:08 WARNING[6379]: pbx.c:5689 pbx_builtin_background: ast_streamfile failed on SIP/9000-b3fd for adddrop
== CDR updated on SIP/9000-b3fd
Mar 3 12:13:17 WARNING[6379]: pbx.c:1652 pbx_extension_helper: No application ‘NoOt’ for extension (default, 810325045093#, 1)
== Spawn extension (default, 810325045093#, 1) exited non-zero on 'SIP/9000-b3fd’
Mar 3 12:13:17 ERROR[6379]: cdr_addon_mysql.c:144 mysql_log: cdr_mysql: cannot connect to database server

In this situation, I prefer to use AGI with some script language.
You can do all this staf and many more using scripts.
If you want you could check atscc - full system for callning cards, using MySQL based autorisation (including pin/card codes, and many more things). It is writen in Perl.
There are also modules writen in PHP, which could handle AGI.

One more - obviously you have no sound file called adddrop - in no format - no file adddrop.gsm in your asterisk default sound dir.