Hello to all,
have informed me that we need to expand our service desk and in the new project would build a new feature of the current IVR .
In , in a certain point of the new IVR will have to be able to enter the number of your ticket, then asterisk dio query a db and the query that will do will give a result , this resul will have to return to my dialplan and at that point , depending on the outcome , it will run a specific audio file .
I arrived at this point in my tests :
exten = > _01875295401 , 1 , Answer ()
exten = > _01875295401 , n, Read ( input , ticket2 , )
exten = > _01875295401 , n, SayDigits ($ {input })
exten = > _01875295401 , n, DeadAGI ( database.php , $ {input })
"here obviously missing the whole part concerning the processing of the query result "
exten = > _01875295401 , n, Hangup ( ) and ,
It ’ a test, however, the diaplan takes me correctly the variable input and repeats , then launches the script and passes the variable input.
The script is trivial at the time , and does not ninete if not a db connetc .
My question is , how do I create the PHP? I’m very noob on this language
The query that I have to do is the following:
select a.name from ticket_state in , ticket b.tn where b = [ here will be the value of the variable populated by asterisk ] and a.id = b.ticket_state_id ;
the result can be only 4 types , id1 , id2 , id3 , ID4
Thanks in advance