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

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Dec 5 11:01:48 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13200 
====================================================================== 
Reported By:                tapic
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13200
Category:                   Applications/app_dial
Reproducibility:            sometimes
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.21.2 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-07-30 18:21 CDT
Last Modified:              2008-12-05 11:01 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.

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

---------------------------------------------------------------------- 
 (0095872) blitzrage (administrator) - 2008-12-05 11:01
 http://bugs.digium.com/view.php?id=13200#c95872 
---------------------------------------------------------------------- 
tapic: as you are the original reporter of this issue, we need your
feedback in order to resolve the issue. Please let us know if the attached
patch works for you. I will need to close this issue in a week if it
appears we can't move it forward, but you are welcome to ask a bug marshall
in #asterisk-bugs to reopen the issue for you on the IRC network at
irc.freenode.net should it get closed before you have a chance to test it.
Thanks! 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-12-05 11:01 blitzrage      Note Added: 0095872                          
======================================================================




More information about the asterisk-bugs mailing list