[asterisk-bugs] [Asterisk 0017221]: [patch] Originate Action output is inconsistent with other manager actions

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Apr 21 13:11:52 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17221 
====================================================================== 
Reported By:                rrb3942
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17221
Category:                   Core/ManagerInterface
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 257809 
Request Review:              
====================================================================== 
Date Submitted:             2010-04-21 12:58 CDT
Last Modified:              2010-04-21 13:11 CDT
====================================================================== 
Summary:                    [patch] Originate Action output is inconsistent with
other manager actions
Description: 
The Orginate action output is inconsistent with how other manager actions
respond, and is even inconsistent with how itself responds with/without
Async: 1, supplying different information depending on if Async is used or
not.

It also will not send the response event (when using async) back to the
manager session if that manager session has events turned off. Other
actions that respond with events will do so even if events are turned off.
====================================================================== 

---------------------------------------------------------------------- 
 (0120694) rrb3942 (reporter) - 2010-04-21 13:11
 https://issues.asterisk.org/view.php?id=17221#c120694 
---------------------------------------------------------------------- 
The attached patch makes a number of changes to how the originate action
behaves.

1. It will always create the outgoing call asynchronously. The Async
option has been removed.
2. It will always respond on the manager connection, regardless of the
eventmask.
3. It checks the validity of the tech for the channel, existence of the
exten/context/priority, existence of the application. If these fail it
immediately returns with an error.
4. It includes the Application and Data, or Exten/Context/Priority in the
response event depending on which is used. (Old behavior always included
Exten/Context/priority regardless of what was used)
5. The 'Response' line in the event is removed in favor of 'Result' which
contains the text equivalent of 'Reason'.
6. It will always respond to an action as follows: Reponse Packet,
EventResponse, EventComplete. If there is an error before the outgoing call
is made it will only respond with a Response Packet.

Here is some example output of the new behavior:

Bad Application:

Action: Originate
Channel: SIP/4000
Application: Doesnotexist

Response: Error
Message: Invalid or missing Application

Good Application:

Action: Originate
Channel: SIP/4000
Application: Voicemail

Response: Success
Message: Response will follow

Event: OriginateResponse
Result: Remote end has Answered
Channel: SIP/4000-00000000
Application: Voicemail
Reason: 4
Uniqueid: 1271872076.0
CallerIDNum: <unknown>
CallerIDName: <unknown>

Event: OriginateComplete

Good Exten:

Action: Originate
Channel: SIP/4000
Exten: 4000
Context: from-internal
Priority: 1

Response: Success
Message: Response will follow

Event: OriginateResponse
Result: Remote end is Busy
Channel: SIP/4000
Exten: 4000
Context: from-internal
Priority: 1
Reason: 5
Uniqueid: <null>
CallerIDNum: <unknown>
CallerIDName: <unknown>

Bad Context:

Action: Originate
Channel: SIP/4000
Exten: 4000
Context: bad
Priority: 1

Response: Error
Message: Invalid or missing 'Exten', 'Context', or 'Priority'


ActionIDs are included in the responses if they are used.

This patch applies to trunk ok, but I was unable to get it to apply to
1.6.2.6.

This will most likely break things that were written to work with the old
Originate behavior. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-04-21 13:11 rrb3942        Note Added: 0120694                          
======================================================================




More information about the asterisk-bugs mailing list