Example: Transferring Data in X-Headers

Using call attached data (CAD) is possible both in calls within the contact center system and in any SIP call to and from the system. To enable sending and receiving CAD, define the appropriate parameters in Call Switching > Trunks, in the Call Attached Data (CAD) block. See Managing Trunks. The following two IVR examples introduce possibilities to filter and transfer data in IVRs. To get the example files, contact Sinch.

For more information, see element descriptions in Supported VoiceXML Elements.

Incoming Call Handler

The incoming call handler (Example_IVR_CallInHandler.xml) processes items in the external data subsection of call extra data (EXTDATA from CALL_COMING) that match the configurable prefix. It removes the prefix from key names, and passes the resulting dictionary data in the call’s extra data. When the IVR finds a matching name that ends with the string "Queue", it replaces the destination number with the corresponding value.

Outgoing Call Handler

The outgoing call handler (files Example_IVR_CallOutHandler.xml and CallOutHandlerCustomizer.py in Example_IVR_CallOutHandler.zip) extracts the key/value pairs that originate from SAP CRM and are found in call extra data as CAD (XML) into a dictionary, where key names have a configurable prefix (in the example "X-ACME-" ), and transfers the call to a configurable destination number. The dictionary is added to either to the call’s extra data (transfer to internal number), or passed to bridge in the EXTDATA field (transfer to external number).

The IVR uses the CallOutHandlerCustomizer.py customizer, you must add and activate it before the IVR can be used. For more information, see Managing Customizers for IVRs.