Changeset 3630

Show
Ignore:
Timestamp:
01/24/07 13:11:32 (2 years ago)
Author:
p_lindheimer
Message:

update to macro-vm for VmX Locator and required upgrade/install changes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/SQL/newinstall.sql

    r3254 r3630  
    219219/*!40000 ALTER TABLE `globals` DISABLE KEYS */; 
    220220LOCK TABLES `globals` WRITE; 
    221 INSERT INTO `globals` VALUES ('CALLFILENAME','\"\"'),('DIAL_OPTIONS','tr'),('TRUNK_OPTIONS',''),('DIAL_OUT','9'),('FAX',''),('FAX_RX','system'),('FAX_RX_EMAIL','fax@mydomain.com'),('FAX_RX_FROM','freepbx@gmail.com'),('INCOMING','group-all'),('NULL','\"\"'),('OPERATOR',''),('OPERATOR_XTN',''),('PARKNOTIFY','SIP/200'),('RECORDEXTEN','\"\"'),('RINGTIMER','15'),('DIRECTORY','last'),('AFTER_INCOMING',''),('IN_OVERRIDE','forcereghours'),('REGTIME','7:55-17:05'),('REGDAYS','mon-fri'),('DIRECTORY_OPTS',''),('DIALOUTIDS','1'),('OUT_1','ZAP/g0'),('VM_PREFIX','*'),('VM_OPTS',''),('VM_GAIN',''),('VM_DDTYPE','u'),('TIMEFORMAT','kM'),('TONEZONE','us'),('ALLOW_SIP_ANON','no'); 
     221INSERT INTO `globals` VALUES  
     222         ('CALLFILENAME','\"\"') 
     223        ,('DIAL_OPTIONS','tr') 
     224        ,('TRUNK_OPTIONS','') 
     225        ,('DIAL_OUT','9') 
     226        ,('FAX','') 
     227        ,('FAX_RX','system') 
     228        ,('FAX_RX_EMAIL','fax@mydomain.com') 
     229        ,('FAX_RX_FROM','freepbx@gmail.com') 
     230        ,('INCOMING','group-all'),('NULL','\"\"') 
     231        ,('OPERATOR',''),('OPERATOR_XTN','') 
     232        ,('PARKNOTIFY','SIP/200') 
     233        ,('RECORDEXTEN','\"\"') 
     234        ,('RINGTIMER','15') 
     235        ,('DIRECTORY','last') 
     236        ,('AFTER_INCOMING','') 
     237        ,('IN_OVERRIDE','forcereghours') 
     238        ,('REGTIME','7:55-17:05') 
     239        ,('REGDAYS','mon-fri') 
     240        ,('DIRECTORY_OPTS','') 
     241        ,('DIALOUTIDS','1') 
     242        ,('OUT_1','ZAP/g0') 
     243        ,('VM_PREFIX','*') 
     244        ,('VM_OPTS','') 
     245        ,('VM_GAIN','') 
     246        ,('VM_DDTYPE','u') 
     247        ,('TIMEFORMAT','kM') 
     248        ,('TONEZONE','us') 
     249        ,('ALLOW_SIP_ANON','no') 
     250        ,('VMX_CONTEXT','from-internal') 
     251        ,('VMX_PRI','1') 
     252        ,('VMX_TIMEDEST_CONTEXT','') 
     253        ,('VMX_TIMEDEST_EXT','dovm') 
     254        ,('VMX_TIMEDEST_PRI','1') 
     255        ,('VMX_LOOPDEST_CONTEXT','') 
     256        ,('VMX_LOOPDEST_EXT','dovm') 
     257        ,('VMX_LOOPDEST_PRI','1') 
     258        ,('VMX_OPTS_TIMEOUT','') 
     259        ,('VMX_OPTS_LOOP','') 
     260        ,('VMX_OPTS_DOVM','') 
     261        ,('VMX_TIMEOUT','2') 
     262        ,('VMX_REPEAT','1') 
     263        ,('VMX_LOOPS','1') 
     264        ; 
    222265UNLOCK TABLES; 
    223266/*!40000 ALTER TABLE `globals` ENABLE KEYS */; 
  • freepbx/trunk/SQL/newinstall.sqlite.sql

    r3254 r3630  
    106106INSERT INTO globals VALUES ('TONEZONE', 'us'); 
    107107INSERT INTO globals VALUES ('ALLOW_SIP_ANON', 'no'); 
     108INSERT INTO globals VALUES ('VMX_CONTEXT','from-internal'); 
     109INSERT INTO globals VALUES ('VMX_PRI','1'); 
     110INSERT INTO globals VALUES ('VMX_TIMEDEST_CONTEXT',''); 
     111INSERT INTO globals VALUES ('VMX_TIMEDEST_EXT','dovm'); 
     112INSERT INTO globals VALUES ('VMX_TIMEDEST_PRI','1'); 
     113INSERT INTO globals VALUES ('VMX_LOOPDEST_CONTEXT',''); 
     114INSERT INTO globals VALUES ('VMX_LOOPDEST_EXT','dovm'); 
     115INSERT INTO globals VALUES ('VMX_LOOPDEST_PRI','1'); 
     116INSERT INTO globals VALUES ('VMX_OPTS_TIMEOUT',''); 
     117INSERT INTO globals VALUES ('VMX_OPTS_LOOP',''); 
     118INSERT INTO globals VALUES ('VMX_OPTS_DOVM',''); 
     119INSERT INTO globals VALUES ('VMX_TIMEOUT','2'); 
     120INSERT INTO globals VALUES ('VMX_REPEAT','1'); 
     121INSERT INTO globals VALUES ('VMX_LOOPS','1'); 
    108122 
    109123-- -------------------------------------------------------- 
  • freepbx/trunk/amp_conf/astetc/extensions.conf

    r3625 r3630  
    128128exten => _s-.,n,Congestion(10) 
    129129 
     130;------------------------------------------------------------------------ 
     131; [macro-vm] 
     132;------------------------------------------------------------------------ 
     133; CONTEXT:      macro-vm 
     134; PURPOSE:      call voicemail system and extend with personal ivr 
     135; 
     136; Under normal use, this macro will call the voicemail system with the extension and 
     137; desired greeting mode of busy, unavailable or as specified with direct voicemail 
     138; calls (usually unavailable) when entered from destinations. 
     139; 
     140; The voicemail system's two greetings have been 'hijacked' as follows to extend the 
     141; system by giving the option of a private 'ivr' for each voicemail user. The following 
     142; applies to both the busy and unavailable modes of voicemail and can be applied to one 
     143; or both, and differently. 
     144; 
     145; Global Defaults: 
     146; 
     147; The following are default values, used in both busy and unavail modes if no specific 
     148; values are specified. 
     149; 
     150; VMX_REPEAT 
     151;                                       The number of times to repeat the users message if no option is pressed. 
     152; VMX_TIMEOUT 
     153;                                       The timeout to wait after playing message before repeating or giving up. 
     154; VMX_LOOPS 
     155;                                       The number of times it should replay the message and check for an option when 
     156;                                       an invalid option is pressed. 
     157; 
     158; VMX_OPTS_DOVM 
     159;                                       Default voicemail option to use if vm is chosen as an option. No options will 
     160;                                       cause Allison's generic message, 's' will go straight to beep. 
     161; VMX_OPTS_TIMEOUT 
     162;                                       Default voicemail option to use if it times out with no options. No options will 
     163;                                       cause Allison's generic message, 's' will go straight to beep. 
     164;                                       IF THE USER PRESSES # - it will look like a timeout as well since no option will 
     165;                                       be presented. If the user wishes to enable a mode where a caller can press # 
     166;                                       during their message and it goes straight to voicemail with only a 'beep' then 
     167;                                       this should be set to 's'. 
     168; VMX_OPTS_LOOPS 
     169;                                       Default voicemail option to use if to many wrong options occur. No options will 
     170;                                       cause Allison's generic message, 's' will go straight to beep. 
     171; 
     172; VMX_CONTEXT 
     173;                                       Default context for user destinations if not supplied in the user's settings 
     174; VMX_PRI 
     175;                                       Default priority for user destinations if not supplied in the user's settings 
     176; 
     177; VMX_TIMEDEST_CONTEXT 
     178;                                       Default context for timeout destination if not supplied in the user's settings 
     179; VMX_TIMEDEST_EXT 
     180;                                       Default extension for timeout destination if not supplied in the user's settings 
     181; VMX_TIMEDEST_PRI 
     182;                                       Default priority for timeout destination if not supplied in the user's settings 
     183; 
     184; VMX_LOOPDEST_CONTEXT 
     185;                                       Default context for loops  destination if not supplied in the user's settings 
     186; VMX_LOOPDEST_EXT 
     187;                                       Default extension for loops  destination if not supplied in the user's settings 
     188; VMX_LOOPDEST_PRI 
     189;                                       Default priority for loops  destination if not supplied in the user's settings 
     190; 
     191; 
     192; The AMPUSER database variable has been extended with a 'vmx' tree (vm-extension). A 
     193; duplicate set is included for both unavail and busy. You could choose for to have an 
     194; ivr when unavail is taken, but not with busy - or a different once with busy. 
     195; The full list is below, each specific entry is futher described: 
     196; 
     197; state:                Whether teh current mode is enabled or disabled. Anything but 'enabled' is 
     198;                                               treated as disabled. 
     199; repeat:               This is the number of times that the users message should be played after the 
     200;                                               timeout if the user has not entered anything. It is just a variable to the 
     201;                                               Read() function which will do the repeating. 
     202; timeout:      This is how long to wait after the message has been read for a response from 
     203;                                               the user. A caller can enter a digit any time during the playback. 
     204; loops:                This is the number of loops that the system will allow a caller to retry if 
     205;                                               they enter a bad menu choice, before going to the loop failover destination 
     206; vmxopts:      This is the vm options to send to the voicemail command used when a specific 
     207;                                               voicemail destination is chosen (inidcated by 'dovm' in the ext field). This is 
     208;                                               typically either set to 's' or left blank. When set to 's' there will be no 
     209;                                               message played when entering the voicemail, just a beep. When blank, you will 
     210;                                               have Allison's generic message played. It is not typical to play the greetings 
     211;                                               since they have been 'hijacked' for these IVR's and from a caller's perspecitive 
     212;                                               this system appears interconnected with the voicemail so instructions can be 
     213;                                               left there. 
     214; timedest: The three variables: ext, context and pri are the goto destination if the caller 
     215;                                               enters no options and it timesout. None have to be set and a system default 
     216;                                               will be used. If just ext is set, then defaults will be used for context and 
     217;                                               pri, etc. 
     218; loopdest:     This is identical to timedest but used if the caller exceeds the maximum invalid 
     219;                                               menu choices. 
     220; [0-9*]:               The user can specify up to 11 ivr options, all as single digits from 0-9 or *. The 
     221;                                               # key can not be used since it is used as a terminator key for the Read command 
     222;                                               and will never be returned. A minimum of the ext must be specified for each valid 
     223;                                               option and as above, the context and priority can also be specified if the default 
     224;                                               is not to be used. 
     225;                                               Option '0' takes on a special meaning. Since a user is able to break out of the 
     226;                                               voicemail command once entering it with a 0, if specified, the 0 destination will 
     227;                                               be used. 
     228;                                               Option '*' can also be used to breakout. It is undecided at this point whether 
     229;                                               providing that option will be used as well. (probably should). 
     230; 
     231; 
     232; /AMPUSER/<ext>/vmx/[busy|unavail]/state:                                                              enabled|disabled 
     233; /AMPUSER/<ext>/vmx/[busy|unavail]/repeat:                                                             n (times to repeat message) 
     234; /AMPUSER/<ext>/vmx/[busy|unavail]/timeout:                                                    n (timeout to wait for digit) 
     235; /AMPUSER/<ext>/vmx/[busy|unavail]/loops:                                                              n (loop returies for invalid entries) 
     236; /AMPUSER/<ext>/vmx/[busy|unavail]/vmxopts/dovm:                                       vmoptions (if ext is dovm) 
     237; /AMPUSER/<ext>/vmx/[busy|unavail]/vmxopts/timeout:                    vmoptions (if timeout) 
     238; /AMPUSER/<ext>/vmx/[busy|unavail]/vmxopts/loops:                              vmoptions (if loops) 
     239; /AMPUSER/<ext>/vmx/[busy|unavail]/timedest/ext:                                       extension (if timeout) 
     240; /AMPUSER/<ext>/vmx/[busy|unavail]/timedest/context:                   context (if timeout) 
     241; /AMPUSER/<ext>/vmx/[busy|unavail]/timedest/pri:                                       priority (if timeout) 
     242; /AMPUSER/<ext>/vmx/[busy|unavail]/loopdest/ext:                                       extension (if too many failures) 
     243; /AMPUSER/<ext>/vmx/[busy|unavail]/loopdest/context:                   context (if too many failures) 
     244; /AMPUSER/<ext>/vmx/[busy|unavail]/loopdest/pri:                                       priority (if too many failures) 
     245; /AMPUSER/<ext>/vmx/[busy|unavail]/[0-9*]/ext:                                         extension (dovm for vm access) 
     246; /AMPUSER/<ext>/vmx/[busy|unavail]/[0-9*]/context:                             context  
     247; /AMPUSER/<ext>/vmx/[busy|unavail]/[0-9*]/pri:                                         priority  
     248;------------------------------------------------------------------------ 
    130249[macro-vm] 
     250; ARG1 - extension 
     251; ARG2 - DIRECTDIAL/BUSY 
    131252exten => s,1,Macro(user-callerid,SKIPTTL) 
    132253exten => s,n,Set(VMGAIN=${IF($["foo${VM_GAIN}"!="foo"]?"g(${VM_GAIN})":"")}) 
     
    136257; transfers will properly function. 
    137258; 
    138 exten => s,n,GotoIf($["foo${DB(${BLKVM_OVERRIDE})}" != "fooTRUE"]?s-${ARG2},1) 
     259exten => s,n,GotoIf($["foo${DB(${BLKVM_OVERRIDE})}" != "fooTRUE"]?vmx,1) 
    139260; 
    140261; we didn't branch so block this from voicemail 
    141262; 
    142263exten => s,n,Noop(CAME FROM: ${NODEST} - Blocking VM cause of key: ${DB(BLKVM_OVERRIDE)}) 
     264 
     265 
     266; If vmx not enabled for the current mode,then jump to normal voicemail behavior 
     267; 
     268exten => vmx,1,Set(MODE=${IF($["${ARG2}"="BUSY"]?busy:unavail)}) 
     269exten => vmx,n,Noop(Checking if ext ${ARG1} is enabled: ${DB(AMPUSER/${ARG1}/vmx/${MODE}/state)}) 
     270exten => vmx,n,GotoIf($["${DB(AMPUSER/${ARG1}/vmx/${MODE}/state)}" != "enabled"]?s-${ARG2},1) 
     271 
     272; If the required voicemail file does not exist, then abort and go to normal voicemail behavior 
     273; TODO: figure out which is proper file (.wav or .WAV) and maybe find a better way 
     274; 
     275exten => vmx,n,Macro(get-vmcontext,${ARG1}) 
     276exten => vmx,n(file),System(ls /var/spool/asterisk/voicemail/${VMCONTEXT}/${ARG1}/${MODE}.wav) 
     277 
     278; Get the repeat, timeout and loop times to use if they are overriden form the global settings 
     279; 
     280exten => vmx,n,Set(LOOPCOUNT=0) 
     281exten => vmx,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/repeat)}" = "0"]?vmxtime) 
     282exten => vmx,n,Set(VMX_REPEAT=${DB_RESULT}) 
     283exten => vmx,n(vmxtime),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/timeout)}" = "0"]?vmxloops) 
     284exten => vmx,n,Set(VMX_TIMEOUT=${DB_RESULT}) 
     285exten => vmx,n(vmxloops),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/loops)}" = "0"]?vmxanswer) 
     286exten => vmx,n,Set(VMX_LOOPS=${DB_RESULT}) 
     287exten => vmx,n(vmxanswer),Answer() 
     288 
     289; Now play the users voicemail recording as the basis for their ivr, the Read command will repeat as needed and if it timesout 
     290; then we go to the timeout. Otherwise handle invalid options by looping until the limit until a valid option is played. 
     291; 
     292exten => vmx,n(loopstart),Read(ACTION,/var/spool/asterisk/voicemail/${VMCONTEXT}/${ARG1}/${MODE},1,skip,${VMX_REPEAT},${VMX_TIMEOUT}) 
     293exten => vmx,n,GotoIf($["${EXISTS(${ACTION})}" = "1"]?checkopt) 
     294 
     295; If we are here we timed out, go to the required destination 
     296; 
     297exten => vmx,n(noopt),Noop(Timeout: going to timeout dest) 
     298exten => vmx,n,Set(VMX_OPTS=${VMX_OPTS_TIMEOUT}) 
     299exten => vmx,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/vmxopts/timeout)}" = "0"]?chktime) 
     300exten => vmx,n,Set(VMX_OPTS=${DB_RESULT}) 
     301exten => vmx,n(chktime),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/timedest/ext)}" = "0"]?dotime) 
     302exten => vmx,n,Set(VMX_TIMEDEST_EXT=${DB_RESULT}) 
     303exten => vmx,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/timedest/context)}" = "0"]?timepri) 
     304exten => vmx,n,Set(VMX_TIMEDEST_CONTEXT=${DB_RESULT}) 
     305exten => vmx,n(timepri),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/timedest/pri)}" = "0"]?dotime) 
     306exten => vmx,n,Set(VMX_TIMEDEST_PRI=${DB_RESULT}) 
     307exten => vmx,n(dotime),Goto(${VMX_TIMEDEST_CONTEXT},${VMX_TIMEDEST_EXT},${VMX_TIMEDEST_PRI}) 
     308 
     309; We got an option, check if the option is defined, or one of the system defaults 
     310; 
     311exten => vmx,n(checkopt),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/${ACTION}/ext)}" = "1"]?doopt) 
     312exten => vmx,n,GotoIf($["${ACTION}" = "0"]?o,1) 
     313exten => vmx,n,GotoIf($["${ACTION}" = "*"]?adef,1) 
     314 
     315; Got invalid option loop until the max 
     316; 
     317exten => vmx,n,Set(LOOPCOUNT=$[${LOOPCOUNT} + 1]) 
     318exten => vmx,n,GotoIf($[${LOOPCOUNT} > ${VMX_LOOPS}]?toomany) 
     319exten => vmx,n,Playback(pm-invalid-option&please-try-again) 
     320exten => vmx,n,Goto(loopstart) 
     321 
     322; tomany: to many invalid options, go to the specified destination 
     323; 
     324exten => vmx,n(toomany),Noop(Too Many invalid entries, got to invalid dest) 
     325exten => vmx,n,Set(VMX_OPTS=${VMX_OPTS_LOOPS}) 
     326exten => vmx,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/vmxopts/loops)}" = "0"]?chkloop) 
     327exten => vmx,n,Set(VMX_OPTS=${DB_RESULT}) 
     328exten => vmx,n(chkloop),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/loopdest/ext)}" = "0"]?doloop) 
     329exten => vmx,n,Set(VMX_LOOPDEST_EXT=${DB_RESULT}) 
     330exten => vmx,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/loopdest/context)}" = "0"]?looppri) 
     331exten => vmx,n,Set(VMX_LOOPDEST_CONTEXT=${DB_RESULT}) ;TODO make configurable per above 
     332exten => vmx,n(looppri),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/loopdest/pri)}" = "0"]?doloop) 
     333exten => vmx,n,Set(VMX_LOOPDEST_PRI=${DB_RESULT}) ;TODO make configurable per above 
     334exten => vmx,n(doloop),Goto(${VMX_LOOPDEST_CONTEXT},${VMX_LOOPDEST_EXT},${VMX_LOOPDEST_PRI}) 
     335 
     336; doopt: execute the valid option that was chosen 
     337; 
     338exten => vmx,n(doopt),Noop(Got a valid option: ${DB_RESULT}) 
     339exten => vmx,n,Set(VMX_EXT=${DB_RESULT}) 
     340; 
     341; Special case, if this option was to go to voicemail, set options and go 
     342; 
     343exten => vmx,n,GotoIf($["${VMX_EXT}" != "dovm"]?getdest) 
     344exten => vmx,n(vmxopts),Set(VMX_OPTS=${VMX_OPTS_DOVM}) 
     345exten => vmx,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/vmxopts/dovm)}" = "0"]?vmxdovm) 
     346exten => vmx,n(vmxopts),Set(VMX_OPTS=${DB_RESULT}) 
     347exten => vmx,n(vmxdovm),goto(dovm,1) 
     348; 
     349; General case, setup the goto destination and go there (no error checking, its up to the GUI's to assure 
     350; reasonable values 
     351; 
     352exten => vmx,n(getdest),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/${ACTION}/context)}" = "0"]?vmxpri) 
     353exten => vmx,n,Set(VMX_CONTEXT=${DB_RESULT}) 
     354exten => vmx,n(vmxpri),GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/${ACTION}/pri)}" = "0"]?vmxgoto) 
     355exten => vmx,n,Set(VMX_PRI=${DB_RESULT}) 
     356exten => vmx,n(vmxgoto),Goto(${VMX_CONTEXT},${VMX_EXT},${VMX_PRI}) 
     357 
     358; If the required voicemail file is not present, then revert to normal voicemail 
     359; behavior treating as if it was not set 
     360; 
     361exten => vmx,file+101,Noop(File for mode: ${MODE} does not exist, going to normal voicemail) 
     362exten => vmx,n,Goto(s-${ARG2},1) 
     363 
     364; Drop into voicemail either as a direct destination (in which case VMX_OPTS might be set to something) or 
     365; if the user timed out or broke out of the loop then VMX_OPTS is always cleared such that an Allison 
     366; message is played and the caller know's what is going on. 
     367; 
     368exten => dovm,1,Noop(VMX Timeout - go to voicemail) 
     369exten => dovm,n,Voicemail(${ARG1}@${VMCONTEXT}|${VMX_OPTS}${VMGAIN}) ; no flags, so allison plays please leave ... 
     370exten => dovm,n,Goto(exit-${VMSTATUS},1) 
    143371 
    144372exten => s-BUSY,1,NoOp(BUSY voicemail) 
     
    156384exten => _s-.,n,Goto(exit-${VMSTATUS},1) 
    157385 
     386; If the user has a 0 option defined, use that for operator zero-out from within voicemail 
     387; as well to keep it consistant with the menu structure 
     388; 
    158389exten => o,1,Background(one-moment-please)      ; 0 during vm message will hangup 
    159 exten => o,n,GotoIf($["x${OPERATOR_XTN}"="x"]?nooper:from-internal,${OPERATOR_XTN},1) 
     390exten => o,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/0/ext)}" = "0"]?doopdef) 
     391 
     392exten => o,n,Set(VMX_OPDEST_EXT=${DB_RESULT}) 
     393exten => o,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/0/context)}" = "1"]?opcontext) 
     394exten => o,n,Set(DB_RESULT=${VMX_CONTEXT}) 
     395exten => o,n(opcontext),Set(VMX_OPDEST_CONTEXT=${DB_RESULT}) 
     396exten => o,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/0/pri)}" = "1"]?oppri) 
     397exten => o,n,Set(DB_RESULT=${VMX_PRI}) 
     398exten => o,n(oppri),Set(VMX_OPDEST_PRI=${DB_RESULT}) 
     399 
     400exten => o,n,Goto(${VMX_OPDEST_CONTEXT},${VMX_OPDEST_EXT},${VMX_OPDEST_PRIORITY}) 
     401exten => o,n(doopdef),GotoIf($["x${OPERATOR_XTN}"="x"]?nooper:from-internal,${OPERATOR_XTN},1) 
    160402exten => o,n(nooper),GotoIf($["x${FROM_DID}"="x"]?nodid) 
    161 exten => o,n,Dial(Local/${FROM_DID}@from-pstn) 
     403exten => o,n,Dial(Local/${FROM_DID)@from-pstn) 
    162404exten => o,n,Macro(hangup) 
    163405exten => o,n(nodid),Dial(Local/s@from-pstn) 
    164406exten => o,n,Macro(hangup) 
    165407 
     408; If the user has a * option defined, use that for the * out from within voicemail 
     409; as well to keep it consistant with the menu structure 
     410; 
    166411exten => a,1,Macro(get-vmcontext,${ARG1}) 
    167 exten => a,n,VoiceMailMain(${ARG1}@${VMCONTEXT}) 
    168 exten => a,n,Hangup 
     412exten => a,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/*/ext)}" = "0"]?adef,1) 
     413 
     414exten => a,n,Set(VMX_ADEST_EXT=${DB_RESULT}) 
     415exten => a,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/*/context)}" = "1"]?acontext) 
     416exten => a,n,Set(DB_RESULT=${VMX_CONTEXT}) 
     417exten => a,n(acontext),Set(VMX_ADEST_CONTEXT=${DB_RESULT}) 
     418exten => a,n,GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/*/pri)}" = "1"]?apri) 
     419exten => a,n,Set(DB_RESULT=${VMX_PRI}) 
     420exten => a,n(apri),Set(VMX_ADEST_PRI=${DB_RESULT}) 
     421exten => a,n,Goto(${VMX_ADEST_CONTEXT},${VMX_ADEST_EXT},${VMX_ADEST_PRI}) 
     422 
     423exten => adef,1,VoiceMailMain(${ARG1}@${VMCONTEXT}) 
     424exten => adef,n,Hangup 
    169425 
    170426exten => exit-FAILED,1,Playback(im-sorry&an-error-has-occured) 
     
    178434 
    179435exten => t,1,Hangup() 
     436;------------------------------------------------------------------------ 
    180437 
    181438;------------------------------------------------------------------------ 
  • freepbx/trunk/upgrades/2.3.0alpha/tables.php

    r3254 r3630  
    3333} 
    3434 
     35 
     36outn("Checking for Global var VMX_CONTEXT.."); 
     37$nrows = $db->getOne("SELECT count(*) from globals where variable='VMX_CONTEXT'"); 
     38if (!$nrows) { 
     39        $db->query("insert into globals values ('VMX_CONTEXT', 'from-internal')"); 
     40        out("Created"); 
     41} else { 
     42        out("Already exists!"); 
     43} 
     44 
     45outn("Checking for Global var VMX_PRI.."); 
     46$nrows = $db->getOne("SELECT count(*) from globals where variable='VMX_PRI'"); 
     47if (!$nrows) { 
     48        $db->query("insert into globals values ('VMX_PRI', '1')"); 
     49        out("Created"); 
     50} else { 
     51        out("Already exists!"); 
     52} 
     53 
     54outn("Checking for Global var VMX_TIMEDEST_CONTEXT.."); 
     55$nrows = $db->getOne("SELECT count(*) from globals where variable='VMX_TIMEDEST_CONTEXT'"); 
     56if (!$nrows) { 
     57        $db->query("insert into globals values ('VMX_TIMEDEST_CONTEXT', '')"); 
     58        out("Created"); 
     59} else { 
     60        out("Already exists!"); 
     61} 
     62 
     63outn("Checking for Global var VMX_TIMEDEST_EXT.."); 
     64$nrows = $db->getOne("SELECT count(*) from globals where variable='VMX_TIMEDEST_EXT'"); 
     65if (!$nrows) { 
     66        $db->query("insert into globals values ('VMX_TIMEDEST_EXT', 'dovm')"); 
     67        out("Created"); 
     68} else { 
     69        out("Already exists!"); 
     70} 
     71 
     72outn("Checking for Global var VMX_TIMEDEST_PRI.."); 
     73$nrows = $db->getOne("SELECT count(*) from globals where variable='VMX_TIMEDEST_PRI'"); 
     74if (!$nrows) { 
     75        $db->query("insert into globals values ('VMX_TIMEDEST_PRI', '1')"); 
     76        out("Created"); 
     77} else { 
     78        out("Already exists!"); 
     79} 
     80 
     81outn("Checking for Global var VMX_LOOPDEST_CONTEXT.."); 
     82$nrows = $db->getOne("SELECT count(*) from globals where variable='VMX_LOOPDEST_CONTEXT'"); 
     83if (!$nrows) { 
     84        $db->query("insert into globals values ('VMX_LOOPDEST_CONTEXT', '')"); 
     85        out("Created"); 
     86} else { 
     87        out("Already exists!"); 
     88} 
     89 
     90outn("Checking for Global var VMX_LOOPDEST_EXT.."); 
     91$nrows = $db->getOne("SELECT count(*) from globals where variable='VMX_LOOPDEST_EXT'"); 
     92if (!$nrows) { 
     93        $db->query("insert into globals values ('VMX_LOOPDEST_EXT', 'dovm')"); 
     94        out("Created"); 
     95} else { 
     96        out("Already exists!"); 
     97} 
     98 
     99outn("Checking for Global var VMX_LOOPDEST_PRI.."); 
     100$nrows = $db->getOne("SELECT count(*) from globals where variable='VMX_LOOPDEST_PRI'"); 
     101if (!$nrows) { 
     102        $db->query("insert into globals values ('VMX_LOOPDEST_PRI', '1')"); 
     103        out("Created"); 
     104} else { 
     105        out("Already exists!"); 
     106} 
     107 
     108outn("Checking for Global var VMX_OPTS_TIMEOUT.."); 
     109$nrows = $db->getOne("SELECT count(*) from globals where variable='VMX_OPTS_TIMEOUT'"); 
     110if (!$nrows) { 
     111        $db->query("insert into globals values ('VMX_OPTS_TIMEOUT', '')"); 
     112        out("Created"); 
     113} else { 
     114        out("Already exists!"); 
     115} 
     116 
     117outn("Checking for Global var VMX_OPTS_LOOP.."); 
     118$nrows = $db->getOne("SELECT count(*) from globals where variable='VMX_OPTS_LOOP'"); 
     119if (!$nrows) { 
     120        $db->query("insert into globals values ('VMX_OPTS_LOOP', '')"); 
     121        out("Created"); 
     122} else { 
     123        out("Already exists!"); 
     124} 
     125 
     126outn("Checking for Global var VMX_OPTS_DOVM.."); 
     127$nrows = $db->getOne("SELECT count(*) from globals where variable='VMX_OPTS_DOVM'"); 
     128if (!$nrows) { 
     129        $db->query("insert into globals values ('VMX_OPTS_DOVM', '')"); 
     130        out("Created"); 
     131} else { 
     132        out("Already exists!"); 
     133} 
     134 
     135outn("Checking for Global var VMX_TIMEOUT.."); 
     136$nrows = $db->getOne("SELECT count(*) from globals where variable='VMX_TIMEOUT'"); 
     137if (!$nrows) { 
     138        $db->query("insert into globals values ('VMX_TIMEOUT', '2')"); 
     139        out("Created"); 
     140} else { 
     141        out("Already exists!"); 
     142} 
     143 
     144outn("Checking for Global var VMX_REPEAT.."); 
     145$nrows = $db->getOne("SELECT count(*) from globals where variable='VMX_REPEAT'"); 
     146if (!$nrows) { 
     147        $db->query("insert into globals values ('VMX_REPEAT', '1')"); 
     148        out("Created"); 
     149} else { 
     150        out("Already exists!"); 
     151} 
     152 
     153outn("Checking for Global var VMX_LOOPS.."); 
     154$nrows = $db->getOne("SELECT count(*) from globals where variable='VMX_LOOPS'"); 
     155if (!$nrows) { 
     156        $db->query("insert into globals values ('VMX_LOOPS', '1')"); 
     157        out("Created"); 
     158} else { 
     159        out("Already exists!"); 
     160} 
     161 
    35162?> 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads