[asterisk-gui] callforward with asterisk-gui.problem with stdexten
Ryan Brindley
rbrindley at digium.com
Tue Jul 21 08:17:00 CDT 2009
Oguzhan,
The GUI expects the macro-stdexten to behave in a specific manner and rewrites the macro if it does not match what is expected. This is both a good and a bad thing. The bad being the loss of flexibility in which you are experiencing.
Fortunately, you can easily modify the GUI to resolve your issue. In config/js/pbx.js lies the function that checks and rewrites the macro. If you change the 'macro-stdexten' member of the check_For_Contexts object to what you want, the GUI will write and keep your macro mods. The 'macro-stdexten' object definition looks like this (starting around line 34 of the file):
'macro-stdexten' : [
'exten=s,1,Set(__DYNAMIC_FEATURES=${FEATURES})',
'exten=s,2,GotoIf($["${FOLLOWME_${ARG1}}" = "1"]?5:3)',
'exten=s,3,Dial(${ARG2},${RINGTIME},${DIALOPTIONS})',
'exten=s,4,Goto(s-${DIALSTATUS},1)',
'exten=s,5,Macro(stdexten-followme,${ARG1},${ARG2})',
'exten=s-NOANSWER,1,Voicemail(${ARG1},u)',
'exten=s-NOANSWER,2,Goto(default,s,1)',
'exten=s-BUSY,1,Voicemail(${ARG1},b)',
'exten=s-BUSY,2,Goto(default,s,1)',
'exten=_s-.,1,Goto(s-NOANSWER,1)',
'exten=a,1,VoicemailMain(${ARG1})'
],
Hope this helps!
--
Ryan Brindley
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
main: +1 256-428-6000 fax: +1 256-864-0464
Check us out at: http://digium.com & http://asterisk.org
----- Original Message -----
From: "Oguzhan Kayhan" <oguzhank at bilkent.edu.tr>
To: asterisk-gui at lists.digium.com
Sent: Tuesday, July 21, 2009 1:40:25 AM GMT -06:00 US/Canada Central
Subject: [asterisk-gui] callforward with asterisk-gui.problem with stdexten
Hello, i sent that mail to asterisk group but it seems it is much more
interested within this group.
My asterisk and ast-gui version as follows:
Asterisk/1.6.0.9
Asterisk GUI-version : SVN-branch-2.0-r4760
I am trying to enable call forwarding on asterisk 1.6 with
asterisk-gui
If i set my stdexten as follows (with the lines i marked) everything seems
like working.
But if i make any change on asterisk-gui and apply it.. it recreates the
macro-stdexten and deletes my configuration regarding to it.
So where should i add my call-forward configuration???
Where am i making a mistake??
And for sure, it it in roadplan to add call-forwarding/dnd or similar
features to asterisk-gui ???
[macro-stdexten]
exten = s,1,Set(__DYNAMIC_FEATURES=${FEATURES})
exten = s,2,GotoIf($["${FOLLOWME_${ARG1}}" = "1"]?5:3)
;----adding starts from here----------------------------
exten = s,3,Set(temp=${DB(CFIM/${ARG1})})
exten = s,4,Dial(Local/${temp}@default/n) ; Unconditional forward
exten = s,5,Set(DB(lastcaller/${ARG1})=${CALLERID(num)}) ; Note the last
caller
;------ends here------------------------
exten = s,6,Dial(${ARG2},${RINGTIME},${DIALOPTIONS})
exten = s,7,Goto(s-${DIALSTATUS},1)
exten = s,8,Macro(stdexten-followme,${ARG1},${ARG2})
exten = s-NOANSWER,1,Voicemail(${ARG1},u)
exten = s-NOANSWER,2,Goto(default,s,1)
exten = s-BUSY,1,Voicemail(${ARG1},b)
exten = s-BUSY,2,Goto(default,s,1)
exten = _s-.,1,Goto(s-NOANSWER,1)
exten = a,1,VoicemailMain(${ARG1})
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
asterisk-gui mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-gui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-gui/attachments/20090721/321b0d11/attachment.htm
More information about the asterisk-gui
mailing list