Nexmo Laravel连接到PSTN端点无法正常工作

问题描述 投票:0回答:1

我的代码如下所示。除了将呼叫连接到PSTN端点之外,一切都适合我。我想可能是“连接”功能可能不包含在我正在使用的Laravel Nexmo包中。我正在使用这些:

https://github.com/Nexmo/nexmo-laravel

这是基于另一个nexmo包构建的:

https://github.com/Nexmo/nexmo-php

我的代码:

public function getNexmoAnswer(Request $request)
{
    return
            [
        [
            'action' => 'talk',
            'voiceName' => 'Justin',
            'text' => 'Welcome to our great site’
        ],
        [
            'action' => 'talk',
            'voiceName' => 'Justin',

            'text' => "Press # to search now the e.t.a status of your latest order.",
            'bargeIn' => true
        ],
        [
            'action' => 'connect',
            'from' => '17181234567’,
            'endpoint' => [
            'type' => 'phone',
            'number' => '18451234567’
                          ]
        ]
             ];
}
laravel nexmo
1个回答
1
投票

连接操作是Nexmo的NCCO系统的一部分,与Nexmo-Laravel和Nexmo-PHP无关。你的NCCO对我来说是正确的。

要连接到其他号码,您需要通过添加点数来激活您的帐户。此外,你正在使用的from号码(17181234567)必须是从Nexmo购买的号码

© www.soinside.com 2019 - 2024. All rights reserved.