Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Drupal VoipCall getDirection、getCallChannel、getCallNetwork_Drupal_Drupal 7_Drupal Modules - Fatal编程技术网

Drupal VoipCall getDirection、getCallChannel、getCallNetwork

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

我正在使用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 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);