Drupal VoipCall getDirection、getCallChannel、getCallNetwork
我正在使用VoIP drupal模块实现一个脚本,发布如下:Drupal VoipCall getDirection、getCallChannel、getCallNetwork,drupal,drupal-7,drupal-modules,Drupal,Drupal 7,Drupal Modules,我正在使用VoIP drupal模块实现一个脚本,发布如下: $call= new VoipCall(); $phone_number='phone_number'; $text="example text" $script= new VoipScript('example'); $call->setScript($script); $success=voip_text($text, $call); 但是,尽管文本消息已成功发送,但我收到以下错误: Notice: Undefined p
$call= new VoipCall();
$phone_number='phone_number';
$text="example text"
$script= new VoipScript('example');
$call->setScript($script);
$success=voip_text($text, $call);
但是,尽管文本消息已成功发送,但我收到以下错误:
Notice: Undefined property: stdClass::$direction in VoipCall->getDirection() (line 415 of /home/hectorre/public_html/sites/all/modules/voipdrupal/modules/voipcall/voipcall.inc).
Notice: Undefined property: stdClass::$call_channel in VoipCall->getCallChannel() (line 503 of /home/hectorre/public_html/sites/all/modules/voipdrupal/modules/voipcall/voipcall.inc).
Notice: Undefined property: stdClass::$call_network in VoipCall->getCallNetwork() (line 523 of /home/hectorre/public_html/sites/all/modules/voipdrupal/modules/voipcall/voipcall.inc)
我查看了文档,但找不到任何资源来解释这些方法是什么以及如何解决错误 这是通知而不是错误。在Drupal 7中,您可以通过导航到admin/config/development/logging并选择单选按钮“None”来禁用通知(推荐用于生产): 还请注意,您必须在call object(呼叫对象)中设置目的地号码:
$call= new VoipCall();
$phone_number='phone_number';
$call->setDestNumber($phone_number);
$text="example text"
$script= new VoipScript('example');
$call->setScript($script);
$success=voip_text($text, $call);