I am looking for implementing the following scenario:
Caller A calls PSTN number, the Caller A number will be compared to the business rule on the application in CASE A and will be permitted to proceed with his call. In CASE B, the caller will hear an announcement and his call will be blocked before handing it over to the gateway.
My question is what will be the response format in each case? Do I even have to have a pre-configured response for the allowed calls?
For the blocked calls and provided I added the custom announcement to the UCM, how will the response be formatted in terms of Decision, Obligation, and AttributeAssignment to play the announcement then block the call.
You should return a response for allowed and denied. Otherwise Unified CM has to 'timeout' awaiting a response for all calls that trigger the ECCP. You can just do a simple decision for the allow as long as you're not trying to do any other treatments.
The XML developers guide has example responses that show you what they would look like. I have done both canned responses with the blanks filled in as well as programmatically building the XML, so either way should work.
Have a look at this: