Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Working with Time and User Input

  1. #1

    Red face Working with Time and User Input

    Would really appreciate some help with this one! With this script we're trying to faciliate 3 time slots - 9-5 "mainHours", 6-8 "afterHours", and 8-9am and 5-6pm "scndHours". The logic there seems to work fine.

    With mainHours and scdnHours want to ask extension from user or with no input go to receptionist. Only difference between these two is mainHours goes to one person and scndHours goes to a different one which is actually a ring group.

    afterHours just goes to a virtual extension with voice mail. That works fine.

    I don't know how to implement the jump from the time section to the user input section. Below I've tried with forms but just getting "Temporarily not available" so not sure if you can use multiple forms in one document or forms within forms. Also tried using blocks but does the same. Could someone please help me with the structure for this?

    Posting takes away formatting so I'll attached doc as well for easier viewing.

    Thanks so much!!

    <?xml version="1.0" encoding="UTF-8"?>
    <vxml version="2.0">
    <var name="working_hours" expr="'0'"/>
    <var name="working_days" expr="'0'"/>
    <form id="datetimeform">
    <object name="field1" classid="datetime">
    <filled>
    <if cond="datetime_wday &gt; '1'">
    <if cond="datetime_wday &lt; '7'">
    <assign name="working_days" expr="'1'"/>
    </if>
    </if>
    <if cond="working_days == '1'">
    <if cond="datetime_hour &gt; '9'">
    <if cond="datetime_hour &lt; '17'">
    <assign name="working_hours" expr="'1'"/>
    <elseif cond="datetime_hour &lt; '18'"/>
    <assign name="working_hours" expr="'2'"/>
    </if>
    <elseif cond="datetime_hour &gt; '8'"/>
    <assign name="working_hours" expr="'2'"/>
    </if>
    </if>
    <if cond="working_hours == '1'">
    <goto nextitem="mainHours"/>
    <elseif cond="working_hours == '2'"/>
    <goto nextitem="scndHours"/>
    <else/>
    <goto nextitem="afterHours"/>
    </if>
    </filled>
    </object>

    <object name="afterHours" classid="connect">
    <param name="extension" value="304"/>
    </object>
    </form>

    <form id="mainHours">
    <noinput count="1">
    <assign name="input1" expr="'230'"/>
    <goto nextitem="transfer1" />
    </noinput>
    <field name="input1" type="digits?length=3" modal="false">
    <prompt timeout="5s">
    <audio src="auto-attendent.wav" />
    </prompt>
    <filled>
    <goto nextitem="transfer1"/>
    </filled>
    </field>
    <object name="transfer1" classid="connect">
    <param name="extension" expr="input1"/>
    <exit/>
    </object>
    </form>

    <form id="scndHours">
    <noinput count="1">
    <assign name="input2" expr="'303'"/>
    <goto nextitem="transfer2" />
    </noinput>
    <field name="input2" type="digits?length=3" modal="false">
    <prompt timeout="5s">
    <audio src="auto-attendent.wav" />
    </prompt>
    <filled>
    <goto nextitem="transfer2"/>
    </filled>
    </field>
    <object name="transfer2" classid="connect">
    <param name="extension" expr="input2"/>
    <exit/>
    </object>

    </form>
    </vxml>
    Attached Files Attached Files

  2. #2

    Default

    o.0

    OMG

    Ummm ... to be honest the mammoth task of scripting that you have performed gave me a head spin... im sure its doing the same for you... why not simplify and use the standard call routing timers to satisfy what you are trying to achieve..

    You have 3 destinations all in call routing with different timers for operation - a total of four entries.

    4 routes all named the same... ie 4 x call routes all named - 400 - time dependant and all are active enabled so to speak.

    1./First route is your after hours and is active the times that you wish it to be and to the destinations as needed.

    2./Second on the list is the first of the scndHours that is active between the times of 8 am to 9 am during the days that you wish it to happen

    3./ Third is main hours of operation 9 am - 5 pm during the days that you wish it to happen


    4./ fourth is the last scndHours 5 pm - 6 pm during the days that you wish it to happen


    The main reason I would use the above is for flexibility and ease of management. If you want to change a time you just edit the route... not redesign the xml script. Changing the audio file or A/A scenario is done at that level and no redesigning of a complex vmxl script is needed.

    I like to make it easier for my customers to manage, this means they get to have a play break things and call me to fix them which i charge ooodles of money for to fix them...then I can buy more Quadros and feed my addiction of making money with the techno sadism that I have come to enjoy employing...

    All jokes aside... use the K.I.S.S. principal... Keep It Simple Sir

    If you send me a diagram of what you are trying to achieve I can point you in the direction of what I would do and post it here for all to poke fun at ....
    Let me know....

    Regards

    Kevin

  3. #3

    Default Complexity

    I don't really think this is so complicated. If you have a look at the code Epygi uses for the default AA this looks like a walk in the park! And surely the idea with allowing the ability to code in VXML should be to expand capabilities?

    Your point taken of doing it in routing groups. I got this to work however by splitting up the time logic in one AA and then the 3 different time groups in their own AAs, then based on the time of day it just forwards to the respective AA that has the behaviour we want.

    My fundamental questions is therefore just that I currently do the time logic in a form and then take the user input in a form, so I have them split in to separate files and separate AAs now. If I wanted to have them in one file, how do I do it? I tried having forms within a form which didn't work. Then tried using forms below the main form and call it with <goto nextitem=""/> but that doesn't work either.

    So it's just a syntax question, the logic works.

  4. #4
    Quadro Architect
    Join Date
    Jun 2006
    Location
    Around myself
    Posts
    2,075

    Default

    to excellence-it:
    It is completely OK having several forms in one document. And if you look again into the default AA script, you'll see the answer to your question there (line 61). Instead of using
    <goto nextitem="mainHours"/>, to jump between forms you should use <goto next="#mainHours"/>. I didn't test that with your script, but I think that should work.

    To Kevin:
    actually complexity depends strongly on your experience. If you have some programming experience, the VXML is not frightening, though from C++ programmers viewpoint that is a crap, at least it seems not to be intuitive language to me
    When providing training, I faced two completely different approaches to VXML scripting on Quadro - some think that it is extremely complex, and don't even want to look at scripts, others understand scripts easily from the beginning - depending on experience only.

    Best regards,
    David

  5. #5

    Default

    Quote Originally Posted by davrays View Post
    To Kevin:
    actually complexity depends strongly on your experience. If you have some programming experience, the VXML is not frightening, though from C++ programmers viewpoint that is a crap, at least it seems not to be intuitive language to me
    When providing training, I faced two completely different approaches to VXML scripting on Quadro - some think that it is extremely complex, and don't even want to look at scripts, others understand scripts easily from the beginning - depending on experience only.

    Best regards,
    David
    Hi David,

    My angle with the Epygi is formed from my ideal of selling the Epygi as a solution for the customer to manage.

    Scripts etc... is far beyond them to comprehend or understand.

    Thus...

    "The main reason I would use the above is for flexibility and ease of management. If you want to change a time you just edit the route... not redesign the xml script. Changing the audio file or A/A scenario is done at that level and no redesigning of a complex vmxl script is needed.

    I like to make it easier for my customers to manage, this means they get to have a play break things and call me to fix them"

    I semi figure that a good percentage of the people here are customers rather than Epygi Gurus... ( Although that count is increasing too )

    XML scripting is a great tool to reduce the steps needed to achieve the same result as I posted before. What I posted though uses the automated call routing which is more than likely an xml generated script from within the gui perhaps, and will provide the same result but will be easier for a customer to manage.

    Alteration of the script would need the person that wrote it or another like an Epygi Guru to spend time to rewrite the code.

    There are of course IT people that understand the logic and are able to write code accordingly excellence-it is possibly one of them.

    I wasnt suggesting that writing code is wrong...I write long hand as much as anyone - command line Asterisk is a good example of this as well as VXML A/A Scripts etc with the Epygi. I just am of the belief that if there is a simpler way to do something that still achieves your goal and provides an easy way for the end user to change things then I go down that route.

    Regards

    Kevin

  6. #6

    Default Thanks

    Thanks David! I'll give it a go!

  7. #7
    Quadro Architect
    Join Date
    Jun 2006
    Location
    Around myself
    Posts
    2,075

    Default

    Kevin: I got your approach setting traps for the customers and then rescueing them , that interesting idea . Seriously, I agree, the way of doing things with routing rules istead of writing VXML may be ofen useful. The only point where I don't completely agree - is the "simplicity" point. That is very subjective: some belive VXML is simple, and call routing is hard, som e this exactly vice versa. I will be happy if you continue to help people who afraid to deal with VXML here, to find their solution through routing rules.

    excellence-it: you're welcome

  8. #8
    Senior Member
    Join Date
    Mar 2008
    Location
    South Africa
    Posts
    110

    Smile

    I Agree with Kevin

    K.I.S.S (Keep It Simple Stupid)

  9. #9
    Quadro Architect
    Join Date
    Jun 2006
    Location
    Around myself
    Posts
    2,075

    Default

    South African agreed to Australian?! Something is wrong here...
    Shaun, probably you don't like rugby...

  10. #10
    Senior Member
    Join Date
    Mar 2008
    Location
    South Africa
    Posts
    110

    Default

    Nothing is really wrong

    my mother is from Perth, and she leaves there now - and i have an Aussie passport

    i sit on the fence between South Africa & Aussie....

    But in rugby "we - South Africa" are the world champs

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. User interface and manual
    By uspnetworks in forum Suggestions and Feedback
    Replies: 6
    Last Post: 01-26-2011, 03:55 AM
  2. IPphone extintion not working
    By ahmed79 in forum Troubleshooting and Problems
    Replies: 6
    Last Post: 02-29-2008, 08:47 AM
  3. Intercom in User settings
    By ssteiner in forum Installation
    Replies: 19
    Last Post: 02-13-2008, 02:52 AM
  4. VXML script not working,
    By ibisadmin in forum VXML Scripting on Quadro
    Replies: 1
    Last Post: 01-25-2007, 09:45 PM
  5. CID not working
    By alraiky in forum 'How Do I' Questions
    Replies: 6
    Last Post: 09-23-2006, 07:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •