首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络技术 > 网络基础 >

筹建一个小型的asterisk电话系统 (四、增加voicemail功能)

2012-09-14 
搭建一个小型的asterisk电话系统 (四、增加voicemail功能)一,建表1.1 voicemailVoicemail表定义了voicemail

搭建一个小型的asterisk电话系统 (四、增加voicemail功能)

一,建表

1.1 voicemail

Voicemail表定义了voicemail的用户列表,采用动态加载的功能,这样方便更新。voicemail的表结构如下:

[globals]TRUNK=DAHDI/2-1[default]exten => _222x,1,Macro(stdexten,${EXTEN},SIP/${EXTEN})same => n,Congestion(5)exten => _v222x,1,Verbose(2,to ${EXTEN})same => n,Verbose(2,from ${CALLERID(number)})same => n,Macro(stdvmmenu,${EXTEN:1})exten => _ZXXXXX.,1,Verbose(2,to ZXXXXX  ${EXTEN})same => n,Verbose(2,from ${CALLERID(number)})same => n,Dial(${TRUNK}/${EXTEN},,f)same => n,Hangupexten => _s-.,1,Congestionexten => a,1,Macro(stdvmmenu,${ARG1})   ;If they press *, send the user into VoicemailMainexten => a,2,Hangup[macro-stdexten]exten => s,1,Verbose(2,to stdexten ${ARG1})same => n,Verbose(2,from ${CALLERID(number)})same => n,Dial(${ARG2},20,tf)same => n,Verbose(2, dial status s-${DIALSTATUS})same => n,Goto(s-${DIALSTATUS},1)exten => s-NOANSWER,1,Macro(stdvm,${ARG1},u)same => n,Hangupexten => s-BUSY,1,Macro(stdvm,${ARG1},b)same => n,Hangupexten => s-CHANUNAVAIL,1,Macro(stdvm,${ARG1},u)same => n,Hangup[macro-stdvm]; ARG1 = vmbox ARG2 = u/bexten => s,1,Answersame => n,Wait(2)same => n,Verbose(2,${ARG1}@default,${ARG2})same => n,Voicemail(${ARG1}@default,${ARG2})exten => n,Hangupexten => a,1,Macro(stdvmmenu,${ARG1})exten => a,2,Hangup[macro-stdvmmenu]; ARG1 = vmboxexten => s,1,Answerexten => s,2,Wait(2)exten => s,3,VoicemailMain(${ARG1}@default)exten => s,4,Hangup[from-pstn]exten => s,1,Verbose(2,INCOMING CALL ${EXTEN})same => n,Answer(); same => n,Dial(SIP/2222) same => n,Macro(stdexten,2222,SIP/2222) ;forward incoming call to 2222, it will be changed later.;same => n,Playback(tt-weasels)same => n,Hangup

通过 dialplan reload 命令使拨号方案生效。


三、测试

配置结束之后,就可以对voicemail的功能进行测试。测试步骤如下

内线拨打:

1,2221呼叫2222

2,不用接听2222并等待呼叫音20秒超时

3,2221听到留言提示后留言并挂机

4,在2222 IP电话机拨Message键,如果是软件话,也可以直接拨叫“v2222”,

5,提示输入密码后,键入“1234”

6,听取留言


外线拨打并被自动注入2222分机:

1,用手机或者别的固定电话呼叫你的PSTN好,例如:0216436XXXX。呼叫被自动转到2222

2-6步骤和内线拨打相同,不再累述。





热点排行