[asterisk-bugs] [Asterisk 0013200]: Bridging channels too early when Macro is used to control callee leg

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Jan 20 18:36:33 CST 2009


The following issue has been RESOLVED. 
====================================================================== 
http://bugs.digium.com/view.php?id=13200 
====================================================================== 
Reported By:                tapic
Assigned To:                putnopvut
====================================================================== 
Project:                    Asterisk
Issue ID:                   13200
Category:                   Applications/app_dial
Reproducibility:            sometimes
Severity:                   major
Priority:                   normal
Status:                     resolved
Asterisk Version:           1.4.21.2 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Resolution:                 suspended
Fixed in Version:           
====================================================================== 
Date Submitted:             2008-07-30 18:21 CDT
Last Modified:              2009-01-20 18:36 CST
====================================================================== 
Summary:                    Bridging channels too early when Macro is used to
control callee leg
Description: 
Expected flow:
mikail calls 200.
mikail hears welcome.
mikail hears ringing. beri's phone start to ring.
beri picks up the phone and hears welcome.
beri presses a key.
if beri has pressed 5 then mikail and beri should start conversation -
else beri should be hanged up and mikail should continue to interact.
 
AGI script (FastAGI- runs on machine 10.10.1.41): 
 
AGI.StreamFile("welcome");
AGI.Execute("Dial", "SIP/beri|25|A(welcome)M(agentmacro)");
 
Dialplan:
 
[default]
exten =>  _273,1,Dial(SIP/beri)
exten =>  _275,1,Dial(SIP/mikail)
 
exten => _200,1,AGI(agi://10.10.1.41/customivr)
exten => _200,2,Hangup()
 
[macro-agentmacro]
exten => s,1,Read(ACCEPT||1)
exten => s,n,GotoIf($[${ACCEPT}=5]?yes:no) 
exten => s,n(no),Set(MACRO_RESULT=CONTINUE)
exten => s,n(yes),Set(test=1)
 
*CLI output :
  == Spawn extension (default, 200, 1) exited non-zero on
'SIP/mikail-081d9420'
    -- Executing [200 at default:1] AGI("SIP/mikail-081d9420",
"agi://10.10.1.41/customivr") in new stack
    -- Playing 'welcome' (escape_digits=) (sample_offset 0)
    -- AGI Script Executing Application: (Dial) Options:
(SIP/beri|25|A(welcome)M(agentmacro))
    -- Called beri
    -- SIP/beri-081e8b18 is ringing
    -- SIP/beri-081e8b18 answered SIP/mikail-081d9420
@@  -- <SIP/beri-081e8b18> Playing 'welcome' (language 'en')
    -- Executing [s at macro-agentmacro:1] Read("SIP/beri-081e8b18",
"ACCEPT|welcome|1") in new stack
    -- Accepting a maximum of 1 digits.
    -- <SIP/beri-081e8b18> Playing 'welcome' (language 'en')
    -- User entered '5'
    -- Executing [s at macro-agentmacro:2] GotoIf("SIP/beri-081e8b18",
"1?yes:no") in new stack
    -- Goto (macro-agentmacro,s,4)
    -- Executing [s at macro-agentmacro:4] Set("SIP/beri-081e8b18", "test=1")
in new stack
    -- Native bridging SIP/mikail-081d9420 and SIP/beri-081e8b18
  == Spawn extension (default, 200, 1) exited non-zero on
'SIP/mikail-081d9420'
 
line with @@ : this file does not play here although it says so. And
already bridged here, although it is expected to bridge after beri enters
5. After asterisk restart, everything works as expected for 1-2 times.
I have also seen :  ERROR[4883]: app_dial.c:1581 dial_exec_full: Could not
stop autoservice on calling channel if caller side hangups the phone.

Same result with the configuration below:

FastAGI:
AGI.StreamFile("welcome");  
AGI.Execute("Dial", "SIP/beri|25|M(agentmacro)");
 
[macro-agentmacro]
exten => s,1,Answer()
exten => s,n,Wait(1)
exten => s,n,Read(ACCEPT|welcome|1)
exten => s,n,GotoIf($[${ACCEPT}=5]?yes:no) 
exten => s,n(no),Set(MACRO_RESULT=CONTINUE)
exten => s,n(yes),Set(test=1)
 
*CLI
 
    -- Executing [200 at default:1] AGI("SIP/mikail-081e3090",
"agi://10.10.1.41/customivr") in new stack
    -- Playing 'welcome' (escape_digits=) (sample_offset 0)
    -- AGI Script Executing Application: (Dial) Options:
(SIP/beri|25|M(agentmacro))
    -- Called beri
    -- SIP/beri-081e8870 is ringing
    -- SIP/beri-081e8870 answered SIP/mikail-081e3090
@@  -- Executing [s at macro-agentmacro:1] Answer("SIP/beri-081e8870", "") in
new stack
    -- Executing [s at macro-agentmacro:2] Wait("SIP/beri-081e8870", "1") in
new stack
    -- Executing [s at macro-agentmacro:3] Read("SIP/beri-081e8870",
"ACCEPT|welcome|1") in new stack
    -- Accepting a maximum of 1 digits.
@@  -- <SIP/beri-081e8870> Playing 'welcome' (language 'en')
    -- User entered '5'
    -- Executing [s at macro-agentmacro:4] GotoIf("SIP/beri-081e8870",
"1?yes:no") in new stack
    -- Goto (macro-agentmacro,s,6)
    -- Executing [s at macro-agentmacro:6] Set("SIP/beri-081e8870", "test=1")
in new stack
    -- Native bridging SIP/mikail-081e3090 and SIP/beri-081e8870
  == Spawn extension (default, 200, 1) exited non-zero on
'SIP/mikail-081e3090'
 
bridging happens on 1st @@ line and welcome does not get played as said in
2nd @@ line.

 
Thank you for your help.

====================================================================== 

---------------------------------------------------------------------- 
 (0098293) putnopvut (administrator) - 2009-01-20 18:36
 http://bugs.digium.com/view.php?id=13200#c98293 
---------------------------------------------------------------------- 
As much as I don't like doing this, I am suspending this issue since there
has been no response from the reporter since a new patch was uploaded last
August. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-01-20 18:36 putnopvut      Note Added: 0098293                          
2009-01-20 18:36 putnopvut      Status                   feedback => resolved
2009-01-20 18:36 putnopvut      Resolution               open => suspended   
2009-01-20 18:36 putnopvut      Assigned To               => putnopvut       
======================================================================




More information about the asterisk-bugs mailing list