Asterisk 当网桥被破坏时,星号13将挂断两个SIP通道

Asterisk 当网桥被破坏时,星号13将挂断两个SIP通道,asterisk,sip,amazon-ami,bridge,Asterisk,Sip,Amazon Ami,Bridge,我有星号13的问题。 我想模拟这种情况-代理和客户之间的通话,以及客户挂断电话时,代理应保持SIP通道并连接到asterisk: 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 Action

我有星号13的问题。 我想模拟这种情况-代理和客户之间的通话,以及客户挂断电话时,代理应保持SIP通道并连接到asterisk:

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
Action: Originate
Channel: Local/60000002@my-context-out
Context: customer
Exten: s
Priority: 1
Callerid: 12345678
Timeout: 180000
Variable: ANONYM=1
Async: 1
Action: Bridge
Channel1: SIP/60000001-0000002c
Channel2: SIP/60000002-0000002d
Tone: no
2) 使用AMI呼叫客户(B行)的星号

Action: Originate
Channel: Local/60000001@my-context-out
Context: agent
Exten: s
Priority: 1
Callerid: 12345678
Timeout: 180000
Variable: ANONYM=1
Async: 1
Action: Originate
Channel: Local/60000002@my-context-out
Context: customer
Exten: s
Priority: 1
Callerid: 12345678
Timeout: 180000
Variable: ANONYM=1
Async: 1
Action: Bridge
Channel1: SIP/60000001-0000002c
Channel2: SIP/60000002-0000002d
Tone: no
3) 星号使用AMI创建桥接(线A和线B之间)

Action: Originate
Channel: Local/60000001@my-context-out
Context: agent
Exten: s
Priority: 1
Callerid: 12345678
Timeout: 180000
Variable: ANONYM=1
Async: 1
Action: Originate
Channel: Local/60000002@my-context-out
Context: customer
Exten: s
Priority: 1
Callerid: 12345678
Timeout: 180000
Variable: ANONYM=1
Async: 1
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

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>
——调用60000001@my-断章取义
--执行[60000001@my-上下文输出:1]拨号(“本地/60000001@my-上下文输出-00000021;2,“SIP/6000001,40,gmt”)在新堆栈中
==使用SIP RTP CoS标记5
--称为SIP/6000001
--已在“本地”频道上启动“默认”类别的保留音乐/60000001@my-上下文输出-00000021;2'
--本地的/60000001@my-上下文输出-00000021;1正在取得进展
--SIP/60000001-0000002c正在响
--SIP/60000001-0000002c本地应答/60000001@my-上下文输出-00000021;2.
--已在本地计算机上停止暂停音乐/60000001@my-上下文输出-00000021;2.
--本地的/60000001@my-上下文输出-00000021;1回答
--执行[s@agent:1]MusicOnHold(“本地/60000001@my-新堆栈中的context-out-00000021;1“默认值”)
--已在“本地”频道上启动“默认”类别的保留音乐/60000001@my-上下文输出-00000021;1'
--本地频道/60000001@my-上下文输出-00000021;2连接的“简易桥”基本桥
--通道SIP/60000001-0000002c连接的“简单桥”基本桥
>0x7f41fc03b5e0——试用期通过-将RTP源地址设置为192.168.1.76:17312
smartdialer*CLI>
--叫60000002@my-断章取义
--执行[60000002@my-上下文输出:1]拨号(“本地/60000002@my-上下文输出-00000022;2,“SIP/60000002,40,gmt”)在新堆栈中
==使用SIP RTP CoS标记5
--称为SIP/60000002
--已在“本地”频道上启动“默认”类别的保留音乐/60000002@my-上下文输出-00000022;2'
--本地的/60000002@my-上下文输出-00000022;1正在取得进展
--SIP/600000002-0000002d正在响
>0x7f41fc04c990--试用期通过-将RTP源地址设置为192.168.1.70:4040
--SIP/600000002-000000本地/60000002@my-上下文输出-00000022;2.
--已在本地计算机上停止暂停音乐/60000002@my-上下文输出-00000022;2.
--本地频道/60000002@my-上下文输出-00000022;2连接的“简易桥”基本桥
--本地的/60000002@my-上下文输出-00000022;1回答
--执行[s@customer:1]MusicOnHold(“本地/60000002@my-新堆栈中的context-out-00000022;1“默认值”)
--已在“本地”频道上启动“默认”类别的保留音乐/60000002@my-上下文输出-00000022;1'
--通道SIP/60000002-000000 2D连接的“简单桥”基本桥
>0x7f41fc04c990--试用期通过-将RTP源地址设置为192.168.1.70:4040
smartdialer*CLI>
smartdialer*CLI>
--通道SIP/600000001-0000002c左“简单桥”基本桥
--通道SIP/60000001-0000002c连接的“简单桥”基本桥
--通道SIP/60000002-000000 2D左“简单桥”基本桥
--本地频道/60000001@my-上下文输出-00000021;2左“简单桥”基本桥
--通道SIP/60000002-000000 2D连接的“简单桥”基本桥
--执行[60000001@my-上下文输出:2]转到(“本地/60000001@my-上下文输出-00000021;2,“等待,1,1”)在新堆栈中
--后藤(等等,1,1)
--执行[1@wait:1]MusicOnHold(“本地/60000001@my-新堆栈中的context-out-00000021;2“默认值”)
--已在“本地”频道上启动“默认”类别的保留音乐/60000001@my-上下文输出-00000021;2'
--本地频道/60000002@my-上下文输出-00000022;2左“简单桥”基本桥
--执行[60000002@my-上下文输出:2]转到(“本地/60000002@my-新堆栈中的上下文输出-00000022;2“,“等待,1,1”)
--后藤(等等,1,1)
--执行[1@wait:1]MusicOnHold(“本地/60000002@my-新堆栈中的上下文输出-00000022;2“默认值”)
--已在“本地”频道上启动“默认”类别的保留音乐/60000002@my-上下文输出-00000022;2'
smartdialer*CLI>
smartdialer*CLI>
--通道SIP/60000002-000000 2D左“简单桥”基本桥
--通道SIP/600000001-0000002c左“简单桥”基本桥
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>
——通道SIP/60000002-0000002d左“简单桥”基本桥
--通道SIP/600000001-0000002c左“简单桥”基本桥