cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1402
Views
0
Helpful
9
Replies

Emergency Code in IPCC Express

jagadishs
Level 1
Level 1

Hi,

We have a requirement for IPCC Express ,such that in case of emergency a code should be entered or a user with specific user-id logs in and all the scripts should start playing a emergency message and calls should get disconnected.

Any idea how this can be acheived ? Thanks in advance.

Regards,

Jagadish S

9 Replies 9

venkasub
Level 4
Level 4

Hi Jagadish,

The easiest approach to this is to create a XML file that is a template containing a keyword. Define a local variable and populate it with the desired

values based on the option choosed.

In the script, create a Document object that is based on the XML template. Use Text Substitution for Keywords step to replace a keyword with the desired local variable based on the option choosed(i.e., 1 for Emergency Message on, 2 for Emergency Message off etc).Then write the Document object to a file using the Write Document step to harddisk.

When the customer calls into the system, first open the document that was written to harddisk using Create XML Document step,then extract

the XML values using the Extract XML Document Data in a variable and play back the variable(Emergency Message) using play prompt step, then disconnect if emergency flag is set to 1 or take desired action accordingly.

Please find the attached sample scripts which demonstrate the application scenario that shows how to update an XML file and other is used to read and check the value. You can refer to these examples for

techniques on how to use an XML file to expose "common" variable to multiple instances of scripts. One is used to check the value and other is used to update it. The attached scripts was developed for different requirement but it covers the actual logic.

For more info, please refer the Cisco CRA Step Reference Guide http://www.cisco.com/univercd/cc/td/doc/product/voice/sw_ap_to/apps_3_1/english/admn_app/step_ref/index.htm

Hope this helps. Let me know if you need more details.

Hi,

In addition to my previous response, pls find the attached readme document for state_Update.aef script.

Regards

Venkat

Hi Venkat,

Thanks for your response.I tried using the state_update.aef script but once I enter the code correctly,control comes out of the script and system default script plays.

I found that there is some problem with Create File Doucment step because the file "systemstate.xml" is not available on the system and even though the "currentstate.xml" file is created ( size 0 bytes ),it gives the following error -

The XML page cannot be displayed

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

--------------------------------------------------------------------------------

XML document must have a top level element. Error processing resource 'file:///C:/Documents and Settings/Administrator/Desktop/currentstate.xml'.

Pls help me resolving this problem.

Regards,

Jagadish S

Hi Jagadish,

You need to create an XML template (systemstate.xml) for the script state_Update.aef to write one of three state indicators into the currentstate tag. They

are based on the entered digits as follows:

*70 = normal

*71 = closed

*72 = open

The above digit strings are configurable variables exposed on the application page. After writing one of the state indicators it save the file as currentstate.xml which will be used by state_Check.aef script to read the value from the xml, same will be used as a subflow to check the state.

The script requires that the following text be pasted into a file in the

c:\Program Files\wfavvid folder called:

systemstate.xml

%currentstate%

Please refer the annotate step in the script for more details. Hope it helps.

Regards

Venkat

Hi Venkat,

Thanks a lot,I was able to run the state_update.aef sucessfully and as per the script it is writing the state to the currentstate.xml.

But I am facing a strange problem - I am using the state_Check.aef as subflow and trying to compare the value of state variable using the if expression -

if(state == "closed")then

---true

-------Play prompt- emergencymsg

--------Terminate

--------End

---Flase

But strangely even when state string is set to "closed" the true step is not executed.I tried this both in the main script(by using parameter mapping) as well as in the subflow,but was unsucessfull.I even tried using a string varible (with value set to "closed")in the if expression,but still it is not working.

Is there anything wrong with what I am trying ?

Regards,

Jagadish S

Hi Jagadish,

Here is the XML file.

c:\Program Files\wfavvid folder called:

systemstate.xml

%currentstate%

I suspect the problem is with the XML file. Please remove the white spaces before and after %currentstatus% in the systemstate.xml. Because of the white space's, when you retrieve the value from currentstatus tag it returns as " closed " where as it should be "closed". You can notice this when you do reactive debugging.Please make the above changes and see if it fix the issues.

Let me know the result after the test.

Regards

Venkat

Hi Venkat,

Thanks for your response.I also suspected that the problem is with xml file,but I have checked it and found that there are no white spaces.

I am attaching the script which calls the state_Check.aef as subflow and compares the value of state variable with the if statement" if ( qstate == qclose ) Then " which is not working so that you can check and see whether there are any mistakes.

Also find attached the two xml files.

Regards,

Jagadish S

Hi Jagadish,

I looked at your script and xml files. If you closely take a look at the currentstate.xml file, you will find the following entry,

closed

(The problem is here, you can see white space before closed and after. This is because of the systemstate.xml file has white space's. To fix the above problem, you need to remove the whitespace in the systemstate.xml file.

Exisiting systemstate.xml has the following entry,

%currentstate%

change the above to

%currentstate%.

Make the above changes in the systemstate.xml file, that should fix the problem.

Let me know the test result.

Regards

Venkat

Hi Venkat,

The problem is resolved.Thanks a lot for your excellent support in resolving this issue.

Regards,

Jagadish S