我遇到星号13 的问题。
我想模拟这种情况 - 代理和客户之间的通话以及当客户挂断电话代理时应保留在SIP通道上并连接到星号:
1)使用AMI调用代理(A行)的星号
Action: Originate
Channel: Local/60000001@my-context-out
Context: agent
Exten: s
Priority: 1
Callerid: 12345678
Timeout: 180000
Variable: ANONYM=1
Async: 1
2)使用AMI的星号呼叫客户(B行)
Action: Originate
Channel: Local/60000002@my-context-out
Context: customer
Exten: s
Priority: 1
Callerid: 12345678
Timeout: 180000
Variable: ANONYM=1
Async: 1
3)星号使用AMI
创建桥(在A行和B行之间)Action: Bridge
Channel1: SIP/60000001-0000002c
Channel2: SIP/60000002-0000002d
Tone: no
4)exstensions.conf
[general]
static=yes
writeprotect=yes
clearglobalvars=yes
[wait]
exten => s,1,MusicOnHold(default)
exten => s,1,HangUp()
exten => 1,1,MusicOnHold(default)
exten => 1,1,HangUp()
[my-context-out]
exten => _XXXXXXXX,1,Dial(SIP/${EXTEN},40,gmt)
exten => _XXXXXXXX,n,Goto(wait,1,1)
exten => i,1,Hangup()
exten => h,1,Hangup()
[agent]
exten => s,1,MusicOnHold(default)
exten => s,n,Goto(agent,s,1)
exten => h,1,HangUp()
[customer]
exten => s,1,MusicOnHold(default)
exten => s,n,HangUp()
5)sip.conf
[general]
context=default
allowoverlap=no
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
srvlookup=yes
[60000001]
type=peer
secret=60000001
disallow=all
allow=alaw
host=dynamic
[60000002]
type=peer
secret=60000002
disallow=all
allow=alaw
host=dynamic
6)星号输出
-- Called 60000001@my-context-out
-- Executing [60000001@my-context-out:1] Dial("Local/60000001@my-context-out-00000021;2", "SIP/60000001,40,gmt") in new stack
== Using SIP RTP CoS mark 5
-- Called SIP/60000001
-- Started music on hold, class 'default', on channel 'Local/60000001@my-context-out-00000021;2'
-- Local/60000001@my-context-out-00000021;1 is making progress
-- SIP/60000001-0000002c is ringing
-- SIP/60000001-0000002c answered Local/60000001@my-context-out-00000021;2
-- Stopped music on hold on Local/60000001@my-context-out-00000021;2
-- Local/60000001@my-context-out-00000021;1 answered
-- Executing [s@agent:1] MusicOnHold("Local/60000001@my-context-out-00000021;1", "default") in new stack
-- Started music on hold, class 'default', on channel 'Local/60000001@my-context-out-00000021;1'
-- Channel Local/60000001@my-context-out-00000021;2 joined 'simple_bridge' basic-bridge <e6df27ff-6c34-4181-89e0-105f03d014bf>
-- Channel SIP/60000001-0000002c joined 'simple_bridge' basic-bridge <e6df27ff-6c34-4181-89e0-105f03d014bf>
> 0x7f41fc03b5e0 -- Probation passed - setting RTP source address to 192.168.1.76:17312
smartdialer*CLI>
-- Called 60000002@my-context-out
-- Executing [60000002@my-context-out:1] Dial("Local/60000002@my-context-out-00000022;2", "SIP/60000002,40,gmt") in new stack
== Using SIP RTP CoS mark 5
-- Called SIP/60000002
-- Started music on hold, class 'default', on channel 'Local/60000002@my-context-out-00000022;2'
-- Local/60000002@my-context-out-00000022;1 is making progress
-- SIP/60000002-0000002d is ringing
> 0x7f41fc04c990 -- Probation passed - setting RTP source address to 192.168.1.70:4040
-- SIP/60000002-0000002d answered Local/60000002@my-context-out-00000022;2
-- Stopped music on hold on Local/60000002@my-context-out-00000022;2
-- Channel Local/60000002@my-context-out-00000022;2 joined 'simple_bridge' basic-bridge <ba532dc9-b524-49c9-b3db-503b3263c1cf>
-- Local/60000002@my-context-out-00000022;1 answered
-- Executing [s@customer:1] MusicOnHold("Local/60000002@my-context-out-00000022;1", "default") in new stack
-- Started music on hold, class 'default', on channel 'Local/60000002@my-context-out-00000022;1'
-- Channel SIP/60000002-0000002d joined 'simple_bridge' basic-bridge <ba532dc9-b524-49c9-b3db-503b3263c1cf>
> 0x7f41fc04c990 -- Probation passed - setting RTP source address to 192.168.1.70:4040
smartdialer*CLI>
smartdialer*CLI>
-- Channel SIP/60000001-0000002c left 'simple_bridge' basic-bridge <e6df27ff-6c34-4181-89e0-105f03d014bf>
-- Channel SIP/60000001-0000002c joined 'simple_bridge' basic-bridge <94c163a3-08fe-4c09-ba75-a39c8501ed19>
-- Channel SIP/60000002-0000002d left 'simple_bridge' basic-bridge <ba532dc9-b524-49c9-b3db-503b3263c1cf>
-- Channel Local/60000001@my-context-out-00000021;2 left 'simple_bridge' basic-bridge <e6df27ff-6c34-4181-89e0-105f03d014bf>
-- Channel SIP/60000002-0000002d joined 'simple_bridge' basic-bridge <94c163a3-08fe-4c09-ba75-a39c8501ed19>
-- Executing [60000001@my-context-out:2] Goto("Local/60000001@my-context-out-00000021;2", "wait,1,1") in new stack
-- Goto (wait,1,1)
-- Executing [1@wait:1] MusicOnHold("Local/60000001@my-context-out-00000021;2", "default") in new stack
-- Started music on hold, class 'default', on channel 'Local/60000001@my-context-out-00000021;2'
-- Channel Local/60000002@my-context-out-00000022;2 left 'simple_bridge' basic-bridge <ba532dc9-b524-49c9-b3db-503b3263c1cf>
-- Executing [60000002@my-context-out:2] Goto("Local/60000002@my-context-out-00000022;2", "wait,1,1") in new stack
-- Goto (wait,1,1)
-- Executing [1@wait:1] MusicOnHold("Local/60000002@my-context-out-00000022;2", "default") in new stack
-- Started music on hold, class 'default', on channel 'Local/60000002@my-context-out-00000022;2'
smartdialer*CLI>
smartdialer*CLI>
-- Channel SIP/60000002-0000002d left 'simple_bridge' basic-bridge <94c163a3-08fe-4c09-ba75-a39c8501ed19>
-- Channel SIP/60000001-0000002c left 'simple_bridge' basic-bridge <94c163a3-08fe-4c09-ba75-a39c8501ed19>
7)主要问题!!! 我期待的是,当客户挂断时,渠道代理商渠道将无法断开连接。使用星号1.8一切正常。当客户挂机时,电话频道被返回到座席上下文并移动到音乐暂停应用程序。在星号13上,两个SIP通道 - A行和B行都是挂起
-- Channel SIP/60000002-0000002d left 'simple_bridge' basic-bridge <94c163a3-08fe-4c09-ba75-a39c8501ed19>
-- Channel SIP/60000001-0000002c left 'simple_bridge' basic-bridge <94c163a3-08fe-4c09-ba75-a39c8501ed19>