Asterisk录音电话状态检测_第1页
Asterisk录音电话状态检测_第2页
Asterisk录音电话状态检测_第3页
全文预览已结束

Asterisk录音电话状态检测.docx 免费下载

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、录音电话状态检测在Asterisk的配置文件中,有一个小配置文件 amd.conf。这个配置文件涉及一个Asterisk的应用:AMD()。这个应用的作用是在外呼时,对方接通电话后,判断对方是一个录音电话 还是真人。下面是 AMD应用的说明资料,英文是原来的内容,中文是我自己加进去的。1. SynopsisAttempt to detect an sweri ng mach in es.An sweri ng Mach ine Detect ion 录音电话状态检测2. Description尝试在外呼的时候侦测对端是否应答。在呼叫已经被接通后调用这个函数,这个函数会 修改两个通道变量: $A

2、MDSTA TUS和$AMDCAUSE。检测一个录音电话(answering machine),看看对端是在机器状态,还是人接状态,还是 挂机状态。判断的条件是:in itialSile ncegreet ing afterGreeti ngSile nce totalAnalysis Time min iumWordLe ngth betwee nWordSile nce初始化沉默时间欢迎辞欢迎辞后的沉默时间整个分析时间词最少长度词间的沉默一个词的最大时间 多长时间被认为沉默 最大词长maximumNumberOfWords sile nceThreshold maximumWordLe n

3、gth配置文件:/etc/asterisk/amd.c onf;Answering Machine Detection Configurationgeneralinitial_silence = 2500; Maximum silence duration before the greeting.;If exceeded then MACHINE.greeting = 1500; Maximum length of a greeting. If exceeded then MACHINE.after_greeting_silence = 800; Silence after detecting

4、 a greeting.;If exceeded then HUMANtotal_analysis_time = 5000; Maximum time allowed for the algorithm to decide;on a HUMAN or MACHINEmin_word_length = 100; Minimum duration of Voice to considered as a wordbetween_words_silence = 50; Minimum duration of silence after a word to consider;the audio what

5、 follows as a new word maximum_number_of_words = 3; Maximum number of words in the greeting.;If exceeded then MACHINEsilence_threshold = 256F面是一个使用例子:Asterisk 1.2outbo undexte n = s,1,NoCDRexte n = s,n ,AMDexte n = s, n,Gotolf($AMDSTA TUS=AMD_PERSON?hum n: mach)exte n = s,n (mach),WaitForSile nce(25

6、00)exte n = s,n ,Playback(message-whe n-mach ine)exte n = s,n,Han gupexte n = s,n( hum n), WaitForSile nce(500)exte n = s,n ,Playback(message-whe n-huma n)exte n = s,n,Han gupAsterisk 1.4outbo undexte n = s,1,NoCDRexte n = s,n ,AMDexte n = s,n ,Gotolf($AMDSTA TUS=HUMAN?hum n: mach)exte n = s,n (mach

7、),WaitForSile nce(2500)exte n = s,n ,Playback(message-whe n-mach ine)exte n = s,n,Han gupexte n = s,n( hum n), WaitForSile nce(500)exte n = s,n ,Playback(message-whe n-huma n)exte n = s,n,Han gupThis application attempts to detect answering machines at the beginning of outbound calls. Simply call th

8、is applicati on after the call has bee n an swered (outbo und only, of course).When loaded, AMD reads amd.c onf and uses the parameters specified as default values. Those default values get overwritte n whe n the call ing AMD with parameters.下面是这个应用修改的通道参数:This application sets the following channel

9、 variables:$AMDSTA TUS: This is the status of the answering machine detectionMACHINEHUMANNOTSUREHANGUP$AMDCAUSE: In dicates the cause that led to the con clusionTOOLONG: Total Time.INITIALSILENCE: Silence Duration - Initial Silence.HUMAN: Sile nce Duratio n - afterGreet in gSile nce. LONGGREETING: V

10、 oice Durati on - Greet in g. MAXWORDLENGTH: Word Cou nt - maximum number of words.3. SyntaxAMD(ini tialSile nce,greet ing,afterGreetingSilence,totalAnalysis Time,miniumWordLength,betweenWordSilence ,maximumNumberOfWords,silenceThreshold,maximumWordLength)4. Arguments4.1. initialSilenceIs maximum in

11、itial silence duration before greeting.If this is exceeded set as MACHINE4.2. greetingis the maximum length of a greeting.If this is exceeded set as MACHINE4.3. afterGreetingSilenceIs the silence after detecting a greeting.If this is exceeded set as HUMAN4.4. totalAnalysis TimeIs the maximum time al

12、lowed for the algorithm to decide HUMAN or MACHINE4.5. miniumWordLengthIs the minimum duration of V oice considered to be a word4.6. betweenWordSilenceIs the minimum duration of silence after a word to consider the audio that follows to be a new word4.7. maximumNumberOfWordsIs the maximum number of words in a greetingIf this is exceeded set as MA

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论