Changeset 10337
- Timestamp:
- 10/04/10 13:59:13 (3 years ago)
- Files:
-
- contributed_modules/modules/bulkextensions/CHANGES (modified) (1 diff)
- contributed_modules/modules/bulkextensions/functions.inc.php (modified) (5 diffs)
- contributed_modules/modules/bulkextensions/i18n/sv_SE/LC_MESSAGES/table.csv (modified) (1 diff)
- contributed_modules/modules/bulkextensions/module.xml (modified) (2 diffs)
- contributed_modules/modules/bulkextensions/page.bulkextensions.php (modified) (6 diffs)
- contributed_modules/modules/bulkextensions/table.csv (modified) (1 diff)
- contributed_modules/modules/bulkextensions/template.csv (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
contributed_modules/modules/bulkextensions/CHANGES
r9345 r10337 7 7 Note: Translate only the text, not labels. All labels in position 1 must remain as they are. 8 8 Fixed bug when setting one entry in a field in the csv file all fields that where empty got an empty line in the config files 9 10 11 9 Added import for fax settings. Note: This will only works for FreePBX 2.7 and above contributed_modules/modules/bulkextensions/functions.inc.php
r10216 r10337 32 32 include_once("modules/findmefollow/functions.inc.php"); // for using findmefollow functions to retreive follow me settings 33 33 }; 34 if (file_exists("modules/fax/functions.inc.php")) { 35 include_once("modules/fax/functions.inc.php"); // for using fax functions to retreive fax settings 36 }; 34 37 35 38 /* Verify existence of voicemail, dictate, languages and findmefollow functions. */ … … 53 56 } else { 54 57 $findme_exists = FALSE; 58 } 59 if (function_exists("fax_get_user") && function_exists("fax_save_user") && function_exists("fax_delete_user")) { 60 $fax_exists = TRUE; 61 } else { 62 $fax_exists = FALSE; 55 63 } 56 64 … … 61 69 global $lang_exists; 62 70 global $findme_exists; 71 global $fax_exists; 63 72 $action = "edit"; 64 73 $fname = "bulkext__" . (string) time() . $_SERVER["SERVER_NAME"] . ".csv"; 65 $csv_header = "action,extension,name,cid_masquerade,sipname,outboundcid,ringtimer,callwaiting,call_screen,pinless,password,emergency_cid,tech,hardware,devinfo_channel,devinfo_secret,devinfo_notransfer,devinfo_dtmfmode,devinfo_canreinvite,devinfo_context,devinfo_immediate,devinfo_signalling,devinfo_echocancel,devinfo_echocancelwhenbrdiged,devinfo_echotraining,devinfo_busydetect,devinfo_busycount,devinfo_callprogress,devinfo_host,devinfo_type,devinfo_nat,devinfo_port,devinfo_qualify,devinfo_callgroup,devinfo_pickupgroup,devinfo_disallow,devinfo_allow,devinfo_dial,devinfo_accountcode,devinfo_mailbox,devinfo_deny,devinfo_permit,devicetype,deviceid,deviceuser,description,dictenabled,dictformat,dictemail,langcode,record_in,record_out,vm,vmpwd,email,pager,attach,saycid,envelope,delete,options,vmcontext,vmx_state,vmx_unavail_enabled,vmx_busy_enabled,vmx_play_instructions,vmx_option_0_sytem_default,vmx_option_0_number,vmx_option_1_system_default,vmx_option_1_number,vmx_option_2_number,account,ddial,pre_ring,strategy,grptime,grplist,annmsg_id,ringing,grppre,dring,needsconf,remotealert_id,toolate_id,postdest \n";74 $csv_header = "action,extension,name,cid_masquerade,sipname,outboundcid,ringtimer,callwaiting,call_screen,pinless,password,emergency_cid,tech,hardware,devinfo_channel,devinfo_secret,devinfo_notransfer,devinfo_dtmfmode,devinfo_canreinvite,devinfo_context,devinfo_immediate,devinfo_signalling,devinfo_echocancel,devinfo_echocancelwhenbrdiged,devinfo_echotraining,devinfo_busydetect,devinfo_busycount,devinfo_callprogress,devinfo_host,devinfo_type,devinfo_nat,devinfo_port,devinfo_qualify,devinfo_callgroup,devinfo_pickupgroup,devinfo_disallow,devinfo_allow,devinfo_dial,devinfo_accountcode,devinfo_mailbox,devinfo_deny,devinfo_permit,devicetype,deviceid,deviceuser,description,dictenabled,dictformat,dictemail,langcode,record_in,record_out,vm,vmpwd,email,pager,attach,saycid,envelope,delete,options,vmcontext,vmx_state,vmx_unavail_enabled,vmx_busy_enabled,vmx_play_instructions,vmx_option_0_sytem_default,vmx_option_0_number,vmx_option_1_system_default,vmx_option_1_number,vmx_option_2_number,account,ddial,pre_ring,strategy,grptime,grplist,annmsg_id,ringing,grppre,dring,needsconf,remotealert_id,toolate_id,postdest,faxenabled,faxemail\n"; 66 75 $data = $csv_header; 67 76 $exts = get_all_exts(); … … 161 170 $ddial = isset($followme_settings["ddial"])?$followme_settings["ddial"]:""; 162 171 } 172 173 /* Obtain fax settings */ 174 if ($fax_exists) { 175 $fax_settings = fax_get_user($e); 176 } 177 if (isset($fax_settings)) { 178 $faxenabled = isset($fax_settings["faxenabled"])?$fax_settings["faxenabled"]:""; 179 $faxemail = isset($fax_settings["faxemail"])?$fax_settings["faxemail"]:""; 180 } 181 163 182 $csv_line[0] = $action; 164 183 $csv_line[1] = isset($u_info["extension"])?$u_info["extension"]:""; … … 250 269 $csv_line[83] = isset($toolate_id)?$toolate_id:""; 251 270 $csv_line[84] = isset($postdest)?$postdest:""; 271 $csv_line[85] = isset($faxenabled)?$faxenabled:""; 272 $csv_line[86] = isset($faxemail)?$faxemail:""; 273 252 274 for ($i = 0; $i < count($csv_line); $i++) { 253 275 /* If the string contains a comma, enclose it in double-quotes. */ contributed_modules/modules/bulkextensions/i18n/sv_SE/LC_MESSAGES/table.csv
r10216 r10337 86 86 "toolate_id","blankt eller 0 (Standard)","någon inspelnings-id aktivt på systemet","För-sent meddelande: (Sidan Följ-mig)","Meddelande att spela upp för den UPPRINGDE, om samtalet redan har besvarats av annan part, innan denna uppringda har tryckt 1.<br><br>För att lÀgga till inspelningar vÀljer du "Systeminspelningar"i menyn till vÀnster" 87 87 "postdest",,"Text i formatet <b>context,exten,priority</b> som Àr en aktiv destination i nummerplanen på systemet","Destination vid inget svar: (Sidan Följ-mig)", 88 "faxenabled",,"true eller tomt","Aktiverad","Aktiveras fax om instÀllningen sÀtts till <b>true</b>. Om detta fÀlt Àr tomt readeras faxinstÀllningen" 89 "faxemail",,"Giltig e-postadress","E-post för fax","E-postadress dit mottagna fax skickas" contributed_modules/modules/bulkextensions/module.xml
r10217 r10337 3 3 <name>Bulk Extensions</name> 4 4 <description>Bulk Extensions uses CSV files to import and export extensions.</description> 5 <version>2. 5.0.7</version>5 <version>2.7.0.0</version> 6 6 <type>tool</type> 7 7 <category>Third Party Addon</category> … … 10 10 </menuitems> 11 11 <depends> 12 <version>ge2. 5</version>12 <version>ge2.7</version> 13 13 </depends> 14 <location>contributed_modules/release/bulkextensions-2. 5.0.7.tgz</location>14 <location>contributed_modules/release/bulkextensions-2.7.0.0.tgz</location> 15 15 <info></info> 16 16 <changelog> 17 *2.7.0.0* #4567 Add fax setting 17 18 *2.6.0.7* #4495 18 19 *2.5.0.6* #4150 contributed_modules/modules/bulkextensions/page.bulkextensions.php
r10216 r10337 155 155 "remotealert_id" => array(false, -1), 156 156 "toolate_id" => array(false, -1), 157 "postdest" => array(false, -1) 157 "postdest" => array(false, -1), 158 "faxenabled" => array(false, -1), 159 "faxemail" => array(false, -1) 158 160 ); 159 161 … … 621 623 $vars["postdest"] = trim($aInfo[$aFields["postdest"][1]]); 622 624 } 623 625 if ($aFields["faxenabled"][0]) { 626 if (!isset($aInfo[$aFields["faxenabled"][1]]) || ($aInfo[$aFields["faxenabled"][1]] == "")){ 627 unset($vars["faxenabled"]); 628 } else { 629 $vars["faxenabled"] = trim($aInfo[$aFields["faxenabled"][1]]); 630 } 631 } 632 if ($aFields["faxemail"][0]) { 633 if (!isset($aInfo[$aFields["faxemail"][1]]) || ($aInfo[$aFields["faxemail"][1]] == "")){ 634 unset($vars["faxemail"]); 635 } else { 636 $vars["faxemail"] = trim($aInfo[$aFields["faxemail"][1]]); 637 } 638 } 624 639 625 640 /* Needed fields for creating a Follow Me are account (aka grpnum), strategy, grptime, */ … … 643 658 } 644 659 660 661 645 662 if (!(isset($amp_conf["AMPEXTENSIONS"]) && ($amp_conf["AMPEXTENSIONS"] == "deviceanduser"))) { 646 663 $vars["devicetype"] = "fixed"; … … 695 712 findmefollow_add($vars["account"], $vars["strategy"], $vars["grptime"], $vars["grplist"], $vars["postdest"], $vars["grppre"], $vars["annmsg_id"], $vars["dring"], $vars["needsconf"], $vars["remotealert_id"], $vars["toolate_id"], $vars["ringing"], $vars["pre_ring"], $vars["ddial"]); 696 713 } 714 if ($fax_exists) { 715 fax_save_user($vars["extension"], $vars["faxenabled"], $vars["faxemail"]); 716 } 717 697 718 // begin status output for this row 698 719 $output .= "Row $k: Added: " . $vars["extension"]; … … 836 857 $change = true; 837 858 } 859 if ($fax_exists) { 860 // If there is no entry in faxenabled, then delete the user in the fax table 861 if (!isset($aInfo[$aFields["faxenabled"][1]]) || ($aInfo[$aFields["faxenabled"][1]] == "")){ 862 fax_delete_user($vars["extension"]); 863 } else { 864 fax_save_user($vars["extension"], $vars["faxenabled"], $vars["faxemail"]); 865 } 866 } 867 838 868 $output .= "Row $k: Edited: " . $vars["extension"] . "<BR>"; 839 869 break; … … 874 904 voicemail_mailbox_del($vars["extension"]); 875 905 } 906 // Fax settings 907 if ($fax_exists) { 908 fax_delete_user($vars["extension"]); 909 } 876 910 $output .= "Row $k: Deleted: " . $vars["extension"] . "<BR>"; 877 911 break; contributed_modules/modules/bulkextensions/table.csv
r10216 r10337 76 76 "grptime","20","0-60","Ring Time (max 60 sec) (Follow Me page)","Time in seconds that the phones will ring. For all hunt style ring strategies, this is the time for each iteration of phone(s) that are rung" 77 77 "grplist","User's own extension",List of extensions (hyphen separated),"Follow-Me List: (Follow Me page)","extension-extension-extension-... (extension is numeric; multiple extensions separated by '-')<br><br>You can include an extension on a remote system, or an external number by suffixing a number with a pound (#). ex: 2448089# would dial 2448089 on the appropriate trunk (see Outbound Routing)." 78 "annmsg_id","blank or 0 (means None)","any recording id active on system","Announcement: (Follow Me page)","Message to be played to the caller before dialing this group.<br><br>To add additional recordings please use the "System Recordings"MENU to the left"78 "annmsg_id","blank or 0 (means None)","any recording id active on system","Announcement: (Follow Me page)","Message to be played to the caller before dialing this group.<br><br>To add additional recordings please use the 'System Recordings' MENU to the left" 79 79 "ringing","Ring","Ring, default, none, or any active Music On Hold class on the system","Play Music On Hold? (Follow Me page)","If you select a Music on Hold class to play, instead of 'Ring', they will hear that instead of Ringing while they are waiting for someone to pick up." 80 80 "grppre",,,"CID Name Prefix: (Follow Me page)","You can optionally prefix the Caller ID name when ringing extensions in this group. ie: If you prefix with 'Sales:', a call from John Doe would display as 'Sales:John Doe' on the extensions that ring." 81 81 "dring",,"Valid alert info text recognized by SIP phone","Alert Info: (Follow Me page)","You can optionally include an Alert Info which can create distinctive rings on SIP phones." 82 82 "needsconf",,"CHECKED or (blank)","Confirm Calls: (Follow Me page)","Enable this if you're calling external numbers that need confirmation - eg, a mobile phone may go to voicemail which will pick up the call. Enabling this requires the remote side push 1 on their phone before the call is put through. This feature only works with the ringall/ringall-prim ring strategy" 83 "remotealert_id","blank or 0 (means Default)","any recording id active on the system","Remote Announce: (Follow Me page)","Message to be played to the person RECEIVING the call, if 'Confirm Calls' is enabled.<br><br>To add additional recordings use the "System Recordings"MENU to the left"84 "toolate_id","blank or 0 (means Default)","any recording id active on the system","Too-Late Announce: (Follow Me page)","Message to be played to the person RECEIVING the call, if the call has already been accepted before they push 1.<br><br>To add additional recordings use the "System Recordings"MENU to the left"83 "remotealert_id","blank or 0 (means Default)","any recording id active on the system","Remote Announce: (Follow Me page)","Message to be played to the person RECEIVING the call, if 'Confirm Calls' is enabled.<br><br>To add additional recordings use the 'System Recordings' MENU to the left" 84 "toolate_id","blank or 0 (means Default)","any recording id active on the system","Too-Late Announce: (Follow Me page)","Message to be played to the person RECEIVING the call, if the call has already been accepted before they push 1.<br><br>To add additional recordings use the 'System Recordings' MENU to the left" 85 85 "postdest",,"Text in the format <b>context,exten,priority</b> that is an active dialplan destination on the system","Destination if no answer: (Follow Me page)", 86 "faxenabled",,"true or blank","Enabled","Enables fax if setting is set to <b>true</b>. If left blank fax settings are removed" 87 "faxemail",,"Valid email address","Fax Email","Email address where fax should be emailed to" contributed_modules/modules/bulkextensions/template.csv
r10216 r10337 1 1 action,extension,name,cid_masquerade,sipname,outboundcid,ringtimer,callwaiting,call_screen,pinless,emergency_cid,tech,hardware,devinfo_channel,devinfo_secret,devinfo_notransfer,devinfo_dtmfmode,devinfo_canreinvite,devinfo_context,devinfo_immediate,devinfo_signalling,devinfo_echocancel,devinfo_echocancelwhenbrdiged,devinfo_echotraining,devinfo_busydetect,devinfo_busycount,devinfo_callprogress,devinfo_host,devinfo_type,devinfo_nat,devinfo_port,devinfo_qualify,devinfo_callgroup,devinfo_pickupgroup,devinfo_disallow,devinfo_allow,devinfo_dial,devinfo_accountcode,devinfo_mailbox,devinfo_deny,devinfo_permit,devicetype,deviceid,deviceuser,description,dictenabled,dictformat,dictemail,langcode,record_in,record_out,vm,vmpwd,email,pager,attach,saycid,envelope,delete,options,vmcontext,vmx_state,vmx_unavail_enabled,vmx_busy_enabled,vmx_play_instructions,vmx_option_0_sytem_default,vmx_option_0_number,vmx_option_1_system_default,vmx_option_1_number,vmx_option_2_number,account,ddial,pre_ring,strategy,grptime,grplist,annmsg_id,ringing,grppre,dring,needsconf,remotealert_id,toolate_id,postdest 2 2 3 edit,999999,John Doe,999999,,,0,enabled,0,,,sip,,,1234,,rfc2833,no,from-internal,,,,,,,,,dynamic,friend,yes,5060,yes,,,,,SIP/999999,,999999@device,,,fixed,,999999,John Doe,disabled,ogg,,,Adhoc,Adhoc,enabled,1234,j.doe@foo.bar,j.doe.pager@foo.bar,attach=no,saycid=no,envelope=no,delete=no,,default,,,,,checked,,,,,999999,CHECKED,0,ringallv2,20,999999-552244,2,Ring,TEST,,CHECKED,0,0,"ext-local,vmu552244,1 "4 edit,123456,Jane Doe,1234,"sipalias,man",SUPPORT <1234>,8,enabled,memory,,411,iax2,,,1234,yes,,,from-internal,,,,,,,,,dynamic,friend,,4569,yes,,,,,IAX2/123456,,123456@device,0.0.0.0/0.0.0.0,192.168.0.123,fixed,,123456,Jane Doe,disabled,ogg,,en,Adhoc,Adhoc,enabled,1234,j.doe@foo.bar,j.doe.pager@foo.bar,attach=yes,saycid=no,envelope=yes,delete=yes,review=yes,default,checked,checked,checked,checked,checked,,,27328,27329,,,,,,,,,,,,,, 5 edit,654321,Jorge Doe,654321,,,0,enabled,0,,,zap,,5001,,,,,from-internal,no,fxo_ks,yes,,800,no,7,no,,,,,,,,,,ZAP/5001,,654321@device,,,fixed,,654321,Jorge Doe,disabled,ogg,,,Adhoc,Adhoc,enabled,1234,,,attach=no,saycid=no,envelope=no,delete=no,,default,checked,,,,,70904,,,,654321,CHECKED,13,hunt,25,654321-27346-123456-999999,2,default,,,CHECKED,2,2,"app-blackhole,zapateller,1 "3 edit,999999,John Doe,999999,,,0,enabled,0,,,sip,,,1234,,rfc2833,no,from-internal,,,,,,,,,dynamic,friend,yes,5060,yes,,,,,SIP/999999,,999999@device,,,fixed,,999999,John Doe,disabled,ogg,,,Adhoc,Adhoc,enabled,1234,j.doe@foo.bar,j.doe.pager@foo.bar,attach=no,saycid=no,envelope=no,delete=no,,default,,,,,checked,,,,,999999,CHECKED,0,ringallv2,20,999999-552244,2,Ring,TEST,,CHECKED,0,0,"ext-local,vmu552244,1,," 4 edit,123456,Jane Doe,1234,"sipalias,man",SUPPORT <1234>,8,enabled,memory,,411,iax2,,,1234,yes,,,from-internal,,,,,,,,,dynamic,friend,,4569,yes,,,,,IAX2/123456,,123456@device,0.0.0.0/0.0.0.0,192.168.0.123,fixed,,123456,Jane Doe,disabled,ogg,,en,Adhoc,Adhoc,enabled,1234,j.doe@foo.bar,j.doe.pager@foo.bar,attach=yes,saycid=no,envelope=yes,delete=yes,review=yes,default,checked,checked,checked,checked,checked,,,27328,27329,,,,,,,,,,,,,,,, 5 edit,654321,Jorge Doe,654321,,,0,enabled,0,,,zap,,5001,,,,,from-internal,no,fxo_ks,yes,,800,no,7,no,,,,,,,,,,ZAP/5001,,654321@device,,,fixed,,654321,Jorge Doe,disabled,ogg,,,Adhoc,Adhoc,enabled,1234,,,attach=no,saycid=no,envelope=no,delete=no,,default,checked,,,,,70904,,,,654321,CHECKED,13,hunt,25,654321-27346-123456-999999,2,default,,,CHECKED,2,2,"app-blackhole,zapateller,1,," 6 6 7 7 8 add,999999,John Doe,999999,,,0,enabled,0,,,sip,,,1234,,rfc2833,no,from-internal,,,,,,,,,dynamic,friend,yes,5060,yes,,,,,SIP/999999,,999999@device,0.0.0.0/0.0.0.0,0.0.0.0/0.0.0.0,fixed,,999999,John Doe,disabled,ogg,,,Adhoc,Adhoc,enabled,1234,j.doe@foo.bar,j.doe.pager@foo.bar,attach=no,saycid=no,envelope=no,delete=no,,default,,,,,checked,,,,,999999,CHECKED,0,ringallv2,20,999999-552244,2,Ring,TEST,,CHECKED,0,0,"ext-local,vmu552244,1 "9 add,123456,Jane Doe,1234,"sipalias,man",SUPPORT <1234>,8,enabled,memory,,411,iax2,,,1234,yes,,,from-internal,,,,,,,,,dynamic,friend,,4569,yes,,,,,IAX2/123456,,123456@device,,,fixed,,123456,Jane Doe,disabled,ogg,,en,Adhoc,Adhoc,enabled,1234,j.doe@foo.bar,j.doe.pager@foo.bar,attach=yes,saycid=no,envelope=yes,delete=yes,review=yes,default,checked,checked,checked,checked,checked,,,27328,27329,,,,,,,,,,,,,, 10 add,654321,Jorge Doe,654321,,,0,enabled,0,,,zap,,5001,,,,,from-internal,no,fxo_ks,yes,,800,no,7,no,,,,,,,,,,ZAP/5001,,654321@device,,,fixed,,654321,Jorge Doe,disabled,ogg,,,Adhoc,Adhoc,enabled,1234,,,attach=no,saycid=no,envelope=no,delete=no,,default,checked,,,,,70904,,,,654321,CHECKED,13,hunt,25,654321-27346-123456-999999,2,default,,,CHECKED,2,2,"app-blackhole,zapateller,1 "8 add,999999,John Doe,999999,,,0,enabled,0,,,sip,,,1234,,rfc2833,no,from-internal,,,,,,,,,dynamic,friend,yes,5060,yes,,,,,SIP/999999,,999999@device,0.0.0.0/0.0.0.0,0.0.0.0/0.0.0.0,fixed,,999999,John Doe,disabled,ogg,,,Adhoc,Adhoc,enabled,1234,j.doe@foo.bar,j.doe.pager@foo.bar,attach=no,saycid=no,envelope=no,delete=no,,default,,,,,checked,,,,,999999,CHECKED,0,ringallv2,20,999999-552244,2,Ring,TEST,,CHECKED,0,0,"ext-local,vmu552244,1,," 9 add,123456,Jane Doe,1234,"sipalias,man",SUPPORT <1234>,8,enabled,memory,,411,iax2,,,1234,yes,,,from-internal,,,,,,,,,dynamic,friend,,4569,yes,,,,,IAX2/123456,,123456@device,,,fixed,,123456,Jane Doe,disabled,ogg,,en,Adhoc,Adhoc,enabled,1234,j.doe@foo.bar,j.doe.pager@foo.bar,attach=yes,saycid=no,envelope=yes,delete=yes,review=yes,default,checked,checked,checked,checked,checked,,,27328,27329,,,,,,,,,,,,,,,, 10 add,654321,Jorge Doe,654321,,,0,enabled,0,,,zap,,5001,,,,,from-internal,no,fxo_ks,yes,,800,no,7,no,,,,,,,,,,ZAP/5001,,654321@device,,,fixed,,654321,Jorge Doe,disabled,ogg,,,Adhoc,Adhoc,enabled,1234,,,attach=no,saycid=no,envelope=no,delete=no,,default,checked,,,,,70904,,,,654321,CHECKED,13,hunt,25,654321-27346-123456-999999,2,default,,,CHECKED,2,2,"app-blackhole,zapateller,1,," 11 11 12 12
