Asterisk 13 bridge-hangup issue

General discussions about AsteriskNOW.

Moderators: Moderator, Support

Asterisk 13 bridge-hangup issue

Postby darijuxs » Wed Aug 12, 2015 1:32 am

Hi,

I have the problem with asterisk 13.
What I want to simulate is situation - call between agent and customer and when customer hang up phone agent should stay on SIP channel and be connected to asterisk:
1) asterisk call to agent (line A) using AMI

Code: Select all
Action: Originate
Channel: Local/60000001@my-context-out
Context: agent
Exten: s
Priority: 1
Callerid: 12345678
Timeout: 180000
Variable: ANONYM=1
Async: 1


2) asterisk call to customer (line B) using AMI

Code: Select all
Action: Originate
Channel: Local/60000002@my-context-out
Context: customer
Exten: s
Priority: 1
Callerid: 12345678
Timeout: 180000
Variable: ANONYM=1
Async: 1


3) asterisk create bridge (between line A and line B) using AMI
Code: Select all
Action: Bridge
Channel1: SIP/60000001-0000002c
Channel2: SIP/60000002-0000002d
Tone: no


4) exstensions.conf
Code: Select all
[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
Code: Select all
[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) Asterisk output
Code: Select all
  -- 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>
    [color=#FF0000]-- 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>[/color]


7) The main problem!!! What I am expecting is that when customer hang up channel agent channel won't be disconnected. With asterisk 1.8 all worked fine. When customer hang up phone channel was returned to agent context and moved to music on hold application. On asterisk 13 both SIP channels - line A and line B are hangup
darijuxs
Newsterisk
 
Posts: 1
Joined: Wed Aug 12, 2015 1:07 am

Return to AsteriskNOW General

Who is online

Users browsing this forum: No registered users and 1 guest