Ticket #513 (closed Patches: invalid)

Opened 6 years ago

Last modified 4 years ago

Add Macro to Ringgroups

Reported by: kjcsb Assigned to: nobody
Priority: minor Milestone: 2.5
Component: Core Version:
Keywords: Cc:
Confirmation: Confirmed SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description (Last modified by gregmac)

This patch allows a macro to be called by a ring 
group. i.e. exten => s,42,Dial(${${HuntMember}}${ds}M
(${DialMacro})).
The user is provided with an additional field on the 
ringgroups configuration page. The user can enter free 
text into this field in the form macro_name^arg1^arg2 
etc. This information is stored in the macro column in 
the ringgroup table (this is a new column). The 
extensions_additional.conf is also updated with the 
macro details e.g. exten = > 12345,n,Set(DialMacro = 
macro_name^arg1^arg2)
The user should then update extensions_custom.conf 
with the macro details. 
Files changed:
asterisk/extensions.conf
modules/ringgroups/page.ringroups.php 
modules/ringgroups/functions.inc.php
modules/ringgroups/install.sql

Attachments

dialmacro_02.patch (6.8 kB) - added by kjcsb on 11/06/06 02:33:00.
Patch file

Change History

03/29/06 02:04:07 changed by kjcsb

Logged In: YES 
user_id=1236862

To use the diff file:
cd /var/www/html (or whereever freepbx files are located)
patch -p1 -u -i /path/to/dialmacro_02.patch

You will need to specify the location of extensions.conf 
(probably /etc/asterisk/)

(follow-up: ↓ 3 ) 10/03/06 16:32:08 changed by gregmac

  • status changed from assigned to closed.
  • resolution changed from None to wontfix.
  • description changed.

Missing patch file, and I'm unclear on the value of this patch - why would you want to call a macro this way? If there is a good case then perhaps just writing a module would be better.

11/06/06 02:33:00 changed by kjcsb

  • attachment dialmacro_02.patch added.

Patch file

(in reply to: ↑ 2 ) 11/06/06 02:46:28 changed by kjcsb

  • status changed from closed to reopened.
  • resolution deleted.

Replying to gregmac:

Missing patch file, and I'm unclear on the value of this patch - why would you want to call a macro this way? If there is a good case then perhaps just writing a module would be better.

Patch file uploaded.

An example use case: User dials in and presses 9 at prompt. This sends user to group. Destination of group is an external number which is dialed with the M option, the macro name (e.g. testing1) plus parameters. If the user answers they are asked to acknowledge receipt of the call.

[macro-testing1] exten => s,1,Wait(1) exten => s,2,Set(TIMEOUT(response)=5) exten => s,3,Set(TIMEOUT(digit)=4) exten => s,4,Read(ACCEPT|custom/${ARG1}|1) exten => s,5,GotoIf?($[${ACCEPT} = 1 ] ?6:7) exten => s,6,NoOp?(Called party acknowledged receipt) exten => s,7,NoOp?(Called party not acknowledged receipt)

11/06/06 08:08:23 changed by gregmac

Ringgroups and followme in 2.2 support call confirm, which makes this unnecessary in that case. Are there other examples of where this is useful?

11/06/06 22:37:44 changed by kjcsb

The wiki has some other examples. Allowing a macro to be specified is more powerful and enables a lot of flexibility outside just call confirm.

07/24/08 16:55:52 changed by p_lindheimer

  • status changed from reopened to closed.
  • confirmation set to Confirmed.
  • engine_version changed.
  • svn_rev changed.
  • version deleted.
  • milestone set to 2.5.
  • resolution set to invalid.

modules can be written that can splice into other module dialplan if needed. We can't start adding random 'macro' fields in every module, it gets much to dangerous.