Store Header Value in to the Call param in CIM
Create the ARS route that stores arbitrary SIP header value into the call info parameter of Brekeke CIM.
In this example, the ARS route get the value of “X-CustomerID” header with the default plugin “sipheader“, then store the value into the “_pbx.cti.param” (*1) which can be refered on Brekeke CIM.
*1: the parameter “_pbx.cti.param” that can be referred on CIM is available on Brekeke PBX version 3.14.5.13 or later.
<On Brekeke PBX>
Matching patterns: Plugin 1 : sipheader <- Use default plugin "sipheader" Param 1 : X-CustomerID <- Set arbitrary SIP header name Return 1 : (.+)
Deploy patterns: DNIS : 6501234567 <-Set your target DNIS on CIM Custom : &_pbx.cti.param=X-CustomerID:&p1
<On Brekeke CIM>
Step 1. Add the following parameters at the [Admin Menu] > [Settings] > [Advanced Settings] on CIM.
widget.scripting.source=<script>widget1 widget.scripting.event.calloffered.function=callofferedwidget.scripting.event.agentstatus.function=<function> Example: widget.scripting.source=
Step 2. Add the following script named as “widget1” at the [Script] menu on CIM.
In this script, the value of the parameter “_pbx.cti.param“ *2 is referred and it is output the console log.
var calloffered= function(widget,ev){ console.log( ev.extCallInfo["_pbx.cti.param"]); }
When an agent receive a call, the value of _pbx.cti.param is displayed in the console log.
*2: The values in the parameter “_pbx.cti.param” can be refered on Brekeke CIM version 2.7.8.0.16136_3 or later.