[cisco-voip] UCCX question.

Anthony Holloway avholloway+cisco-voip at gmail.com
Wed Sep 3 12:10:23 EDT 2014


They way UCCX looks at P[...] is like this:

If the value supplied matches a variable name exactly, then the variable's
value is used as the prompt file name.

E.g., If I have a variable named strMyVariable and the value is
"welcome.wav" and I do this: P[strMyVariable], then UCCX will play the
welcome.wav file.

If the value supplied can be evaluated as an expression, then the
expression result is used as the filename.

E.g., If I do this: P["welc" + "ome.wav"], then UCCX will concatenate this
two String literals and play the file welcome.wav.

If the value supplied does not match a variable name exactly, and it cannot
be evaluated as an expression, then the literal meaning of what was
supplied is considered to be the filename.

E.g., If I do this: P[strMyVariable], and I don't have a variable called
strMyVariable, then UCCX will play the strMyVariable.wav file.  And yes,
UCCX does append .wav for you.  This is a good thing when you consider tpl
and wav implementations in the same script.  Want a use-case for TPL in
your environment?
<https://supportforums.cisco.com/document/12021016/uccx-enhancing-prompt-substitution-operator>

So, based on that, we should understand now what UCCX will do with:
P[Common\strToD].  It will attempt to play the file Common\strToD.wav,
which does not exist.  If you pull MIVR logs you will see a reference to
this.

Now, how do you fix it?  Well, you have to make UCCX evaluate your
expression inside of P[...], by actually changing it to an expression.
 P["Common\" + strToD] does just that.  UCCX will now concatenate your
String literal ("Common\") with your String object (strToD).

So, if your strToD variable had a value of "afternoon.wav", then UCCX will
play the file Common\afternoon.wav.

[image: Inline image 1]
Source: UCCX Programming Volume 3 - Expression Language Reference
<http://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/crs/express_9_0/programming/guide/SeriesVol3.pdf>
(An
in-depth and excellent resource)



On Tue, Sep 2, 2014 at 3:26 PM, Terry Oakley <Terry.Oakley at rdc.ab.ca> wrote:

> Would like to play a prompt that depending on time of day would say Good
> Morning, Good Afternoon or Good Evening.
>
>
>
> I have set a variable call strToD (string Time of Day) that sets the
> value.   Is there a way in the Play Prompt variable to use that value?  I
> have read page after page in the UCCX CRS manual and cannot find a
> reference to using the value of the variable.
>
>
>
> So right now I have this:
>
>
>
>
>
> This works but I want the P[Common\strToD] to work as strToD is set to Aft
> right now but that Play Promdt does not work.   I added the second Play
> Prompt line to test,  with P[Common\Aft], and it works fine, but of course
> will be very quickly the wrong time of day greeting.
>
>
>
> Thanks
>
>
>
> Terry
>
>
>
> *Terry Oakley*
>
> _______________________________________________
> cisco-voip mailing list
> cisco-voip at puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-voip
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20140903/a0b0a22f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 77867 bytes
Desc: not available
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20140903/a0b0a22f/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 3386 bytes
Desc: not available
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20140903/a0b0a22f/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 2041 bytes
Desc: not available
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20140903/a0b0a22f/attachment-0001.png>


More information about the cisco-voip mailing list