[Home]

Summary:ASTERISK-21002: Originate without Exten header does not work
Reporter:Vilius (vilius365)Labels:
Date Opened:2013-01-28 07:30:26.000-0600Date Closed:2013-01-30 11:46:12.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:
Versions:11.2.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:( 0) manager.patch
Description:Asterisk 11 ManagerAction_Originate description states "Generates an outgoing call to a Extension/Context/Priority or Application/Data". However I have noticed that only Extension/Context/Priority is working. When trying to use Application/Data the manager generates an error:

Response: Error
Message: Extension does not exist.

Comments:By: Vilius (vilius365) 2013-01-28 07:32:47.885-0600

proposed solution, this if statement prevents Application/Data approach to work

By: Matt Jordan (mjordan) 2013-01-28 09:15:24.683-0600

I think you're calling the Originate AMI action incorrectly. The following works just fine on 11.2.1:

{noformat}
Action: Originate
Channel: SIP/phone_a
Application: Wait
Data: 500

Response: Success
Message: Originate successfully queued

Event: Newchannel
Privilege: call,all
Channel: SIP/phone_a-00000001
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum: A
CallerIDName: Phone A
AccountCode:
Exten:
Context: default
Uniqueid: Asterisk-01-1359385915.5

...

{noformat}

By: Vilius (vilius365) 2013-01-28 09:27:04.236-0600

Yes, you are correct in this case. However if any of (Exten, Context, Priority) is in the Originate request it will fail with "Extension does not exist.". Personally I believe the code should be smart enough to figure out that you want to use Application/Data method instead of Exten/Context/Priority, if you have specified Application and Data headers. And this was the case for older Asterisk 1.4.X releases. This also might cause backward compatibility issue for the software that was using Asterisk 1.4.X as it did for us.

By: Jonathan Rose (jrose) 2013-01-28 11:31:26.852-0600

It's worth noting that if you want your patches to be accepted, you have to acknowledge that they are code submissions and you must have a signed license agreement.

By: Matt Jordan (mjordan) 2013-01-28 11:44:50.371-0600

{quote}
Yes, you are correct in this case. However if any of (Exten, Context, Priority) is in the Originate request it will fail with "Extension does not exist.". Personally I believe the code should be smart enough to figure out that you want to use Application/Data method instead of Exten/Context/Priority, if you have specified Application and Data headers. And this was the case for older Asterisk 1.4.X releases. This also might cause backward compatibility issue for the software that was using Asterisk 1.4.X as it did for us.
{quote}

Fair enough on a behavior change.

This is, however, a "bad idea". If you specify context and priority, as well as application and data, which one did you really mean? Did you really mean context, extension, and priority and you have an error (in which case we should reject it) - or did you really mean application and data?

Having the software make guesses - and probably guess wrong for some set of users - is probably why the behavior is changed.