[asterisk-bugs] [JIRA] Issue Comment Edited: (ASTERISK-20113) ParkAndAnnounce doesn't return to n+1 when no return_context defined

serginuez (JIRA) noreply at issues.asterisk.org
Sat Jul 14 05:23:20 CDT 2012


    [ https://issues.asterisk.org/jira/browse/ASTERISK-20113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=194872#comment-194872 ] 

serginuez edited comment on ASTERISK-20113 at 7/14/12 5:21 AM:
---------------------------------------------------------------

looking at the source code, I don't know if this is the proper way to fix the behaviour but seems to work for me. It return_context is not provided in the dialplan, instead of returning to n, we add 1 to priority to return to n+1 as described in the app documentation.

{code}
--- app_parkandannounce.c.orig	2012-07-14 12:16:36.000000000 +0200
+++ app_parkandannounce.c	2012-07-14 12:12:17.000000000 +0200
@@ -139,6 +139,8 @@
 	if (!ast_strlen_zero(args.return_context)) {
 		ast_clear_flag(chan, AST_FLAG_IN_AUTOLOOP);
 		ast_parseable_goto(chan, args.return_context);
+	}else{
+		chan->priority++;
 	}
{code}

      was (Author: serginuez):
    looking at the source code, I don't know if this is the proper way to fix the behaviour but seems to work for me. It return_context is not provided in the dialplan, instead of returning to n, we add 1 to priority to return to n+1 as described in the app documentation.


--- app_parkandannounce.c.orig	2012-07-14 12:16:36.000000000 +0200
+++ app_parkandannounce.c	2012-07-14 12:12:17.000000000 +0200
@@ -139,6 +139,8 @@
 	if (!ast_strlen_zero(args.return_context)) {
 		ast_clear_flag(chan, AST_FLAG_IN_AUTOLOOP);
 		ast_parseable_goto(chan, args.return_context);
+	}else{
+		chan->priority++;
 	}

  
> ParkAndAnnounce doesn't return to n+1 when no return_context defined
> --------------------------------------------------------------------
>
>                 Key: ASTERISK-20113
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20113
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_parkandannounce
>    Affects Versions: 10.5.1
>         Environment: debian sid
>            Reporter: serginuez
>            Severity: Minor
>
> As shown in the logs below, when ParkAndAnnounce returns after the timeout, if no return_context is defined, instead of returning to n+1 it goes back to itself (n). When a label is specified, it works as intended.
>     -- Executing [125 at intern:1] Answer("SIP/124-00000000", "") in new stack
>     -- Executing [125 at intern:2] ParkAndAnnounce("SIP/124-00000000", "pbx-transfer:PARKED,60,SIP/123") in new stack
>     -- Dial Tech,String: (SIP,123)
>     -- Return Context: (intern,125,2) ID: 124
>     -- Started music on hold, class 'default', on SIP/124-00000000
>   == Parked SIP/124-00000000 on 701 (lot default). Will timeout back to extension [intern] 125, 2 in 60 seconds
>     -- Added extension '701' priority 1 to parkedcalls
>     -- Call parked in space: 701, timeout: 60000, return-context: 
>   == Using SIP RTP CoS mark 5
>     -- <SIP/123-00000001> Playing 'pbx-transfer.ulaw' (language 'es')
>     -- <SIP/123-00000001> Playing 'digits/7.ulaw' (language 'es')
>     -- <SIP/123-00000001> Playing 'digits/0.ulaw' (language 'es')
>     -- <SIP/123-00000001> Playing 'digits/1.ulaw' (language 'es')
>     -- Stopped music on hold on SIP/124-00000000
>   == Timeout for SIP/124-00000000 parked on 701 (default). Returning to intern,125,2
>     -- Executing [125 at intern:2] ParkAndAnnounce("SIP/124-00000000", "pbx-transfer:PARKED,60,SIP/123") in new stack
>     -- Dial Tech,String: (SIP,123)
>     -- Return Context: (intern,125,2) ID: 124
>     -- Started music on hold, class 'default', on SIP/124-00000000
>   == Parked SIP/124-00000000 on 701 (lot default). Will timeout back to extension [intern] 125, 2 in 60 seconds
>     -- Added extension '701' priority 1 to parkedcalls
>     -- Call parked in space: 701, timeout: 60000, return-context: 
>   == Using SIP RTP CoS mark 5
>     -- <SIP/123-00000002> Playing 'pbx-transfer.ulaw' (language 'es')
>     -- <SIP/123-00000002> Playing 'digits/7.ulaw' (language 'es')
>     -- <SIP/123-00000002> Playing 'digits/0.ulaw' (language 'es')
>     -- <SIP/123-00000002> Playing 'digits/1.ulaw' (language 'es')
>     -- Stopped music on hold on SIP/124-00000000
>   == SIP/124-00000000 got tired of being parked 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list