[asterisk-bugs] [JIRA] (ASTERISK-26587) app_originate: Add option to execute gosub prior to dial

dkerr (JIRA) noreply at issues.asterisk.org
Mon Nov 14 09:23:10 CST 2016


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

dkerr commented on ASTERISK-26587:
----------------------------------

Joshua, yes understand Asterisk 11 not supported, but it is version I am currently running.  Yes I can and will provide a Asterisk 13 version of the patch.

Whether to put it up for code review... depends on whether there is interest in doing so.  I had a particular problem I wanted so solve and this was the best way to do it.  I think it could be useful to others and so contributed it here in case it is of help (I started here looking for a solution and that led me to the referenced ASTERISK-22992 which prompted me to work on this).

On backward compatibility... at dialplan, cli, manager and call files it should be fine.  But I did need to add a parameter to internal function calls as the gosub can't execute on the new channel until it is created so that dragged me deeper into the code and required mods to everywhere else that called the same functions.  Would welcome ideas on alternative approaches... as implemented it is very specific to gosub on predial -- I gave no thought to whether/how to handle any other options that can be passed into app_dial that it might be useful to pass into app_originate as well.  Other options might also need to get passed down to ast_pbx_outgoing_exten/app to handle and that would require a more flexible way of passing those parameters down.

Thanks for your comments.
David

> app_originate: Add option to execute gosub prior to dial
> --------------------------------------------------------
>
>                 Key: ASTERISK-26587
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26587
>             Project: Asterisk
>          Issue Type: New Feature
>      Security Level: None
>          Components: Applications/app_originate
>    Affects Versions: 11.24.1
>         Environment: Linux
>            Reporter: dkerr
>            Assignee: dkerr
>            Severity: Minor
>         Attachments: asterisk-11-bugid26587.patch
>
>
> Inspired by issue ASTERISK-22992 that requested ability to add callerid into app_originate.  Comments in that issue suggested that it was better solved by adding an option to gosub prior to originating the call.
> The attached patch implements this much like app_dial with two options one to gosub on the originating channel and one to gosub on the newly created channel and behaves just like app_dial.  The attached patch has been tested on Asterisk 11.24.1.  I have tested adding callerid info and also SIPAddHeader (to e.g. add header to force auto answer) and confirmed it works. Have also tested both 'exten' and 'app' versions of app_originate.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list