asterisk 呼叫文件(.call)简单说明
2011-03-03 16:02
330 查看
刚弄了下了 asterisk 的 .call 文件,意思就是自动去执行拨号。。
如建立 text.call 文件,必须放在 "/var/spool/asterisk/outgoing"下面,然后系统会自动去执行。当然如果里面的参数不正常,将不会去执行。
先说下参数:
Channel: <channel>
The channel upon which to initiate the call. ..................我理解为什么什么通道,就是给哪个号码发起呼叫,想当于 DIAL()..
specified, defaults to 45 seconds................等待回答的时间,在这时间,如果没有回答,就进行下一轮呼叫,没有指定,默认为45秒
busy or not reachable). If not specified, defaults to 0 (only one attempt is
made). ..............最大失败后重试数.如设置为2
defaults to 300 seconds. .........等待的秒数直到下一次拨号尝试。 如果没有指定,默认为300秒。
is answered. ....额。报号方案中的开始执行的地,如x.a 100,上面拨号方案相关
channel variables..............设置一个或多个通道变量
adds a line to the call file which describes the result:.......................是否存档。因为.call文件执行后会被删除,所以我们有必要这里选择存档,选择yes后,原理我们建立的.call文件会呗村在 “/var/spool/asterisk/outgoing_done/”目录下
简单实例:
首先建立一个普通的拨号规则:
然后我们在 “/var/spool/asterisk/outgoing/” 目录下建立 一个 .call 文件 (文件名不重要),代码如下:
保存后,asterisk 后立即发起呼叫。
如建立 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: yesis 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/”目录下
简单实例:
首先建立一个普通的拨号规则:
[jh] exten => 10,1,Answer() exten => 10,n,Dial(SIP/8100) exten => 10,n,Hangup()
然后我们在 “/var/spool/asterisk/outgoing/” 目录下建立 一个 .call 文件 (文件名不重要),代码如下:
channel: SIP/8111 //呼叫8111 Callerid: <haozi> //来的名称haozi MaxRetries: 2 //未接执行2次 RetryTime: 60 //60秒后发起下次呼叫 WaitTime: 30 //应答时间为30s 也就是响铃时间 Context: jh //指定拨号规则 Extension: 10 //对应拨号规则中的10 Archive:yes //存档 Setvar:<var=1> //意思就是设置变量值为1,在context可以使用该变量的值
保存后,asterisk 后立即发起呼叫。
www.asterisk-help.com
相关文章推荐
- asterisk 呼叫文件(.call)简单说明
- struts简单例子的分析(含代码注释和配置文件说明)
- Nginx配置文件简单说明log_format
- git简单使用和说明文件的书写
- Asterisk功能说明及基本呼叫流程
- Asterisk配置文件说明
- deepmind_lab 里面有大量的MD3文件 简单说明md3是什么
- apache下logs下的日志文件简单说明
- dubbo简单实现——配置文件说明
- Linux文件权限与属性 的简单说明
- ELF格式文件特点的简单说明
- Maven 教程(6)— Maven之pom.xml文件简单说明
- com中IDL文件的简单说明
- 日历插件超简单好用功能强大的插件(附有源码文件和使用说明)
- struts简单例子的分析(含代码注释和配置文件说明)
- Nginx配置文件简单说明
- SYSTEM32 下的几乎所有文件的简单说明
- 勤哲EXCEL服务器制作的简单企业管理系统示例文件的一些说明
- 【WIN7】windows\system32 下的几乎所有文件的简单说明【2】
- struts简单例子的分析(含代码注释和配置文件说明)