<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Cambria;
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
h6
        {mso-style-priority:9;
        mso-style-link:"Heading 6 Char";
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:7.5pt;
        font-family:"Times New Roman","serif";
        font-weight:bold;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.Heading6Char
        {mso-style-name:"Heading 6 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 6";
        font-family:"Cambria","serif";
        color:#243F60;
        font-style:italic;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
/* List Definitions */
@list l0
        {mso-list-id:1343047887;
        mso-list-type:hybrid;
        mso-list-template-ids:1308756544 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level4
        {mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level7
        {mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi Michael,<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I’ve decided to do it through Lua. I’ve written a
Lua script which will check whether an entry for an extension exists in the
database. And if it doesn’t, it’ll assume that extension as free
and will park the call there.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I’ve made the following changes in the dialplan –<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoPlainText><extension><o:p></o:p></p>
<p class=MsoPlainText style='text-indent:.5in'><condition
field="destination_number" expression="^(450)$"><o:p></o:p></p>
<p class=MsoPlainText style='text-indent:1.0in'><action
application="play_and_get_digits" data="10 16 3 3000 #
say:'Press your account number, followed by hash key' say:'Wrong Input' res
\d+" /><o:p></o:p></p>
<p class=MsoPlainText>
<action application="phrase" data="spell,${res}"/><o:p></o:p></p>
<p class=MsoPlainText>
<action application="set" data="caller_id_name=Change Address
Request" /><o:p></o:p></p>
<p class=MsoPlainText>
<action application="set" data="call_timeout=60" /><o:p></o:p></p>
<p class=MsoPlainText>
<action application="set" data="originate_timeout=60"
/><o:p></o:p></p>
<p class=MsoPlainText>
<action inline="true" application="lua"
data="test.lua "/><o:p></o:p></p>
<p class=MsoPlainText>
<action application="db" data="insert/testapp/${parkednumber}/${res}"
/><o:p></o:p></p>
<p class=MsoPlainText style='margin-left:.5in;text-indent:.5in'><action
application="valet_park" data="my_lot ${parkednumber}"
/><o:p></o:p></p>
<p class=MsoPlainText style='text-indent:.5in'></condition><o:p></o:p></p>
<p class=MsoPlainText> </extension><o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText>Test.lua:<o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText>local dbh =
freeswitch.Dbh("freeswitch-connector", "root",
"system123#")<o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText>if dbh:connected() then<o:p></o:p></p>
<p class=MsoPlainText> if stream then<o:p></o:p></p>
<p class=MsoPlainText>
stream:write("result - database connected\n\n")<o:p></o:p></p>
<p class=MsoPlainText> else<o:p></o:p></p>
<p class=MsoPlainText> print("database
connected")<o:p></o:p></p>
<p class=MsoPlainText> end<o:p></o:p></p>
<p class=MsoPlainText>else <o:p></o:p></p>
<p class=MsoPlainText> if stream then<o:p></o:p></p>
<p class=MsoPlainText> stream:write("result
- database error\n")<o:p></o:p></p>
<p class=MsoPlainText> else<o:p></o:p></p>
<p class=MsoPlainText> print("database
error")<o:p></o:p></p>
<p class=MsoPlainText> end<o:p></o:p></p>
<p class=MsoPlainText> return<o:p></o:p></p>
<p class=MsoPlainText>end<o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText>-- set variable - or print to console if no session is
available <o:p></o:p></p>
<p class=MsoPlainText>local function sv(key, val)<o:p></o:p></p>
<p class=MsoPlainText> if session then<o:p></o:p></p>
<p class=MsoPlainText>
session:setVariable("parkednumber", val)<o:p></o:p></p>
<p class=MsoPlainText> print("value
set in session")<o:p></o:p></p>
<p class=MsoPlainText> elseif stream then<o:p></o:p></p>
<p class=MsoPlainText>
stream:write(string.format("%25s : %s\n", key, val))<o:p></o:p></p>
<p class=MsoPlainText> else -- a script executed using luarun does
not have a stream<o:p></o:p></p>
<p class=MsoPlainText> print(key .. "
: " .. val)<o:p></o:p></p>
<p class=MsoPlainText> end<o:p></o:p></p>
<p class=MsoPlainText>end<o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText>number = 8501<o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText>while(number < 8600)<o:p></o:p></p>
<p class=MsoPlainText>local my_query = "select data from db_data where
data_key = '" .. tries .. “’”<o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText> assert(dbh:query(my_query,
function(row)<o:p></o:p></p>
<p class=MsoPlainText> for
key, val in pairs(row) do -- in this example only one<o:p></o:p></p>
<p class=MsoPlainText>row with one column will be returned<o:p></o:p></p>
<p class=MsoPlainText> sv(key,
val)
-- so here key = 'user'<o:p></o:p></p>
<p class=MsoPlainText> end<o:p></o:p></p>
<p class=MsoPlainText> end))<o:p></o:p></p>
<p class=MsoPlainText> tries = tries + 1<o:p></o:p></p>
<p class=MsoPlainText>end<o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I want to execute the above query, and check whether any result
came. If results came, then I want to proceed to next number. And if no result
came, then I want to set it in the session variable and break from the while loop.
But I could only find the syntax for assert, no way to check whether the query
returned any result or not. Please help me out.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Regards<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Nitin<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] <b>On Behalf Of </b>Nitin
Tomer<br>
<b>Sent:</b> Friday, November 30, 2012 10:03 AM<br>
<b>To:</b> 'FreeSWITCH Users Help'<br>
<b>Subject:</b> Re: [Freeswitch-users] valet_park help needed<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Dear Michael,<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks for your response.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>If I can’t suppress the announcement of location to
caller, then I will have to look at an alternative approach.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I make entries for every location on which a call is parked in
my database, so will it be possible for me to do –<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><span
style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Suppose I have assigned extension 8501 to 8599 for parking.<o:p></o:p></span></p>
<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><span
style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Run a for loop, from 8501 to 8599<o:p></o:p></span></p>
<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><span
style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Check whether an entry exists for that extension in the database<o:p></o:p></span></p>
<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><span
style='mso-list:Ignore'>4.<span style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>If an entry exists, it means a call is parked at that extension,
move to next extension<o:p></o:p></span></p>
<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><span
style='mso-list:Ignore'>5.<span style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>If no entry exists, it means extension is free. Park the call
there and make entry in database<o:p></o:p></span></p>
<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><span
style='mso-list:Ignore'>6.<span style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Break the loop<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Will it work? And if it will, please guide me on how to do that.
I am new to Freeswitch and not very well-versed with it.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Regards<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Nitin<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] <b>On Behalf Of </b>Michael
Collins<br>
<b>Sent:</b> Friday, November 30, 2012 8:30 AM<br>
<b>To:</b> FreeSWITCH Users Help<br>
<b>Subject:</b> Re: [Freeswitch-users] valet_park help needed<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'>As far as I know you can't
suppress the announcement of the location to the caller.<br>
<br>
For the event socket you have a lot of homework to do. I recommend:<br>
<a
href="https://www.packtpub.com/freeswitch-1-0-6-build-robust-high-performance-telephony-systems/book">FS
Book</a>, chapter 9<br>
<a href="http://link.packtpub.com/nuIOlX">FS Cookbook</a>, chapter 4<br>
Wiki event socket (see link on left)<br>
<br>
For a really quick dive into what events look like:<br>
launch fs_cli and type:<br>
/log 0<br>
/events plain all<br>
<br>
You'll see EVERY event that the system throws. Try this to narrow it down just
to valet events:<br>
<br>
/filter Event-Class valet_parking::info<br>
<br>
I typed most of this off the top of my head, so <a
href="http://wiki.freeswitch.org/wiki/Reporting_Bugs#Standard_Disclaimer">standard
disclaimer</a> applies. Hope this helps you get started!<br>
-MC<o:p></o:p></p>
<div>
<p class=MsoNormal>On Thu, Nov 29, 2012 at 6:09 PM, Nitin Tomer <<a
href="mailto:ntomer@newgen.co.in" target="_blank">ntomer@newgen.co.in</a>>
wrote:<o:p></o:p></p>
<div>
<div>
<p class=MsoNormal><span style='font-family:"Arial","sans-serif"'>Dear Michael,<br>
<br>
Thanks for your help.<br>
<br>
About thsis - "Using 'auto in' the system will announce the parking
location. If you are sending a call in from an IVR then the caller will hear
their park location. The only way to know where the call went would be to watch
the event socket for relevant valet events. "<br>
<br>
Yes, right now the extension where call is parked, is announced to the caller.
I don't want that to happen. I don't want it announced to caller, rather I want
it retruned to me, so that I can store it in database. So that my agents can
pick the call after seeing the extension where it is parked.<br>
<br>
Please tell me more details about how to watch the event socket for valet
events.<br>
<br>
Regards<br>
<br>
Nitin<br>
<br>
On Friday, 30-11-2012 on 6:38 Michael Collins wrote:<o:p></o:p></span></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-family:"Arial","sans-serif"'>Answers
inline...<o:p></o:p></span></p>
<div>
<p class=MsoNormal><span style='font-family:"Arial","sans-serif"'>On Thu, Nov
29, 2012 at 2:15 AM, Nitin Tomer <<a href="mailto:ntomer@newgen.co.in"
target="_blank">ntomer@newgen.co.in</a>> wrote:<o:p></o:p></span></p>
<div>
<div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi,</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I am
using valet_park. I’ve configure a IVR menu of an extension, based on
user’s input call is forwarded to other extensions.</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Extension
on which end-users will call –</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-family:"Arial","sans-serif"'><extension
name="ivr_nitin"><br>
<condition
field="destination_number" expression="^5002$"><br>
<action
application="answer"/><br>
<action application="sleep"
data="500"/><br>
<action
application="ivr" data="nitin_ivr"/><br>
</condition><br>
</extension></span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-family:"Arial","sans-serif"'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-family:"Arial","sans-serif"'>The IVR configuration XML is –</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-family:"Arial","sans-serif"'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><span
style='font-family:"Arial","sans-serif"'><include><br>
<menu name="nitin_ivr"<br>
greet-long="say:Welcome to Newgen General Insurance Company. Press 1 for
Changing Address, 2 for Changing Nominee or 3 for Close Policy."<br>
greet-short="say:Welcome to Newgen. Press 1 for Changing Address, 2 for
Changing Nominee or 3 for Close Policy."<br>
invalid-sound="ivr/ivr-that_was_an_invalid_entry.wav"<br>
exit-sound="voicemail/vm-goodbye.wav"<br>
confirm-macro=""<br>
confirm-key=""<br>
tts-engine="flite"<br>
tts-voice="slt"<br>
confirm-attempts="3"<br>
timeout="3000"<br>
inter-digit-timeout="2000"<br>
max-failures="3"<br>
max-timeouts="3"<br>
digit-len="4"><br>
<br>
<entry action="menu-exec-app" digits="1"
param="transfer 450 XML default"/> <!--
Change Address --><br>
<entry action="menu-exec-app" digits="2"
param="transfer 451 XML default"/> <!--
Change Nominee --><br>
<entry action="menu-exec-app" digits="3"
param="transfer 452 XML default"/> <!-- Close
Policy --><br>
<br>
</menu><br>
</include></span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Once
user presses “1”, call is forwarded to 450, for this extension
dialplan entry is –</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-family:"Arial","sans-serif"'><extension><br>
<condition
field="destination_number" expression="^(450)$"><br>
<action
application="play_and_get_digits" data="10 16 3 3000 #
say:'Press your account number, followed by hash key' say:'Wrong Input' res
\d+" /><br>
<action
application="phrase" data="spell,${res}"/><br>
<action
application="db" data="insert/testapp/newcall1/${res}"
/> <br>
<action application="set" data="caller_id_name=Change Address
Request" /><br>
<action application="set" data="call_timeout=60" /><br>
<action application="set" data="originate_timeout=60"
/><br>
<action application="valet_park" data="my_lot auto in 8501
8599" /> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-family:"Arial","sans-serif"'>
</condition><br>
</extension></span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Here,
the call is parked at any available extension between 8501 to 8599.</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Then
I’ve set up an extension to pick up calls –</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-family:"Arial","sans-serif"'><extension
name="park-out"><br>
<condition field="destination_number"
expression="^(85\d\d)$"><br>
<action application="answer"/><br>
<action application="valet_park"
data="my_lot $1"/><br>
</condition><br>
</extension></span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I
have a few questions –</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>
<p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>1.</span><span
style='font-size:7.0pt;color:#1F497D'> </span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Valet_park
parks the call on any available extension between 8501 to 8599 (</span><span
style='font-family:"Arial","sans-serif"'><action
application="valet_park" data="my_lot auto in 8501 8599"
/>). Is there any way to let me know on which extension the call have been
parked?<o:p></o:p></span></p>
</div>
</div>
</div>
<div>
<p class=MsoNormal><span style='font-family:"Arial","sans-serif"'>Using 'auto
in' the system will announce the parking location. If you are sending a call in
from an IVR then the caller will hear their park location. The only way to know
where the call went would be to watch the event socket for relevant valet
events. <o:p></o:p></span></p>
</div>
<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'>
<div>
<div>
<div>
<p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>2.</span><span
style='font-size:7.0pt;color:#1F497D'> </span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>How
can I get the number from which call was made in extension 450. The idea is to
use the caller number as key and entered value as value while making entry in
database (</span><span style='font-family:"Arial","sans-serif"'><action
application="db" data="insert/testapp/newcall1/${res}"
/>)?<o:p></o:p></span></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class=MsoNormal><span style='font-family:"Arial","sans-serif"'>Do you mean
the caller id number? That's literally in channel variable ${caller_id_number} <o:p></o:p></span></p>
</div>
<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'>
<div>
<div>
<div>
<p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>3.</span><span
style='font-size:7.0pt;color:#1F497D'> </span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>If
two users call on extension 5002 (where IVR menu is played), what will happen?
Will the second user have to wait for first to finish or whether both will be
connected parallel?</span><span style='font-family:"Arial","sans-serif"'><o:p></o:p></span></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class=MsoNormal><span style='font-family:"Arial","sans-serif"'>Both can be
in the IVR at the same time and they won't affect each other at all.<br>
<br>
-MC <o:p></o:p></span></p>
</div>
<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'>
<div>
<div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Please
help me out.</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Regards</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Nitin</span><o:p></o:p></p>
</div>
</div>
<p class=MsoNormal><span style='font-family:"Arial","sans-serif"'><o:p> </o:p></span></p>
<div>
<h6><span style='font-family:"Arial","sans-serif"'>Disclaimer :- This e-mail
and any attachment may contain confidential, proprietary or legally privileged
information. If you are not the original intended recipient and have
erroneously received this message, you are prohibited from using, copying,
altering or disclosing the content of this message. Please delete it
immediately and notify the sender. Newgen Software Technologies Ltd (NSTL)
accepts no responsibilities for loss or damage arising from the use of the
information transmitted by this email including damages from virus and further
acknowledges that no binding nature of the message shall be implied or assumed
unless the sender does so expressly with due authority of NSTL. <o:p></o:p></span></h6>
</div>
<p class=MsoNormal><span style='font-family:"Arial","sans-serif"'><o:p> </o:p></span></p>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-family:"Arial","sans-serif"'><br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a
href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><o:p></o:p></span></p>
</blockquote>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-family:"Arial","sans-serif"'><br>
<br clear=all>
<br>
-- <br>
Michael S Collins<br>
Twitter: @mercutioviz<br>
<a href="http://www.FreeSWITCH.org" target="_blank">http://www.FreeSWITCH.org</a><br>
<a href="http://www.ClueCon.com" target="_blank">http://www.ClueCon.com</a><br>
<a href="http://www.OSTAG.org" target="_blank">http://www.OSTAG.org</a><o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<div>
<h6>Disclaimer :- This e-mail and any attachment may contain confidential,
proprietary or legally privileged information. If you are not the original
intended recipient and have erroneously received this message, you are
prohibited from using, copying, altering or disclosing the content of this
message. Please delete it immediately and notify the sender. Newgen Software
Technologies Ltd (NSTL) accepts no responsibilities for loss or damage arising
from the use of the information transmitted by this email including damages
from virus and further acknowledges that no binding nature of the message shall
be implied or assumed unless the sender does so expressly with due authority of
NSTL. <o:p></o:p></h6>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a
href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><o:p></o:p></p>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><br>
<br clear=all>
<br>
-- <br>
Michael S Collins<br>
Twitter: @mercutioviz<br>
<a href="http://www.FreeSWITCH.org" target="_blank">http://www.FreeSWITCH.org</a><br>
<a href="http://www.ClueCon.com" target="_blank">http://www.ClueCon.com</a><br>
<a href="http://www.OSTAG.org" target="_blank">http://www.OSTAG.org</a><o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<h6>Disclaimer :- This e-mail and any attachment may contain confidential,
proprietary or legally privileged information. If you are not the original
intended recipient and have erroneously received this message, you are
prohibited from using, copying, altering or disclosing the content of this
message. Please delete it immediately and notify the sender. Newgen Software
Technologies Ltd (NSTL) accepts no responsibilities for loss or damage arising
from the use of the information transmitted by this email including damages
from virus and further acknowledges that no binding nature of the message shall
be implied or assumed unless the sender does so expressly with due authority of
NSTL. <o:p></o:p></h6>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<br><html>
<body><h6>Disclaimer :- This e-mail and any attachment may contain confidential, proprietary or legally privileged information. If you are not the original intended recipient and have erroneously received this message, you are prohibited from using, copying, altering or disclosing the content of this message. Please delete it immediately and notify the sender. Newgen Software Technologies Ltd (NSTL) accepts no responsibilities for loss or damage arising from the use of the information transmitted by this email including damages from virus and further acknowledges that no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of NSTL.
</h6></body>
</html>
<br></body>
</html>