How to Create PHP Application for Freeswicth using ESL
Hi Everyone, i am a new user and want to learn how to create php application using ESL i just want to play a dynamic message using cepstral and get the customer response using dtmf. but i can't unserstand how to handle call using php as their is no mod_php is available like mod_lua, i park the call and now want to speak in the call but unable to do: please guide me i can't solve that problem with playandgetdigits() example of Mr. Michael Collins that what is the code of [handler.php]. ===================================================================================================================== * * *originate user/1500 meeting_request_1500* Then create that extension: <extension name="meeting request"> <condition field="destination_number" expression="^meeting_request_( \d+)$"> <action application="set" data="target_user=$1"/> <action application="set" data="text=cepstral|callie|Hi, we have a meeting on Monday at 9, are you joining us, if yes then press, 1. and if not press, 2."/> <action application="answer"/> <action application="sleep" data="1000"/> <action application="play_and_get_digits" data="1 1 3 5000 # speak:${text} ivr/ivr-that_was_an_invalid_entry.wav answer \d"/> <action application="set" data="api_hangup_hook=system *handler.php* ${target_user} ${answer}"/> <action application="log" data="INFO User ${target_user} responded with ${answer}"/> <action application="playback" data="ivr/ivr-Thank_you.wav"/> <action application="hangup"/> </condition> </extension> =================================================================================================================== is anyone guide me how to do it php, thanks in advance, Shahzad Bhatti
Hi Everyone, i am a new user and want to learn how to create php application using ESL i just want to play a dynamic message using cepstral and get the customer response using dtmf. but i can't unserstand how to handle call using php as their is no mod_php is available like mod_lua, i park the call and now want to speak in the call but unable to do: please guide me i can't solve that problem with playandgetdigits() example of Mr. Michael Collins that what is the code of [handler.php]. =============================================================================================== * * *originate user/1500 meeting_request_1500* Then create that extension: <extension name="meeting request"> <condition field="destination_number" expression="^meeting_request_( \d+)$"> <action application="set" data="target_user=$1"/> <action application="set" data="text=cepstral|callie|Hi, we have a meeting on Monday at 9, are you joining us, if yes then press, 1. and if not press, 2."/> <action application="answer"/> <action application="sleep" data="1000"/> <action application="play_and_get_digits" data="1 1 3 5000 # speak:${text} ivr/ivr-that_was_an_invalid_entry.wav answer \d"/> <action application="set" data="api_hangup_hook=system *handler.php* ${target_user} ${answer}"/> <action application="log" data="INFO User ${target_user} responded with ${answer}"/> <action application="playback" data="ivr/ivr-Thank_you.wav"/> <action application="hangup"/> </condition> </extension> ============================================================================================= is anyone guide me how to do it php, thanks in advance, Shahzad Bhatti
participants (1)
-
Shahzad Bhatti