简体   繁体   English

Nexmo 呼入电话功能突然无法使用 - 代码 2 年未变

[英]Nexmo inbound phone call features suddenly not working - code unchanged for 2 years

We have an order status system with many users (store owners).我们有一个有很多用户(店主)的订单状态系统。 All are assigned Nexmo numbers by myself - numbers that we own - and all link to my own application which connects to our db storing all order info from all our stores.所有这些都是由我自己分配的 Nexmo 号码——我们拥有的号码——并且所有链接到我自己的应用程序,该应用程序连接到我们的数据库,存储来自我们所有商店的所有订单信息。 Each user publishes their phone numbers to their customers or link them up in their own VOIP systems to transfer to their assigned Nexmo number upon request.每个用户都会向他们的客户发布他们的电话号码,或者将他们链接到他们自己的 VOIP 系统中,以根据要求转移到他们分配的 Nexmo 号码。 Our code will look at the number dialed ('to') and the number from the caller ID ('from') to determine what records to query from our database to the user.我们的代码将查看拨打的号码 ('to') 和来自来电显示的号码 ('from'),以确定从我们的数据库向用户查询哪些记录。

This is my Laravel code.这是我的 Laravel 代码。 It has stopped working consistently.它一直停止工作。 Some users hear nothing upon call start, others hear just the first part.一些用户在通话开始时什么也听不到,而另一些用户只听到第一部分。 Key prompts thereafter work for all users, only the initial speech and stream do not work properly.此后按键提示适用于所有用户,只有初始语音和流无法正常工作。 Any idea what could be wrong suddenly?知道突然会出什么问题吗?

        $store = $this->st_manager->find_record_by_nexmo_num(Input::get('to'));
        $store_name = $store['store_name'];
        $from = $_GET['from'];
        $store_phone = "1" . $store['store_phone'];
       
        if ($from == $store_phone) {
            $link_to_audio = "https://example.com/press_pound_with_no_caller_id.mp3";
        } else {
            $link_to_audio = "https://example.com/press_pound_with_caller_id.mp3";
        }

            return [


                [
                    'action' => 'talk',
                    'voiceName' => 'Matthew',
                    'level' => '1',
                    'bargeIn' => 'true',
                    'text' => "Welcome to the $store_name automated order status system",
                ],
                [

                    'action' => 'stream',
                    'bargeIn' => 'true',
                    'level' => '1',
                    'streamUrl' => ["$link_to_audio"],
                ],
                [
                    'action' => 'input',
                    'bargeIn' => 'true',
                    'eventUrl' => [
                        route('main.nexmo.event') . '?from=' . Input::get('from') . '&to=' . Input::get(
                            'to'
                        )
                    ],
                    'timeOut' => 150,
                    'submitOnHash' => true,
                    'maxDigits' => 11,
                ]

            ]; ```

        

I finally nailed this issue by switching from playing mp3 recordings to regular NCCO talk instead.我终于通过从播放 mp3 录音切换到常规 NCCO 谈话来解决这个问题。 Apparently either the mp3s now need to be loaded fully when the call is answered, or they have become slower to load into the system or something else of this nature.显然,要么在接听电话时现在需要完全加载 mp3,要么加载到系统中的速度变慢或其他类似的东西。 I do not know why this has changed, this code has been up there for years including the mp3's (as I already indicated in my post) but this workaround which is luckily not inconvenient for me, is working.我不知道为什么这已经改变了,这个代码已经存在多年了,包括 mp3(正如我在我的帖子中已经指出的那样),但是这个对我来说并不不方便的解决方法正在起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM