Ismerje meg, hogyan tudja beállítani és használni a legkorszerűbb mobil, VoIP, SMS és web funkciókat. |
![]() | Voice and 2D/3D video calls |
![]() | SMS messages |
![]() | Webphone technology |
![]() | PBX for your Office |
![]() | PBX for your Mobile Employees |
In this guide you can see different ways of making an Interactive Voice Response (IVR) in your Ozeki Phone System XE using an OzML script. Below you can see an OzML script and three ways of using it.
How to select the Text to speech language
The following OzML scripts demonstrate 3 examples for using an IVR system. You can see how to play an audio file into the phone call, how to use text-to-speech, what happens if a user presses a button and even how to send SMS or e-mail messages. The 'Simple' and 'Advanced' examples can be used with IVR Extension, SQL OzML and HTTP OzML as well. For testing the 'Professional' example please use HTTP OzML.
<Response> <UserInput Timeout="5" Repeat="true"> <InitialCommands> <Speak> Hello, you called Ozeki Phone System XE IVR. For more information please press 1. To transfer the call to an employee please press 2. </Speak> </InitialCommands> <Inputs> <Input Key="1"> <Speak> To set up this OzML response, you have 3 options. You could add new IVR Extension. You could use HTTP API with an API Extension. Or you could add new SQL OzML Extension. </Speak> </Input> <Input Key="2"> <BlindTransfer>2000</BlindTransfer> </Input> </Inputs> </UserInput> </Response>
<Response> <UserInput Timeout="5" Repeat="true"> <InitialCommands> <Play>welcome.wav</Play> <Speak> The conversation will be recorded for privacy reasons. For more information about banking services press 1. For account balance information in SMS message press 2. To subscribe e-mail newsletter press 3. To call with our customer representative press 4. To leave a message press 5. </Speak> </InitialCommands> <Inputs> <Input Key="1"> <UserInput Timeout="5" Repeat="true"> <InitialCommands> <Speak> For retail banking information please press 1. For corporate banking information please press 2. For private banking information please press 3. </Speak> </InitialCommands> <Inputs> <Input Key="1"> <Speak> We offer several financial solutions for retailers... </Speak> </Input> <Input Key="2"> <Speak> We offer several financial solutions for companies... </Speak> </Input> <Input Key="3"> <Speak> We offer several financial solutions for individuals... </Speak> </Input> </Inputs> </UserInput> </Input> <Input Key="2"> <SendSms Recipient="+062554670"> Account balance: 2.000 USD </SendSms> <Hangup></Hangup> </Input> <Input Key="3"> <SendEmail Recipient="info@yourcompany.com"> You have successfully subscribed to our newsletter. </SendEmail> <Hangup></Hangup> </Input> <Input Key="4"> <BlindTransfer>2000</BlindTransfer> </Input> <Input Key="5"> <Speak> Record your 10 second message </Speak> <Record FinishedUrl="http://yourapp.com/record_finished.php" FinishDigits="1" Format="wav"> </Record> <UserInput Timeout="5" Repeat="true"> <InitialCommands> <Speak> Press 1 to send it as e-mail. </Speak> </InitialCommands> <Inputs> <Input Key="1"> <SendEmail Recipient="info@yourcompany.com" Attachment="recorded.wav"> Subject="Recorded audio"> Your recorded message has been sent to your e-mail. </SendEmail> </Input> </Inputs> </UserInput> </Input> </Inputs> </UserInput> </Response>
//*************************************************************************************/ // This file will be executed when the call is connected. // Filename: incomingcall.php //*************************************************************************************/ <?xml version="1.0" encoding="UTF-8"?> <Response> <UserInput ForwardToUrl="http://yourapp.com/dtmf_received.php" digits="4" timeout="10" repeat="true"> <InitialCommands> <Speak>Please enter your 4 digits PIN code.</Speak> </InitialCommands> </UserInput> </Response> //*************************************************************************************/ // This file will be executed when DTMF input is received. // dtmf_received.php //*************************************************************************************/ <?php $dtmfdigits = $_REQUEST['DtmfDigits']; $sql = mysql_query('SELECT id FROM account WHERE pincode LIKE "' . $dtmfdigits . '";'); $row = mysql_fetch_assoc($sql); if(mysql_num_rows($sql) == 1) { $response = "<GoTo>http://yourapp.com/members_area.php?accountid= " . $row['id'] . "</GoTo>"; } else { $response = "<UserInput ForwardToUrl="http://yourapp.com/dtmf_received.php" digits="4" timeout="10" repeat="true">"; $response .= "<InitialCommands>"; $response .= "<Speak>"; $response .= "The PIN code you entered is invalid. Please give it again."; $response .= "Please enter your 4 digits PIN code again."; $response .= "</Speak>"; $response .= "</InitialCommands>"; $response .= "</UserInput>"; } ?> <?xml version="1.0" encoding="UTF-8"?> <Response> <?php echo $response; ?> </Response> //*************************************************************************************/ // This file will be executed when the PIN code is accepted. // members_area.php //*************************************************************************************/ <?php $accountid = $_REQUEST['accountid']; $sql = mysql_query('SELECT balance FROM account WHERE id = "' . $accountid . '";'); $row = mysql_fetch_assoc($sql); ?> <?xml version="1.0" encoding="UTF-8"?> <Response> <UserInput Timeout="5" Repeat="true"> <InitialCommands> <Speak> The pin code you entered is verified. Account balance, press 1. To call with our customer representative, press 2. </Speak> </InitialCommands> <Inputs> <Input Key="1"> <Speak> <?php echo $row['balance']; ?> </Speak> </Input> <Input Key="2"> <BlindTransfer>2000</BlindTransfer> </Input> </Inputs> </UserInput> </Response>
Code example 1 - IVR menu with OzML
Option 1: Use your PBX
Incoming calls can easily be routed to an IVR Extension. You only need to give an Extension phone number and use an OzML script. If a call is forwarded to that IVR Extension, the caller person could listen to the IVR menu that is in the OzML Script. Learn more
Figure 1 - IVR Extension
Option 2: Use your database
SQL OzML makes it possible to create a new IVR from your other IT system. Ozeki Phone System XE receives a call from any extension or outside line, then select an OzML Script from the SQL database. Then the Ozeki Phone System XE will load the IVR menu to the caller. Learn more
Figure 2 - SQL OzML
Option 3: Use your webserver
Ozeki Phone System XE makes it easy to connect it to other IT systems through HTTP API. An OzML script can be placed on an own website. It can be given with the Ozeki Phone System XE HTTP API which website’s content the Ozeki Phone System XE should ask for in case of an incoming call. Learn more
Figure 3 - HTTP OzML