2014-10-22 2 views
0

MySQL을 사용하여 CDR 레코드를 설정하려고합니다. 호출에 응답하거나 응답하지 않으면 dst 필드에 호출되고 dcontext 필드에서 나가는 올바른 값을 dst 필드에 씁니다.통화 중일 때 별표 AMI의 잘못된 CDR dst

그러나 전화가 거절되거나 전화가 꺼지면 dst 필드에 "s"를, dcontext 필드에 transmit_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"); 

답변

1

행동이 예상됩니다. 통화가 통화 중일 때는 DST가 없습니다.

변경하려는 경우, sip을 통하지 않고 로컬/채널을 통해 호출하십시오.

관련 문제