Summary: | ASTERISK-02855: [patch] Improve app_dial M(macro) stuff | ||
Reporter: | Anthony Minessale (anthm) | Labels: | |
Date Opened: | 2004-11-18 18:59:46.000-0600 | Date Closed: | 2008-01-15 15:14:42.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_dial |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) app_dial_rev2.diff ( 1) app_dial_rev3.diff ( 2) app_dial_rev4.diff ( 3) app_dial_rev5.diff ( 4) app_dial.diff | |
Description: | This patch enhances the M(macro) option to allow controllable behaviour First, you can now add args to the macro by using a '^' char Dial(Zap/1|60|M(mymacro^cat^dog^bark)) Also, the macro can set the MACRO_RESULT variable to do the following: ABORT - Hangup both legs of the call CONTINUE - Hangup the called party and continue on in the dialplan from where you called Dial GOTO:<context>^<exten>^<priority> - Transfer the call. ****** ADDITIONAL INFORMATION ****** Disclaimer on file anthmct@yahoo.com | ||
Comments: | By: Brian West (bkw918) 2004-11-18 19:14:42.000-0600 Example usage of the above patch. screen-record: Please record your name press pound when finished. screen-from: You have a call from screen-accept: Press 1 to accept this call or any other key to reject. exten => 890,1,Wait(0.2) exten => 890,2,Playback(screen-record) exten => 890,3,SetVar(SCREEN_FILE=/tmp/${CALLERIDNUM}-${EPOCH}) exten => 890,4,Record(${SCREEN_FILE}.gsm|6|25) exten => 890,5,Dial(SIP/16|60|gM(screen^${SCREEN_FILE})) exten => 890,6,Voicemail(10@default) [macro-screen] exten => s,1,Wait(0.2) exten => s,2,Playback(screen-from) exten => s,3,Playback(${ARG1}) exten => s,4,Read(ACCEPT|screen-accept|1) exten => s,5,GotoIf($[${ACCEPT} = 1 ] ?7:6) exten => s,6,SetVar(MACRO_RESULT=CONTINUE) exten => s,7,System(/bin/rm ${ARG1}) edited on: 11-18-04 19:15 By: Mark Spencer (markster) 2004-11-19 00:05:50.000-0600 how about GOTO:[exten[@context][:priority]] or similar? By: Mark Spencer (markster) 2004-11-19 00:22:29.000-0600 Basically, it would be good if the GOTO can specify a priority. Normally we use priority, exten|priority, or context|exten|priority but i don't know how easy it would be to embed | in the variable. By: cmslaght (cmslaght) 2004-11-19 08:43:10.000-0600 I applied patch and followed example and got this result: Nov 19 09:40:19 WARNING[1146899]: app_macro.c:90 macro_exec: No such context 'macro-screen^4198245888-1100875200' for macro 'screen^4198245888-1100875200' By: Anthony Minessale (anthm) 2004-11-19 09:20:04.000-0600 Updated to allow priority Any of the following *shoud* work (I didn't test it so give it a try.) exten:pri exten@context exten@context:pri By: Anthony Minessale (anthm) 2004-11-22 14:54:20.000-0600 revison 3: adds BUSY to simulate n+101 makes GOTO:context^exten^priority work moves pbx_builtin_* to public api By: Anthony Minessale (anthm) 2004-11-22 15:35:37.000-0600 Take 4 By: Mark Spencer (markster) 2004-11-22 17:11:31.000-0600 Added to CVS By: Russell Bryant (russell) 2004-11-25 02:30:42.000-0600 not in 1.0 By: Digium Subversion (svnbot) 2008-01-15 15:14:42.000-0600 Repository: asterisk Revision: 4317 U trunk/apps/app_dial.c U trunk/include/asterisk/pbx.h U trunk/pbx.c ------------------------------------------------------------------------ r4317 | markster | 2008-01-15 15:14:42 -0600 (Tue, 15 Jan 2008) | 2 lines Add improved macro functionality (bug ASTERISK-2855) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=4317 |