[Home]

Summary:ASTERISK-22992: [patch]Asterisk app_originate doesn't allow setting Caller*ID on the originating channel
Reporter:Anthony Messina (amessina)Labels:
Date Opened:2013-12-15 17:52:04.000-0600Date Closed:2016-12-06 05:35:33.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Applications/app_originate
Versions:12.0.0-beta2 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-12-app_originate_callerid.patch
Description:Using Originate via the dialplan to "invite" additional parties to an in progress ConfBridge, one is unable to provide Caller*ID on the originating channel.

Basing my overly-simplistic work on another user trying to fix the same issue (https://github.com/cmendes0101/asterisk-originate-callerid), I have attached a patch to at least enable setting Caller*ID name and number.

I realize that is is a TODO to allow variable passing through to the Originated channel and am hopeful this will get the ball rolling.
Comments:By: Anthony Messina (amessina) 2013-12-15 17:53:05.377-0600

Patch allowing Caller*ID name and number to be specified in the ConfBridge application's argument list in the dialplan.

By: Matt Jordan (mjordan) 2013-12-15 18:24:46.364-0600

I'm almost wondering if what we should be doing when using Originate from the dialplan is to use a pre-dial handler on the newly created channel.

This would be similar to the pre-dial handlers in Dial/FollowMe, and would allow setting anything on the newly created channel.

By: Anthony Messina (amessina) 2013-12-15 18:31:59.745-0600

I do like the idea of pre-dial handlers.  In fact, I've just begun using them with the upgrade to Asterisk 12, and what a difference they make in terms of simplifying dialplans.  I'd love to see a pre-dial hander for Originate.

By: Dmitry Melekhov (slesru) 2014-12-25 07:15:02.283-0600

Thank you!
Just applied patch to 11.15.0 and it works.
I use it not with confbridge, but with meetme though :-)
Why it is not in mainline yet? :-(


By: Matt Jordan (mjordan) 2014-12-26 21:09:59.196-0600

The Asterisk Patch Contribution Process is available on the wiki:

https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process

To summarize:
# Any patch on an improvement can be marshalled through the process by an Asterisk Developer. No one has done that, so the issue is open.
# The contributor could, if they so choose, push the patch through the process by submitting it for code review. Patches that go through code review and are approved are generally merged quite quickly.

If this patch were reviewed - other than for technical correctness and coding guidelines - there are two points that would probably be raised:
# It could use some tests.
# Generally, the correct way to fix this problem is to implement pre-dial handlers for the Originate application. That allows modification of the outbound channel for any reason, as opposed to passing more parameters into the application itself. It also fixes the problem of "what should be on this outbound channel" once and for all.



By: Dmitry Melekhov (slesru) 2014-12-27 02:42:31.174-0600

Well, I posted my comment as user, but
as I understand, patch author may be not as good programmer as asterisk developers, or do not know
asterisk internals as good as asterisk developers.
So, if patch is useful and other users say it's useful , may be it's time for asterisk developers write this code in correct way, or provide this functions in correct way?
At least, this is way, usually works for other open source projects...

Thank you!

By: Matt Jordan (mjordan) 2015-01-19 20:07:57.957-0600

[~slesru]: The issue is open. If someone would like to use the patch as-is, that's great.

If someone would like to take the patch and put it up for code review by other developers, instructions for doing so are on the Asterisk wiki:

https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process

As I mentioned:

{quote}
# It could use some tests.
# Generally, the correct way to fix this problem is to implement pre-dial handlers for the Originate application. That allows modification of the outbound channel for any reason, as opposed to passing more parameters into the application itself. It also fixes the problem of "what should be on this outbound channel" once and for all.
{quote}

Which means the patch needs work.

There are currently 998 open issues in the ASTERISK project. If you'd like the patch to be included in Asterisk sooner rather than later, doing the work - and not pushing it onto others - will get it included quicker.

And that's how most open source projects work, by the way. Patches people care about get in - patches people don't care about, tend to get in slower.

By: Dmitry Melekhov (slesru) 2015-01-19 22:43:34.792-0600

yes, that's right- I'm quite happy with how this patch works now, don't need anything else here :-)


By: dkerr (dkerr) 2016-11-13 13:50:55.619-0600

See ASTERISK-26587 where I have submitted a patch inspired by this issue to add predial handlers to app_originate.

By: Friendly Automation (friendly-automation) 2016-12-06 05:35:34.238-0600

Change 4484 merged by Joshua Colp:
app_originate: Add option to execute gosub prior to dial

[https://gerrit.asterisk.org/4484|https://gerrit.asterisk.org/4484]