Thứ Hai, 29 tháng 4, 2013

[VoIP] Kết hợp Voicemail và Local Channel


Xây dựng Dial plan thỏa các yêu cầu sau :
User A goi User B, B đổ chuông trong 20 giây.
Nếu B không bắt máy thì user C sẽ đổ chuông trong 20 giây.
Nếu C không bắt máy thì chuyển cuộc gọi đến hộp thư thoại của B ?
Quay số*99 đểnhận thưthoại.

File extensions.conf
[normal]
Include => Services
exten => _XXXX,1,Dial(Local/channel_1@Delay&Local/channel_2@Delay,40,r)
same => n,VoiceMail(1001@hoasen,u)
same => n,Hangup()
[Services]
exten => *99,1,VoiceMailMain(@hoasen)
[Delay]
exten => channel_1,1,Dial(SIP/1001,20,r)
same => n,hangup()
exten => channel_2,1,wait(20)
same => n,Dial(SIP/1002,20,r)
same => n,hangup()   

File sip.conf phải có đủ 3 user như sau:
[1000]
type=friend
context=normal
host=dynamic
nat=yes
secret=1000
dtmfmode=auto
disallow=all
allow=ulaw
[1001]
type=friend
context=normal
host=dynamic
nat=yes
secret=1001
dtmfmode=auto
disallow=all
allow=ulaw
[1002]
type=friend
context=normal
host=dynamic
nat=yes
secret=1002
dtmfmode=auto
disallow=all
allow=ulaw



File voicemail.conf
[general]
…..
[zonemessage]
…..
[hoasen]
1000 => 1000,Hien,hien.lq2998@sinhvien.hoasen.edu.vn
1001 => 1001,Tommy,hien.lq2998@sinhvien.hoasen.edu.vn
1002 => 1002,Lucky,hien.lq2998@sinhvien.hoasen.edu.vn             

Không có nhận xét nào:

Đăng nhận xét