Cisco Unified Routing Rules XML Interface

« Back to Routing Rules API Questions

Unable to play announcment on reject.

Combination View Flat View Tree View
Threads [ Previous | Next ]
We are trying to play announcment on call reject. Call rejection is working fine, but instead of annuncement we are getting a reorder tone - fast busy.
We are sending a correct xml to CUCM from the app with correct ann_id. Any ideas ?
 
<Result ResourceId="CISCO:UCemoticonoiceOrVideoCall">
<Decision>Deny</Decision>
<Status>
<StatusCode>urn:oasis:names:tc:xacml:1.0:status:ok</StatusCode>
<StatusMessage>Everything is good.</StatusMessage>
<StatusDetail>No more detail needed.</StatusDetail>
</Status>
<Obligations>
<Obligation FulfillOn="Deny" ObligationId="Deny.obligation.id">
<AttributeAssignment AttributeId="Route:simple">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">
<cixml version="1.0">
<reject>
<announce identification="VCA_00121"/>
</reject>
</cixml>
</AttributeValue>
</AttributeAssignment>
</Obligation>
</Obligations>
</Result>
</Response>
 

Sorry for the delayed response, I was on vacation.

Two things,

1. Did you properly escape the cixml?

1&lt;announce identification="VCA_00121"/&gt;


2. Is the annunciator properly setup in Unified CM? If you are getting reorder, the phone might not be able to properly access the media stream.

Mark

Hi Mark,

What does CUCM actually expect in the response for the CIXML part in Mladen's example above? Meaning, does the entire CIXML need to be escaped (including <cixml...></cixml>) or only the directive with its sub nodes under the <cixml> node?

What is also the correct attribute name of the CIXML version - "version" or "ver"? We saw it a couple different ways between the Routing Rules Whitepaper and the Routing Rules Interface Overview Powerpoint presentation.

Examples:

1)

<Response><Result ResourceId="CISCO:UCemoticonoiceOrVideoCall"><Decision>Deny</Decision><Status><StatusCode>urn:oasis:names:tc:xacml:1.0:status:ok</StatusCode><StatusMessage>Everything is good.</StatusMessage><StatusDetail>No more detail needed.</StatusDetail></Status><Obligations><Obligation FulfillOn="Deny" ObligationId="Deny.obligation.id"><AttributeAssignment AttributeId="Route:simple"><AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">&lt;cixml ver="1.0"&gt;&lt;reject&gt;&lt;announce identification="Tone-on-Hold"/&gt;&lt;/reject&gt;&lt;/cixml&gt;</AttributeValue></AttributeAssignment></Obligation></Obligations></Result></Response>

2)

<Response><Result ResourceId="CISCO:UCemoticonoiceOrVideoCall"><Decision>Deny</Decision><Status><StatusCode>urn:oasis:names:tc:xacml:1.0:status:ok</StatusCode><StatusMessage>Everything is good.</StatusMessage><StatusDetail>No more detail needed.</StatusDetail></Status><Obligations><Obligation FulfillOn="Deny" ObligationId="Deny.obligation.id"><AttributeAssignment AttributeId="Route:simple"><AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">&lt;cixml version="1.0"&gt;&lt;reject&gt;&lt;announce identification="Tone-on-Hold"/&gt;&lt;/reject&gt;&lt;/cixml&gt;</AttributeValue></AttributeAssignment></Obligation></Obligations></Result></Response>

3)

<Response><Result ResourceId="CISCO:UCemoticonoiceOrVideoCall"><Decision>Deny</Decision><Status><StatusCode>urn:oasis:names:tc:xacml:1.0:status:ok</StatusCode><StatusMessage>Everything is good.</StatusMessage><StatusDetail>No more detail needed.</StatusDetail></Status><Obligations><Obligation FulfillOn="Deny" ObligationId="Deny.obligation.id"><AttributeAssignment AttributeId="Route:simple"><AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string"><cixml version="1.0">&lt;reject&gt;&lt;announce identification="Tone-on-Hold"/&gt;&lt;/reject&gt;</cixml></AttributeValue></AttributeAssignment></Obligation></Obligations></Result></Response>

4)

<Response><Result ResourceId="CISCO:UCemoticonoiceOrVideoCall"><Decision>Deny</Decision><Status><StatusCode>urn:oasis:names:tc:xacml:1.0:status:ok</StatusCode><StatusMessage>Everything is good.</StatusMessage><StatusDetail>No more detail needed.</StatusDetail></Status><Obligations><Obligation FulfillOn="Deny" ObligationId="Deny.obligation.id"><AttributeAssignment AttributeId="Route:simple"><AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string"><cixml ver="1.0">&lt;reject&gt;&lt;announce identification="Tone-on-Hold"/&gt;&lt;/reject&gt;</cixml></AttributeValue></AttributeAssignment></Obligation></Obligations></Result></Response>

Neither of these examples worked for us to have CUCM play the "Tone-on-hold" when the call was rejected. We want to make sure we have the correct XML response generated. What are your thoughts?

Thank you!

Hi Gery,

I will be honest that I haven't tried all those variations that you listed. I have based all my coding on the sample application that is posted. In the sample app, 'ver' is used rather than any other tag, and the entire CIXML block uses escapes.

I do most of my work in Python, so to make it a bit more generic than the Sample App, I create Python String Templates for each reply I want to use. (I know I could probably break up these templates and make it even more generic, but I find this method most useful when illustrating functionality.):

 1rejectTemplate = string.Template("""\
 2    <?xml encoding="UTF-8" version="1.0"?>
 3    <Response>
 4        <Result>
 5            <Decision>Deny</Decision>
 6            <Status></Status>
 7            <Obligations>
 8                <Obligation FulfillOn="Deny" ObligationId="urn:cisco:xacml:response-qualifier">
 9                    <AttributeAssignment AttributeId="urn:cisco:xacml:is-resource">
10                        <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">
11                            &lt;cixml ver="1.0"&gt;
12                                &lt;reject&gt;
13                                    &lt;announce identification=$greetingID /&gt;
14                                    &lt;reason&gt;
15                                        $reasonValue
16                                    &lt;/reason&gt;
17                                &lt;/reject&gt;
18                            &lt;/cixml&gt
19                        </AttributeValue>
20                    </AttributeAssignment>
21                </Obligation>
22            </Obligations>
23        </Result>
24    </Response>
25""")

If you aren't familiar with Python, you substitute in a value for anything that begins with a '$', so $greetingID becomes "VCA_00121" and $reasonValue becomes 'call blocking policy' or some such text.
It sounds like I might have to play around with some of the other forms that you've listed and make sure they all work...then make sure the documents all match.
I'm hoping this helps,
Mark

Hi Mark,

Thank you for the great example. I got it working. emoticon

It looks like both "ver" and "version" for the CIXML are acceptable. The problem seemed to be with the Status node. After I removed all the sub nodes I was able to hear the announcement after which fast busy followed (which is what I expected). I was going off of this document to build the Status sub nodes.

Thanks for your help!