‘按键信息’报告

通话过程中,当用户根据提示输入相关的按键(如通过 IVR 输入按键),PBX 向应用服务器推送“按键信息”报告。

报告参数

名称 类型 描述
action String 按键事件。
callid String 该通通话的 id。
ext Int 分机对象。
extid String 主叫分机号码。
info String 单个按键信息。
inboundid

outboundid

String 来电编码或去电编码。
outbound

inbound

String 对象参数。
from String 原始主叫号码。
to String 原始被叫号码。
trunk String 通过的中继名称。
flag Int 标识 DTMF 按键的顺序。
注: flag 从0开始标识。0表示第一个 DTMF 按键;1表示第二个 DTMF 按键;以此类推。
infos String DTMF 按键串。
sn String PBX 的 SN 码。

报告示例

分机 1005 拨打 IVR 号码,输入按键 2。

POST / HTTP/1.1
User-Agent: WebAPI
Host: 192.168.5.150: 8260
Content-Type: application/json
Accept: application/json
{
    "action": "DTMF",
    "callid": "1547389829.281",
    "call": [
        {
            "ext": {
                "extid": "1005",
                "callpath": "6500"
            }
        }
    ],
    "info": "2",
    "flag": "0",
    "sn": "369362089179"
}

外部号码 192883838 呼入 IVR 6500,拨打分机 1005。

POST / HTTP/1.1
User-Agent: WebAPI
Host: 192.168.5.150: 8260

Content-Type: application/json
Accept: application/json
{
    "action": "DTMF",
    "callid": "1547391097.305",
    "call": [
        {
            "inbound": {
                "from": "192883838",
                "to": "6500",
                "trunk": "SPS-6-36",
                "inboundid": "1547391097.305",
                "callpath": "6500"
            }
        }
    ],
    "info": "1",
    "flag": "0",
    "sn": "369362089179"
}

POST / HTTP/1.1
User-Agent: WebAPI
Host: 192.168.5.150: 8260

Content-Type: application/json
Accept: application/json
{
    "action": "DTMF",
    "callid": "1547391097.305",
    "call": [
        {
            "inbound": {
                "from": "192883838",
                "to": "6500",
                "trunk": "SPS-6-36",
                "inboundid": "1547391097.305",
                "callpath": "6500"
            }
        }
    ],
    "info": "0",
    "flag": "1",
    "sn": "369362089179"
}

POST / HTTP/1.1
User-Agent: WebAPI
Host: 192.168.5.150: 8260

Content-Type: application/json
Accept: application/json
{
    "action": "DTMF",
    "callid": "1547391097.305",
    "call": [
        {
            "inbound": {
                "from": "192883838",
                "to": "6500",
                "trunk": "SPS-6-36",
                "inboundid": "1547391097.305",
                "callpath": "6500"
            }
        }
    ],
    "info": "0",
    "flag": "2",
    "sn": "369362089179"
}

POST / HTTP/1.1
User-Agent: WebAPI
Host: 192.168.5.150: 8260

Content-Type: application/json
Accept: application/json

{
    "action": "DTMF",
    "callid": "1547391097.305",
    "call": [
        {
            "inbound": {
                "from": "192883838",
                "to": "6500",
                "trunk": "SPS-6-36",
                "inboundid": "1547391097.305",
                "callpath": "6500"
            }
        }
    ],
    "info": "5",
    "flag": "3",
    "sn": "369362089179"
}

POST / HTTP/1.1
User-Agent: WebAPI
Host: 192.168.5.150: 8260

Content-Type: application/json
Accept: application/json

{
    "action": "DTMF",
    "callid": "1547391097.305",
    "call": [
        {
            "inbound": {
                "from": "192883838",
                "to": "6500",
                "trunk": "SPS-6-36",
                "inboundid": "1547391097.305",
                "callpath": "6500"
            }
        }
    ],
    "infos": "1005",
    "sn": "369362089179"
}

分机 1005 拨打外部号码,进入对方的 IVR,输入按键 1。

POST / HTTP/1.1
User-Agent: WebAPI
Host: 192.168.5.150: 8260

Content-Type: application/json
Accept: application/json

{
    "action": "DTMF",
    "callid": "1547391490.309",
    "call": [
        {
            "ext": {
                "extid": "1005"
            }
        }
    ],
    "info": "1",
    "flag": "0",
    "sn": "369362089179"
}