asterisk 的三方通话

1001 呼1002  ,1002接通, 1001 按*00后1001,1002进入会议,接着按要拨打的1003 ,以#结束。这是1001和 1003建立通话但, 1001按*11 把1003加入会议,实现了三方通话。

注意: 在sip.conf 的号码定义时 一定要把允许的编码 在 你asterisk自带的编码模块中,否则出错

extensions.conf

[default]
exten => _XXXX,1,Set(DYNAMIC_FEATURES=nway-start)
exten => _XXXX,n,Dial(SIP/${EXTEN})

[dynamic-nway-invite]
exten => 0,1,noop(dynamic-nway-invite)
exten => 0,n,Read(DEST,dial,,i)
exten => 0,n,Set(DYNAMIC_FEATURES=nway-inv#nway-noinv)
exten => 0,n,Dial(Local/${DEST}@dynamic-nway-dest,,g)
;exten => 0,n,Set(DYNAMIC_FEATURES=)
exten => 0,n,Goto(dynamic-nway,8600,1)
exten => i,1,Goto(dynamic-nway,8600,1)

[dynamic-nway-dest]
exten => _XXXX,1,noop(dynamic-nway-dest)
exten => _XXXX,n,Dial(SIP/${EXTEN})

[dynamic-nway]
exten => _XXXX,1,noop(dynamic-nway)
exten => _XXXX,n,Answer
exten => _XXXX,n,Set(MEETME_EXIT_CONTEXT=dynamic-nway-invite)
exten => _XXXX,n,Set(DYNAMIC_FEATURES=nway-inv#nway-noinv)
exten => _XXXX,n,MeetMe(${EXTEN},pdMX)
exten => _XXXX,n,Set(DYNAMIC_FEATURES=)
exten => _XXXX,n,Hangup

[macro-nway-start]
exten => s,1,noop(macro-nway-start)
exten => s,n,Set(CONFNO=8600)
exten => s,n,ChannelRedirect(${BRIDGEPEER},dynamic-nway,${CONFNO},1)
exten => s,n,Read(DEST,dial,,i)
exten => s,n,Set(DYNAMIC_FEATURES=nway-noinv#nway-inv)
exten => s,n,Dial(Local/${DEST}@dynamic-nway-dest,,gtT)
exten => s,n,Set(DYNAMIC_FEATURES=)
exten => s,n,MeetMe(${CONFNO},pdMX)
exten => s,n,Goto(dynamic-nway,${CONFNO},1)

[macro-nway-ok]
exten => s,1,noop(macro-nway-ok)
exten => s,n,ChannelRedirect(${BRIDGEPEER},dynamic-nway,8600,1)

[macro-nway-notok]
exten => s,1,noop(macro-nway-notok)
exten => s,n,SoftHangup(${BRIDGEPEER})

features.conf

nway-start => *00,caller,Macro,nway-start
nway-inv => *11,caller,Macro,nway-ok
nway-noinv => *33,caller,Macro,nway-notok

 

sip.conf

[1001]
type=friend
secret=0
context=default
host=dynamic
dtmfmode=rfc2833
compensate=yes
callerid=1001

[1002]
type=friend
secret=0
context=default
host=dynamic
dtmfmode=rfc2833
compensate=yes
callerid=1001

[1003]
type=friend
secret=0
context=default
host=dynamic
dtmfmode=rfc2833
compensate=yes
callerid=1003

 

1001 呼1002  ,1002接通, 1001 按*00后1001,1002进入会议,接着按要拨打的1003 ,以#结束。这是1001和 1003建立通话但, 1001按*11 把1003加入会议,实现了三方通话。

注意: 在sip.conf 的号码定义时 一定要把允许的编码 在 你asterisk自带的编码模块中,否则出错

你可能感兴趣的:(AS)