Showing results for 
Search instead for 
Did you mean: 

Post Greeting Recordings on CUCN 9.1 - alternatives?

Rising star
Rising star

Does anybody know what Version of CUCN is required to set post greeting recording properties on Users and Call Handlers? I'm on 9.1 and it doesn't work (requests pass just fine, but nothing happens and extracted items have those properties empty even though I can see them just fine in the cuadmin pages) - and when I check the schema the properties aren't there either.

Is there an alternative that can be used and programmed using the APIs on version 9.1? I need something where files are centrally uploaded, I can get a list of them using an API, then assign them? Greetings appear to have a GreetingStreamFilesURI that's present in my CUCN 9.1, and I get the streaming file URIs for post greeting recordings (vmrest/postgreetingrecordings/<recordingId>/postgreetingrecordingstreamfiles), so could I use those?

6 Replies 6

Cisco Employee
Cisco Employee

just tried it via REST using the .NET SDK on 10.0 and 10.5 servers I have here - both worked ok - 9.1 ES25 does not - schema indicates it's not in there.

Can be done via ODBC, of course - you can check out the Python Scripting Host for an easy way to test this out if you don't want to fuss with ODBC connections on your own and the like:

Fetch the ObjectId from the  vw_PostGreetingRecording view and assign that ID to the PostGreetingRecordingObjectId property on the call handler you want (for a user it's their primary call handler). Use the csp_CallHandlerModify stored procedure to do that.  Pretty straight forward... if you wanted to pursue that and can't figure out how to model it in PSH or your own application I can help.

I figured I could go another way... I can get the PostGreetingRecordings including streaming file, so if I set that streaming file (GreetingStreamFilesURI in the Greeting object) for all the greetings, and set PlayWhat to 2, it should hopefully create the same effect.

Don't you have an issue with keeping the DB open when you use the database directly?

Not sure I'm understanding what you're doing here - you look to be mixing and matching post greeting recordings with regular greetings - that wont work by design.

the call handler object has a post greeting recording ObjectId property you set to the ObjectId from the PostGreetingRecording table and you set when it plays (all the time, for external callers only etc...) - and that's it - you can't grab a post greeting recording and have it play for a regular greeting - those are two different things.  I'm a bit confused as to what you're actually trying to accomplish here.

When using ODBC just close out the connection when you're done - Connection allows for up to 10 ODBC connections by default at any given time - if constructed properly you'll only need one (if you're using DataReaders a reader uses it's own connection - I normally recommend using data tables instead for that reason).  Shouldn't be a problem.  If you leave a connection open the Unity Connection server will terminate it on its own after a period of inactivity anyway.

Jeff - we're all a bit confused here how we get to load greetings wave file once, then assign them to a bunch of users (I'm trying to work around the API limitations in CUCN 9.x) - I want to somehow load up a WAV File that can then be used in greetings of a bunch of boxes. But, the only thing we found was Custom recordings - which the APi names "Post Recording Greeting" - the thing is in "Call Management - Custom Recordings". API wise, it's Cisco Unity Connection Provisioning Interface (CUPI) API -- Custom Recordings - DocWiki.

That gives me the functionality I want.. and then I'd like to pick one of these recording stream files, assign it to the the greeting and be done with it. The documentation only mentions uploading/downloading WAV files (Cisco Unity Connection Provisioning Interface (CUPI) API -- Greetings - DocWiki) and that seems like a major waste of resources.

So I thought, Greeting.SetGreetingRecordingToStreamFile in the .NET API would be what I want.. I just need the stream file resource name and I'm golden).

Am I missing something fundamental here? I mean - I figure with all the convoluted functionality that unity connection has, the ability to bulk change greetings certainly should be available.

I figured I'd simply try and stumbled upon another bug - in Greeting.SetGreetingRecordingToStreamFile, the URI that you're targetting is

string strUrl = string.Format(@"{0}handlers/callhandlers/{1}/treetings/{2}/greetingstreamfiles/{3}",

                    pConnectionServer.BaseUrl,pCallHandlerObjectId, pGreetingType, pLanguageId);

It should be greetings, not treetings

Time for another source code checkout..

@edit: tried with self-compiled after correcting the path, still fails though:

PUT https://chdevcucn91.nxodev.intra:8443/vmrest/handlers/callhandlers/f6b6f236-381c-42ae-a7cf-2479a4447029/greetings/Busy/greetingstreamfiles/1031 HTTP/1.1

Cache-Control: no-cache

Content-Type: application/json

Accept: application/json, */*

Authorization: Basic YXhsYWRtaW46TmV4dGlyYTBuZQ==

Cookie: JSESSIONIDSSO=9BB34A356F377B95FC74B476FCA4BE86; Path=/; Secure; HttpOnly;JSESSIONID=B1F7136001CEF74978E594EE7D88AA6F; Path=/vmrest/; Secure; HttpOnly;

Host: chdevcucn91.nxodev.intra:8443

Content-Length: 161



HTTP/1.1 400 Bad Request

Cache-Control: private

Expires: Thu, 01 Jan 1970 01:00:00 CET

X-Frame-Options: SAMEORIGIN

Content-Type: application/json

Date: Fri, 12 Sep 2014 14:39:23 GMT

Connection: close


Content-Length: 102

{"errors":{"code":"DATA_EXCEPTION","message":"Missing parameter label.greetingstreamfile.streamfile"}}

Convoluted or not, that’s not how the system is designed (same with Unity for Windows before that and Repartee before that just to be complete). 

As noted already – you set the post greeting recording ObjectId on the call handler.  That’s how post greeting recordings get used.  Just fetching the greeting stream file reference and forcing it in wherever you want is not going to work I don’t think (it’s not supposed to).

Greetings for users and call handlers have 3 states – the default system, blank or personal.  Personal references a unique stream file reference (these are not supposed to be shared – they can be changed by each user via the phone or via the web admin – if they all parked on the same stream file reference that would be ugly at best).

Post greeting recordings are system level objects designed to be referenced by multiple handlers or users – these can be shared but that’s done by the post greeting objectId reference on the handler object, not by “borrowing” their stream file reference and repurposing it for a personal greeting recording reference.  I’ve never tried this but even if you can get it to work (which I’m doubting) it seems unexpected behavior would abound here with multiple personal recordings referencing a single stream file reference.

I’ve fixed the greeting URI reference – I’ll post it to NuGet later today but it’s already checked into source along with the updates for 10.5.2 around call handler owners (public lists can now be added as an owner).

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers