简体   繁体   English

Twilio Conference statusCallback - PHP - statusCallback url 永远不会在指定事件上被调用

[英]Twilio Conference statusCallback - PHP - statusCallback url never gets called on specified events

I'm trying to log some data about ongoing conferences in my database by using conference statusCallbackEvent and statusCallback, however my statusCallback URL never gets called for the events specified in statusCallbackEvent.我试图通过使用会议 statusCallbackEvent 和 statusCallback 在我的数据库中记录一些关于正在进行的会议的数据,但是我的 statusCallback URL 永远不会被 statusCallbackEvent 中指定的事件调用。

For example, for an outgoing call I initiate the conference as such:例如,对于拨出电话,我这样发起会议:

$response = new VoiceResponse();

$conferenceName = "agent_name";

$dial = $response->dial('');

$dial->conference(
    $conferenceName,
    [
        'startConferenceOnEnter' => True,
        'endConferenceOnExit' => True,
        'statusCallback' => 'https://my.url.com/conferenceCallback',
        'statusCallbackEvent' => 'start join end'
    ]
);

Then I add participants with:然后我添加参与者:

$client->conferences($conferenceName)
    ->participants
    ->create()

I can see the events being triggered when I look at the Participant timeline in Insights, but the callback url is never called.当我查看 Insights 中的参与者时间线时,我可以看到正在触发的事件,但从未调用回调 url。

I'm using this doc as reference: https://www.twilio.com/docs/voice/twiml/conference我使用这个文档作为参考: https ://www.twilio.com/docs/voice/twiml/conference

Really confused about why this is not working.真的很困惑为什么这不起作用。

For people having the same issue, @AmirBar, twilio support wasn't much help but I figured it out.对于有同样问题的人,@AmirBar,twilio 支持并没有太大帮助,但我想通了。

Don't use "statusCallback" on $dial->conference, instead use "conferenceStatusCallback" and "conferenceStatusCallbackEvent" on the first participant resource like so:不要在 $dial->conference 上使用“statusCallback”,而是在第一个参与者资源上使用“conferenceStatusCallback”和“conferenceStatusCallbackEvent”,如下所示:

$client->conferences($conferenceName)->participants->create. $client->conferences($conferenceName)->participants->create.

This works for me.这对我有用。 See doc here: Conference Participant Resource请参阅此处的文档: 会议参与者资源

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

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