打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
asterisk 呼叫文件(.call)简单说明

刚弄了下了 asterisk 的 .call 文件,意思就是自动去执行拨号。。

 

 如建立 text.call 文件,必须放在 "/var/spool/asterisk/outgoing"下面,然后系统会自动去执行。当然如果里面的参数不正常,将不会去执行。

 

   先说下参数:

 

 


 

 Channel: <channel>

         The channel upon which to initiate the call.  ..................我理解为什么什么通道,就是给哪个号码发起呼叫,想当于 DIAL()..

 

 

Callerid: <callerid>
        The caller ID to be used for the call..................... 显示的号码,或名称

WaitTime: <number>
        Number of seconds the system waits for the call to be answered. If not specified, defaults to 45              seconds................等待回答的时间,在这时间,如果没有回答,就进行下一轮呼叫,没有指定,默认为45秒

MaxRetries: <number>
          Maximum number of dial retries (if an attempt fails because the device is busy or not reachable). If not specified, defaults to 0 (only one attempt is made). ..............最大失败后重试数.如设置为2

RetryTime: <number>
        Number of seconds to wait until the next dial attempt. If not specified, defaults to 300 seconds. .........等待的秒数直到下一次拨号尝试。 如果没有指定,默认为300秒。

Account: <account>
         The account code for the CDR.......计费方面的东东。。

Context: <context>
        The destination context. ......指定拨号方案

Extension: <exten>
        The destination extension, in which dialplan execution begins if the device is answered. ....额。报号方案中的开始执行的地,如x.a 100,上面拨号方案相关

Priority: <priority>
         The destination priority. If not specified, defaults to 1. ............目标优先级。 如果没有指定,默认为1

Setvar: <var=value>
      Setvar: lets you set one or more channel variables..............设置一个或多个通道变量

Archive: <yes|no>
           By default, call files are deleted immediately upon execution. If Archive: yes is set, they are copied into        /var/spool/asterisk/outgoing_done/ instead. Asterisk adds a line to the call file which describes the result:.......................是否存档。因为.call文件执行后会被删除,所以我们有必要这里选择存档,选择yes后,原理我们建立的.call文件会呗村在 “/var/spool/asterisk/outgoing_done/”目录下



简单实例:


首先建立一个普通的拨号规则:


  1. [jh]  
  2. exten => 10,1,Answer()  
  3. exten => 10,n,Dial(SIP/8100)  
  4. exten => 10,n,Hangup()  
 

 

然后我们在 “/var/spool/asterisk/outgoing/” 目录下建立 一个 .call 文件 (文件名不重要),代码如下:

 


[c-sharp] view plaincopy?
  1. channel: SIP/8111               //呼叫8111   
  2. Callerid: <haozi>               //来的名称haozi   
  3. MaxRetries: 2                   //未接执行2次   
  4. RetryTime: 60                   //60秒后发起下次呼叫   
  5. WaitTime: 30                    //应答时间为30s 也就是响铃时间   
  6. Context: jh                    //指定拨号规则   
  7. Extension: 10                //对应拨号规则中的10   
  8. Archive:yes                //存档   
  9. Setvar:<var=1>            //意思就是设置变量值为1,在context可以使用该变量的值  
 

 

保存后,asterisk 后立即发起呼叫。


本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Morning Call file 开发范例 | Asterisk中国技术社区
使用Asterisk manager API实现自动拨号
asterisk拨号规则
转载:asterisk拨号方案的配置
freeiris设计文档
Asterisk学习资料
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服