星号13挂起两个SIP通道,当网桥被破坏时。

问题描述 投票:1回答:1

我的问题是 星号.我想模拟这种情况--代理和客户之间的通话,当客户挂断电话时,代理应该保持在SIP通道上,并连接到星号:1)星号呼叫代理(A线)使用AMI。

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>
asterisk sip amazon-ami bridge
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.