繁体   English   中英

通话繁忙时,Asterisk AMI上的CDR dst错误

[英]Wrong CDR dst on Asterisk AMI when call is busy

我正在尝试使用MySQL设置CDR记录。 接听电话或未接听电话时,它将在dst字段中写入正确的值,该值是dcontext字段中被叫和拨出的电话号码。

但是当呼叫被拒绝或电话关闭时,它将在dst字段中写入“ s”,并在dcontext字段中写入send_voice。 在这种情况下,我们希望星号也写出电话号码。

接听电话或未接听电话时,将转到以下上下文:

[outgoing]

exten =>_X., 1,Answer()
same=>n, Set(j=0) 
same=>n, Set(message=message)
same => n,While($[${j} < ${I}])
same => n,Playback(${${message}${j}})
same => n,Set(j=$[${j} + 1])
same => n,EndWhile
same=>n,Set(CDR(target)=${EXTEN})
same => n,Hangup()

当呼叫被拒绝或电话关闭时,将转到以下上下文:

[transmit_voice]
exten => _X!,1,NoOp


#include extensions_custom.conf

这是PHP代码段:

fputs($this->socket,"Action: originate\r\n");
fputs($this->socket,"Channel: SIP/".$this->strTrunkName."/".$phone."\r\n");
fputs($this->socket,"Variable: canal= SIP/".$this->strTrunkName."/".$phone."\r\n");
fputs($this->socket,"Timeout: ".$this->strWaitTime."\r\n");
fputs($this->socket,"Callerid: ".$this->strCallerId."\r\n");
fputs($this->socket,"Exten: ".$phone."\r\n");
fputs($this->socket,"Context: outgoing\r\n");
while ($audio < count($this->arrAudioPath))
{
  fputs($this->socket,"Variable: message".$audio."=".$this->arrAudioPath[$audio]."\r\n");
  $audio++;
}  
fputs($this->socket,"Variable: I=".$audio."\r\n");
fputs($this->socket,"Async: yes\r\n");
fputs($this->socket,"Priority: 1\r\n\r\n");

这是预期的行为。 通话繁忙时没有目的地。

如果要更改此设置,请通过本地/频道而不是sip进行呼叫。

暂无
暂无

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

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