version_upgrade.rst 32 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097
  1. #################
  2. Version Upgrade
  3. #################
  4. Version Upgrade can take several steps to perform. Below will show how to upgrade from specific versions.
  5. Version 5.2 to 5.3
  6. ^^^^^^^^^^^^^^^^^^
  7. **Upgrade from 5.2 to 5.3**
  8. These instructions for upgrade are also relevant to versions of FusionPBX 5.2.0 and higher.
  9. ### Run (Install) Upgrades
  10. ::
  11. cd /var/www/fusionpbx
  12. git stash
  13. git pull
  14. git checkout 5.3
  15. git branch
  16. php /var/www/fusionpbx/core/upgrade/upgrade.php
  17. **Upgrade Schema -> Data Types**
  18. Make sure to login and then go to Advanced -> Upgrade -> Schema -> Data Types
  19. **Restart Services**
  20. ::
  21. systemctl restart email_queue
  22. systemctl restart fax_queue
  23. systemctl restart event_guard
  24. **Dashboard**
  25. Update the dashboard so that it looks like a new default install.
  26. - Login to the web interface
  27. - From the dashboard press the **SETTINGS** button.
  28. - If you changed the groups assigned in the Dashboard.
  29. - Then print the page and save it to a PDF for reference later.
  30. - Select the first checkbox this will select all the ones below it.
  31. - Then press the **DELETE** button
  32. - Then go to the Menu and press Advanced then click on Upgrade.
  33. - Put a checkmark in **App Defaults** then press the **Execute**
  34. - In your browser press **ctrl + f5** to flush the browser cache.
  35. - If you need to customize the permission use the SETTINGS button and update permissions.
  36. - If you saved a PDF of previous changes use it to help assign the groups to the Dashboard Widgets.
  37. **background_color_enabled**
  38. This is a new setting to enable or disable the background color. If you have a custom background image, then you may want to set this **value** to **false** and enabled to set it to true.
  39. **Install Transcribe and Speech (Optional)**
  40. ::
  41. cd /var/www/fusionpbx/app
  42. git clone https://github.com/fusionpbx/fusionpbx-app-transcribe.git transcribe
  43. git clone https://github.com/fusionpbx/fusionpbx-app-speech.git speech
  44. chown -R www-data:www-data /var/www/fusionpbx
  45. php /var/www/fusionpbx/core/upgrade/upgrade.php
  46. Transcribe details need to be moved from the default settings category voicemail to transcribe.
  47. - openai - easy to setup enable setting and set the api_key
  48. - watson - requires api_url in the transcribe category
  49. - google - requires api_url
  50. - azure - language en-US api_url used for the region
  51. Speech is defined in the default settings category speech this feature is used for Text-to-Speech
  52. - Make sure to set enable the settings
  53. - openai
  54. - elevenlabs
  55. Version 5.1 to 5.2
  56. ^^^^^^^^^^^^^^^^^^
  57. **Upgrade from 5.1 to 5.2**
  58. These instructions for upgrade are also relevant to versions of FusionPBX 5.1.0 and higher.
  59. **Release Note**
  60. - When this upgrade.php is run from the root, it will write the /etc/fusionpbx/config.conf file by reading information from the database and config.php and config.lua.
  61. ### Run (Install) Upgrades
  62. ::
  63. cd /var/www/fusionpbx
  64. git stash
  65. git pull
  66. git checkout 5.2
  67. git branch
  68. php /var/www/fusionpbx/core/upgrade/upgrade.php
  69. **Upgrade Schema -> Data Types**
  70. Make sure to login and then go to Advanced -> Upgrade -> Schema -> Data Types
  71. **Restart Services**
  72. ::
  73. systemctl restart email_queue
  74. systemctl restart fax_queue
  75. systemctl restart event_guard
  76. Note: If the fax_queue is not installed it will show an error. This is only a problem if you are using fax. If you are using fax then you will want to install the fax_queue service.
  77. ::
  78. cp /var/www/fusionpbx/app/fax_queue/resources/service/debian.service /etc/systemd/system/fax_queue.service
  79. systemctl enable fax_queue
  80. systemctl start fax_queue
  81. systemctl daemon-reload
  82. **XML CDR Import**
  83. Open the file
  84. ::
  85. nano /etc/freeswitch/autoload_configs/xml_cdr.conf.xml
  86. Comment out the url parameter.
  87. ::
  88. <!-- the url to post to if blank web posting is disabled -->
  89. <!--<param name="url" value="http://127.0.0.1/app/xml_cdr/xml_cdr_import.php"/>-->
  90. fs_cli -x 'reloadxml'
  91. fs_cli -x 'reload mod_xml_cdr'
  92. **Install the xml_cdr Service**
  93. ::
  94. - This service is optional. However it helps add the CDR records faster than the cron job that is [documented here](https://www.fusionpbx.com/app/pages/page.php?id=2291d3c8-c714-49a6-bfd9-3365885ae526)
  95. - Install the service
  96. **Debian or Ubuntu**
  97. ::
  98. cp /var/www/fusionpbx/app/xml_cdr/resources/service/debian.service /etc/systemd/system/xml_cdr.service
  99. systemctl enable xml_cdr
  100. systemctl start xml_cdr
  101. systemctl daemon-reload
  102. **CentOS**
  103. ::
  104. cp /var/www/fusionpbx/app/xml_cdr/resources/service/debian.service /usr/lib/systemd/system/xml_cdr.service
  105. systemctl daemon-reload
  106. systemctl enable xml_cdr
  107. systemctl start xml_cdr
  108. **Menu Manager**
  109. **Restore Default**
  110. - If the menu has not been customized then to update run the RESTORE DEFAULT button.
  111. **Manual Update**
  112. To manually update the menu. Edit the default menu.
  113. Remove the **Email Logs** Menu. No longer used.
  114. Add the **Destination Summary** Menu
  115. Title: Destination Summary
  116. Link: /app/destinations/destination_summary.php
  117. Parent Menu: Status
  118. Groups: admin, superadmin
  119. Version 5.0 to 5.1
  120. ^^^^^^^^^^^^^^^^^^
  121. These instructions for upgrade are also relevant to versions of FusionPBX 5.0.3 to 5.0.10 and higher.
  122. **Release Note**
  123. - When this upgrade.php is run from the root, it will write the /etc/fusionpbx/config.conf file by reading information from the database and config.php and config.lua.
  124. **Run (Install) Upgrades**
  125. ::
  126. cd /var/www/fusionpbx
  127. git stash
  128. git pull
  129. git checkout 5.1
  130. git branch
  131. php /var/www/fusionpbx/core/upgrade/upgrade.php
  132. Make sure to also update group permission from Advanced -> Group Manager -> RESTORE DEFAULT button
  133. **Upgrade Schema -> Data Types**
  134. Make sure to login and then go to Advanced -> Upgrade -> Schema -> Data Types
  135. **Flush Templates**
  136. PHP Smarty version 4.3.1 was updated. This requires clearing files in the temp directory.
  137. rm -R -f /tmp/*.php
  138. **New Global Dialplans**
  139. ::
  140. The following dialplans are need to be deleted for all domains. As these are now global dialplans.
  141. call-direction
  142. is_local
  143. agent_status
  144. agent_status_id
  145. agent-status-break
  146. call_privacy
  147. send_to_voicemail
  148. vmain
  149. xfer_vm
  150. vmain_user
  151. delay_echo
  152. echo
  153. is_zrtp_secure
  154. milliwatt
  155. is_secure
  156. tone_stream
  157. hold_music
  158. do-not-disturb
  159. call-forward
  160. follow-me
  161. freeswitch_conference
  162. clear_sip_auto_answer
  163. call_return
  164. dx
  165. att_xfer
  166. directory
  167. redial
  168. call_return
  169. dx
  170. att_xfer
  171. is_transfer
  172. cf
  173. please_hold
  174. talking_clock_date
  175. ::
  176. Then run this command to get the new default global dialplans
  177. ::
  178. cd /var/www/fusionpbx
  179. php /var/www/fusionpbx/core/upgrade/upgrade.php
  180. **Restart Services**
  181. ::
  182. systemctl restart email_queue
  183. systemctl restart fax_queue
  184. systemctl restart event_guard
  185. **Install the Event Guard Service**
  186. ::
  187. - Upgrade to the latest FusionPBX 5.0.2 or higher.
  188. - Install the service
  189. **Debian or Ubuntu**
  190. cp /var/www/fusionpbx/app/event_guard/resources/service/debian.service /etc/systemd/system/event_guard.service
  191. systemctl enable event_guard
  192. systemctl start event_guard
  193. systemctl daemon-reload
  194. **CentOS**
  195. cp /var/www/fusionpbx/app/event_guard/resources/service/debian.service /usr/lib/systemd/system/event_guard.service
  196. systemctl daemon-reload
  197. systemctl enable event_guard
  198. systemctl start event_guard
  199. **Remove Old Config Files**
  200. ::
  201. **Debian / Ubuntu / CentOS**
  202. The config.conf and config.php files are deprecated. These files were combined into the config.conf file.
  203. ::
  204. rm -f /etc/fusionpbx/config.php
  205. rm -f /etc/fusionpbx/config.lua
  206. **Config File Ownership**
  207. ::
  208. The ***/etc/fusionpbx/config.conf*** file should be owned by the root user like other files in the /etc directory.
  209. **Debian / Ubuntu / CentOS**
  210. chown -R root:root /etc/fusionpbx
  211. **FreeBSD**
  212. chown -R root:root /usr/local/etc/fusionpbx
  213. **Destination Number**
  214. For many years the inbound phone number (DID/DDI) would show up in the dialplan as ***destination_number*** variable for most VoIP providers. For some VoIP providers, the number would be found in ***sip_to_user***, and in some cases, ***sip_req_user*** is needed. Recently Diversion header has become more widely used, and sip ***sip_to_user*** and, in some cases, ***sip_req_user*** may be required. For example, a call forwarded from a mobile phone to one of your numbers in FusionPBX. The destination variable in the dialplan category can change which variable is used.
  215. ::
  216. Category: dialplan
  217. Subcategory: destination
  218. Type: text
  219. Value: destination_number
  220. Description: Options: destination_number (default), ${sip_to_user}, ${sip_req_user}
  221. **Update Fail2ban, if Used**
  222. cd /usr/src/fusionpbx-install.sh/debian/resources
  223. git stash
  224. git pull
  225. ./fail2ban.sh
  226. **Error Reporting in config.conf**
  227. The error reporting in the bottom of the config.conf was changed to look like this. If this is different then it should be updated to what is shown below.
  228. Use this command to look at the bottom of the config.conf file.
  229. ::
  230. cat /etc/fusionpbx/config.conf | grep error
  231. Old version
  232. ::
  233. #error reporting hide show all errors except notices and warnings
  234. error.reporting = 'E_ALL ^ E_NOTICE ^ E_WARNING'
  235. New version
  236. #error reporting options: user,dev,all
  237. error.reporting = user
  238. If its different then use nano, vi, vim or some other editor to update the error reporting.
  239. nano /etc/fusionpbx/config.conf
  240. Confirm that the values have been updated using this command.
  241. ::
  242. cat /etc/fusionpbx/config.conf | grep error
  243. **Clear the cache**
  244. ::
  245. rm -f /var/cache/fusionpbx/*
  246. 4.4 to 5.0
  247. ^^^^^^^^^^^^^^^^^^
  248. 1. Switch branches
  249. ::
  250. mv /var/www/fusionpbx /var/www/fusionpbx-4.4
  251. cd /var/www && git clone https://github.com/fusionpbx/fusionpbx.git
  252. chown -R www-data:www-data /var/www/fusionpbx
  253. 2. Try Advanced -> Upgrade Schema if that fails use the the command line.
  254. ::
  255. cd /var/www/fusionpbx
  256. php /var/www/fusionpbx/core/upgrade/upgrade.php
  257. 3. Refresh the browser if there are issues then logout and then back in.
  258. 4. Update the following Dialplans.
  259. If you have made any changes to these make notes on the changes before you delete them. So that the changes could be added back. For example valet park could have custom music on hold or a custom timeout for the valet park.
  260. ::
  261. user_exists
  262. call-direction
  263. is_loopback
  264. is_local
  265. user_record
  266. agent_status
  267. group_intercept
  268. extension-to-voicemail
  269. vmain
  270. vmain_user
  271. tone_stream
  272. recordings
  273. valet_park
  274. speed_dial
  275. call-forward-all
  276. call_screen
  277. call_forward_not_registered
  278. local_extension
  279. voicemail
  280. - Update these Dialplans by first selecting and deleting their entries from within the Dialplan Manager for all domains. Then, run Advanced -> Upgrade -> App Defaults to retrieve the new versions of the diaplans.
  281. 5. If you have customized any provisioning templates makes sure to copy them from /var/www/fusionpbx-4.4/resources/templates/provision and copy them into the right vendor directory in /var/www/fusionpbx/resources/templates/provision. I you haven't customized the provisioning templates you can skip this step.
  282. 6. Update the language phrases. If you have added custom phrases be careful here not the case for most people.
  283. ::
  284. rm -R -f /etc/freeswitch/lang
  285. rm -R -f /etc/freeswitch/languages
  286. cp -R /var/www/fusionpbx/resources/templates/conf/languages /etc/freeswitch
  287. chown -R www-data:www-data /etc/freeswitch
  288. fs_cli -x "reloadxml"
  289. 7. New Follow Me does not use the extension dial string. Use the following SQL command to remove the extension dial string.
  290. ::
  291. update v_follow_me set dial_string = null;
  292. update v_extensions set dial_string = null, follow_me_destinations = null where dial_string <> 'error/user_busy';
  293. update v_extensions set follow_me_enabled = 'true' where follow_me_uuid in (select follow_me_uuid from v_follow_me where follow_me_enabled = 'true');
  294. \q
  295. exit
  296. 8. Rename the variables dialplan to domain-variables
  297. ::
  298. su postgres
  299. psql fusionpbx
  300. update v_dialplans set dialplan_name = 'domain-variables' where dialplan_name = 'variables';
  301. \q
  302. exit
  303. 9. Duplication in Default Settings
  304. Go to Advanced -> Default Settings after running App Defaults to check for any duplicates. If you see duplicates that are not type of array this may have been caused from older versions of FusionPBX before we started using a Preset ID for each Default Settings. If you hover over the setting it says then says Default this is the default setting with the correct ID. If it says custom this is a unique UUID. Make sure to delete only duplicates that say custom otherwise when you run App Defaults again it will put the default setting back with the correct preset UUID>
  305. 10. FAX Queue install
  306. * https://docs.fusionpbx.com/en/latest/status/fax_queue.html
  307. - Install as a service
  308. ::
  309. cp /var/www/fusionpbx/app/fax_queue/resources/service/debian.service /etc/systemd/system/fax_queue.service
  310. systemctl enable fax_queue
  311. systemctl start fax_queue
  312. systemctl daemon-reload
  313. - or run as a cron job
  314. ::
  315. crontab -e
  316. * * * * * cd /var/www/fusionpbx && php /var/www/fusionpbx/app/fax_queue/resources/job/fax_queue.php
  317. 11. Email Queue install
  318. * https://docs.fusionpbx.com/en/latest/status/email_queue.html
  319. - Install as a service
  320. ::
  321. cp /var/www/fusionpbx/app/email_queue/resources/service/debian.service /etc/systemd/system/email_queue.service
  322. systemctl enable email_queue
  323. systemctl start email_queue
  324. systemctl daemon-reload
  325. - or run as a cron job
  326. ::
  327. crontab -e
  328. * * * * * cd /var/www/fusionpbx && /usr/bin/php /var/www/fusionpbx/app/email_queue/resources/service/email_queue.php
  329. Version 4.2 to 4.4
  330. ^^^^^^^^^^^^^^^^^^
  331. 1. Switch branches
  332. ::
  333. mv /var/www/fusionpbx /var/www/fusionpbx-4.2
  334. cd /var/www && git clone -b 4.4 https://github.com/fusionpbx/fusionpbx.git
  335. chown -R www-data:www-data /var/www/fusionpbx
  336. .. note::
  337. Depending on when you installed the path /etc/fusionpbx might need created. A good way to tell is once you move the fusionpbx folder in step one and the FusionPBX is on a page with flags.
  338. ::
  339. **Only** do this step if the folder **doesn't** already exist.
  340. mkdir -p /etc/fusionpbx
  341. mv /var/www/fusionpbx-4.2/resources/config.php /etc/fusionpbx
  342. chown -R www-data:www-data /etc/fusionpbx/
  343. - Then go to Advanced -> Upgrade and update the Source Code, Schema, Menu Defaults and Permission Defaults.
  344. .. note::
  345. config.lua needs to be read and write by the webserver in order for advanced > default settings to update config.lua with new path information. Make sure config.lua and config.php are in /etc/fuionpbx/ . Don't miss this step chown -R www-data:www-data /etc/fusionpbx/
  346. 2. Update the following Dialplans.
  347. ::
  348. user_exists
  349. user_record
  350. call_forward_all
  351. local_extension
  352. - Update these Dialplans by first selecting and deleting their entries from within the Dialplan Manager for all domains. Then, run Advanced -> Upgrade -> App Defaults to retrieve the new versions of the diaplans.
  353. 3. In the menu go to Status then SIP Status and press 'Flush Cache'.
  354. 4. Update old recordings set the record_name and record_path.
  355. ::
  356. cd /usr/src
  357. wget https://raw.githubusercontent.com/fusionpbx/fusionpbx-scripts/master/upgrade/record_path.php
  358. php record_path.php
  359. 5. Resave all Call Center Queues to update each call center queue dialplan. Then restart mod call center or FreeSWITCH.
  360. 6. Advanced > Default Settings
  361. The email section in Advanced > Default settings, changes have been made.
  362. * You will find duplicates with a blank value. The duplicates must be updated with the existing info from the originals. These duplicates are the new and correct settings. You'll have to update these blank ones with the existing values (like smtp server info) to the new default ones. Then delete the original ones.
  363. * Don't delete the blank entries. The code behind them are for version 4.4+ and the original ones are not.
  364. .. note::
  365. If you already deleted the blank ones, you'll have to delete the email section then run Advanced > Upgrade > App Defaults check box. Then go back to Advanced > Default settings and set the email section back up.
  366. Version 4.0 to 4.2
  367. ^^^^^^^^^^^^^^^^^^
  368. 1. Update the source code.
  369. From the web interface go to the Menu -> Advanced > Upgrade page. Check the source box and the press execute. If you see a red bar it indicates there was a git conflict and you will need to update from console instead. If you don't see the source box then you will need to update from the console.
  370. ::
  371. cd /var/www/fusionpbx
  372. git stash
  373. git pull
  374. chown -R www-data:www-data /var/www/fusionpbx
  375. 2. If the page goes blank type in the url http://domain.com/logout.php This should bring you back to the login screen.
  376. 3. Udate the Schema. Advanced -> Upgrade Check the Schema box and then then press execute.
  377. https://domain.com/core/upgrade/index.php
  378. 4. Check the box for App Defaults and run execute.
  379. 5. Check the box for Menu Defaults and run execute. This will update the menu to the default menu. The menu should now look like this.
  380. .. image:: ../_static/images/fusionpbx_new_menu.jpg
  381. :scale: 85%
  382. 6. Check the box for Permission Defaults and run execute. Permissions are store in a session to get new permissions logout and back in.
  383. 7. Goto Dialplan > Dialplan Manager and delete "local_extension". Then goto Advanced > Upgrade and only check box App Defaults and click execute. This will regenerate the new local_extension version.
  384. 8. Go to Applications > Conference profiles. Edit each profile and replace $${hold_music} with local_stream://default
  385. 9. Goto Advanced > Variables hold_music. Make sure it's value is set as local_stream://default
  386. ::
  387. Check Applications > Music On Hold to see if music is listed properly.
  388. You should see in red default for the category and the kHz sub categories should be in blue.
  389. If not, do the following
  390. * Edit (Pencil icon on the right) the Category names to reflect default for 8, 16, 32, and 48kHz.
  391. * After you click the pencil icon choose at the bottom the domain for the rates and click save.
  392. * If the category is blank, you may have missed running Advanced > check box app defaults > execute or you may not have renamed autoload_configs/local_stream.conf.xml file to local_stream.conf.
  393. * For custom music on hold check the path for the domain name and set select for the domain name to match the domain used in the path.
  394. 10. Remove .xml from the end of the following file names
  395. ::
  396. **Before**
  397. autoload_configs/callcenter.conf.xml
  398. autoload_configs/conference.conf.xml
  399. autoload_configs/local_stream.conf.xml
  400. ::
  401. **After**
  402. autoload_configs/callcenter.conf
  403. autoload_configs/conference.conf
  404. autoload_configs/local_stream.conf
  405. 11. Edit autoload_configs/lua.conf.xml adding "languages". Restart of FreeSWITCH is required.
  406. ::
  407. <param name="xml-handler-bindings" value="configuration,dialplan,directory,languages"/>
  408. 12. Update Time Conditions (Bug Fix)
  409. ::
  410. Goto Advanced > Upgrades page. Check box Update Source, execute.
  411. Goto Advanced > Default settings > Category > delete the category: time condition presets.
  412. Goto Advanced > Upgrade > check box App Defaults, execute.
  413. Goto Advanced > Default settings. Click "Reload" at the top right. (This will get the new presets)
  414. Next steps are for existing Time Conditions
  415. ::
  416. Goto Apps > Time Conditions and edit the time conditions remove all holidays and hit save.
  417. Select the holidays over again.
  418. .. note::
  419. Many of the provisioning templates were updated. If you use custom provisioning templates you should consider updating them with the new versions.
  420. Version 3.8 to 4.0
  421. ^^^^^^^^^^^^^^^^^^
  422. Remove the comments from the script-directory in **/usr/local/freeswitch/conf/autoload_configs/lua.conf.xml**
  423. If using the FreesWITCH package then remove $${base_dir} and set the full path to the scripts directory.
  424. ::
  425. before: <!--<param name="script-directory" value="$${base_dir}/scripts/?.lua"/>-->
  426. after: <param name="script-directory" value="/usr/local/freeswitch/scripts/?.lua"/>
  427. Rebooting FreeSWITCH is required for this to take effect.
  428. Version 3.6 to 3.8
  429. ^^^^^^^^^^^^^^^^^^
  430. | **Note: Upgrading can get very complex. If the production system is critical or you are intimidated from these upgrade instructions you may want FusionPBX paid support at http://www.fusionpbx.com/support.php**
  431. | A standard 'upgrade' procedure should always be followed:
  432. | (1. Make a Backup!, 2. Advanced > Upgrade steps, 3. Update switch scripts, 4. Restart FreeSWITCH).
  433. Beyond the standard upgrade procedure just described, the following will also need to be performed:
  434. ::
  435. uncomment: <param name="script-directory" value="$${base_dir}/scripts/?.lua"/>
  436. in: /usr/local/freeswitch/conf/autoload_configs/lua.conf.xml
  437. | * Rebuild all time conditions.
  438. | * After you edit a particular time condition, click the Dialplan button on the top right to see what was there originally.
  439. | * Delete the following dialplans from each domain then run Advanced -> Upgrade -> App Defaults. If using XML handler for the dialplan flush memcache. If using dialplans XML on the file system resave one of the dialplans to have FusionPBX rewrite the XML files.
  440. | * user_exists - call_timeout variable was added
  441. | * extension-intercom - It has been renamed to 'page-extension'
  442. | * eavesdrop - Change '*'88[ext] to '*'33[ext] so that it doesn't conflict with page-extension at '*'8[ext]
  443. | * user_status - Has been renamed to 'agent_status'
  444. | * page - Dialplan has been simplified.
  445. | * valet_park_out - Changed regex variable from $1 to $2
  446. | * local_extension - failure handler was added to support call forward on busy and no answer
  447. | * If using call center feature code '*'22 edit each agent and add an agent id and password (pin number)
  448. | * Delete any dialplan with the 'features' context. These have been moved into the dialplan domain contexts.
  449. | * If using App -> XMPP, Content Manager, or Schema they have been moved dev -> branches -> apps directory need to pull files from there if you want to use any of them.
  450. | * For single tenant systems 'default' context is no longer used by default.
  451. | * Easiest way to update your system is go to Advanced -> Domains and edit your domain.
  452. | * Copy your current domain name then change the name to default then save the change.
  453. | * Now edit the domain name again and paste your original domain name or IP address whatever the domain originally was and save the changes
  454. | * Go to accounts extensions and save one extension. (not needed if using the XML handler)
  455. | * Go to Dialplan Manager and save one of the dialplans. (not needed if using the XML handler)
  456. | * FAX ( may require adjusting the paths and web server user account to match your server 'www-data' is used in this example)
  457. | * Delete all previous FAX dialplans
  458. | * Resave each fax server in the GUI.
  459. | * cd /var/www/fusionpbx/app/fax
  460. | * wget https://github.com/fusionpbx/fusionpbx-scripts/tree/master/upgrade/fax_import.php
  461. | * chown -R www-data:www-data fax_import.php
  462. | * Login into the GUI and use this path in your browser http://<domain-or-ip>/app/fax/fax_import.php
  463. | * rm /var/www/fusionpbx/app/fax/fax_import.php
  464. | * Groups and Permissions
  465. | If you go to Advanced Group Manager -> And you see what looks like duplicates of user, admin and superadmin groups then you need do the following instructions.
  466. |
  467. | Remove permissions associated with all domain groups with names that match default global groups...
  468. | Use the **Advanced -> SQL Query tool** to do the following.
  469. ::
  470. delete from v_group_permissions where domain_uuid is not null
  471. and (
  472. group_name = 'user'
  473. or group_name = 'admin'
  474. or group_name = 'superadmin'
  475. or group_name = 'agent'
  476. or group_name = 'public'
  477. )
  478. Remove all domain groups having the same names as the default global groups
  479. (retains any custom domain groups)...
  480. delete from v_groups where
  481. domain_uuid is not null
  482. and (
  483. group_name = 'user'
  484. or group_name = 'admin'
  485. or group_name = 'superadmin'
  486. or group_name = 'agent'
  487. or group_name = 'public'
  488. )
  489. Empty the group_uuid field for any group user with a group_name value having
  490. the same name as the default global groups (retains user assignments to custom domain groups)...
  491. update v_group_users set group_uuid = null where
  492. group_name = 'user'
  493. or group_name = 'admin'
  494. or group_name = 'superadmin'
  495. or group_name = 'agent'
  496. or group_name = 'public'
  497. |
  498. | For group users with a null group_uuid, insert the group_uuid of the global group that matches the group_name value...
  499. | Run this code from **Advanced -> Command -> PHP Command.**
  500. ::
  501. $sql = "select group_user_uuid, group_name ";
  502. $sql .= "from v_group_users where group_uuid is null";
  503. $prep_statement = $db->prepare(check_sql($sql));
  504. $prep_statement->execute();
  505. $result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
  506. $result_count = count($result);
  507. unset($prep_statement);
  508. if ($result_count > 0) {
  509. foreach($result as $field) {
  510. //note group user uuid
  511. $group_user_uuid = $field['group_user_uuid'];
  512. $group_name = $field['group_name'];
  513. //get global group uuid
  514. $sql = "select group_uuid from v_groups ";
  515. $sql .= "where domain_uuid is null ";
  516. $sql .= "and group_name = '".$group_name."' ";
  517. $prep_statement = $db->prepare($sql);
  518. $prep_statement->execute();
  519. $sub_result = $prep_statement->fetch(PDO::FETCH_ASSOC);
  520. $sub_result_count = count($sub_result);
  521. unset ($prep_statement);
  522. //set group uuid
  523. if ($sub_result_count > 0) {
  524. $sql = "update v_group_users ";
  525. $sql .= "set group_uuid = '".$sub_result['group_uuid']."' ";
  526. $sql .= "where group_user_uuid = '".$group_user_uuid."' ";
  527. $count = $db->exec(check_sql($sql));
  528. unset($sql);
  529. }
  530. }
  531. }
  532. |
  533. | **Apps menu disappeared**
  534. | If your apps menu disappeared check that it wasn't set to protected in the menu manager.
  535. | **(advanced -> menu manager)**. If protected is true, it won't show up.
  536. Version 3.5 to 3.6
  537. ^^^^^^^^^^^^^^^^^^
  538. |
  539. | When running **Upgrade -> Schema**
  540. | If you see **ALTER TABLE v_xml_cdr ADD json json;** every time you run the upgrade schema then you likely have an old version of Postgres. To fix this either upgrade to the latest Postgres server or run the following **SQL statement from advanced -> sql query.**
  541. ::
  542. ALTER TABLE v_xml_cdr ADD json text;
  543. | See https://github.com/fusionpbx/fusionpbx/issues/655 for more details.
  544. |
  545. | **Potential issue with call recording after upgrading/switch to latest 3.6 stable.**
  546. | After upgrading to 3.6 stable from 3.5 dev I noticed that calls were no longer being recorded. This was due to the file extension being missing from the recording path. If this is happening to you it is an easy fix.
  547. | Go to Advanced -> variables -> category default and add the variable record_ext and set it to either wav or mp3. Choosing mp3 depends upon whether or not you have mod_shout installed and enabled.
  548. Version 3.4 to 3.5
  549. ^^^^^^^^^^^^^^^^^^
  550. |
  551. | Gateways now use the gateway_uuid as the name that is used when interacting with FreeSWITCH. This script is needed to help change the gateway names used in the outbound routes. You may need to remove the old gateway file names from the conf/sip_profiles/external directory.
  552. ::
  553. cd /var/www/fusionpbx
  554. wget http://fusionpbx.googlecode.com/svn/branches/dev/scripts/upgrade/gateway_uuid.php
  555. http://x.x.x.x/gateway_uuid.php
  556. rm gateway_uuid.php
  557. | * Go To **Advanced -> Default Settings -> Switch Category -> Sub category gateways change to sip_profiles**
  558. | **Permissions Issues** - (access denied errors)
  559. | Due to changes which improve consistency throughout the product, some Users have had problem with superadmin receiving "access denied" errors after the upgrade.
  560. |
  561. | * Go To **Advanced -> Group Manager**
  562. | * On **superadmin** click **Permissions** and then **Restore Default**
  563. |
  564. | You may need to execute this operation for each group.
  565. | **Default Settings**'
  566. | In the **switch category change gateways to sip_profiles**
  567. |
  568. Version 3.3 to 3.4
  569. ^^^^^^^^^^^^^^^^^^
  570. |
  571. | Update the source as described on this page, menu manager **restore default**, group manager edit a group **restore default**, advanced -> upgrade schema.
  572. |
  573. | FusionPBX 3.4 hunt groups have been deprecated. Use the following script run it only one time to move existing hunt groups to ring groups.
  574. ::
  575. cd /var/www/fusionpbx
  576. wget https://github.com/fusionpbx/fusionpbx-scripts/tree/master/upgrade/hunt_group_export.php
  577. http://x.x.x.x/hunt_group_export.php
  578. rm -r hunt_group_export.php
  579. |
  580. | Ring groups were expanded to add ability to call external numbers and match other missing hunt group features. A new table was created to accomodate this.
  581. ::
  582. cd /var/www/fusionpbx
  583. wget https://github.com/fusionpbx/fusionpbx-scripts/tree/master/upgrade/ring_group_extensions.php
  584. http://x.x.x.x/ring_group_extensions.php
  585. rm ring_group_extensions.php
  586. |
  587. Version 3.2 to 3.3
  588. ^^^^^^^^^^^^^^^^^^
  589. |
  590. | FreeSWITCH changed the syntax to connect to the database so numerous LUA scripts had to be updated. If you customized any of the lua scripts make a backup of the FreeSWITCH scripts directory. Then remove the contents of the **freeswitch/scripts directory** and then run **advanced -> upgrade schema** (which will detect the missing scripts and replace them).
  591. |
  592. Version 3.1.4 to 3.2
  593. ^^^^^^^^^^^^^^^^^^^^
  594. |
  595. | Ubuntu/Debian
  596. ::
  597. cd /var/www/fusionpbx
  598. git pull
  599. Advanced -> Upgrade Schema
  600. | **Menu**
  601. | If you cant see the menu after upgrading try the following in your browser replace x.x.x.x with your ip or domain name.
  602. ::
  603. x.x.x.x/core/menu/menu.php
  604. Edit the menu make sure the language is set to en-us.
  605. Press **Restore Default**
  606. | **Default settings**
  607. ::
  608. x.x.x.x/core/default_settings/default_settings.php
  609. category: language
  610. type: code
  611. value: en-us
  612. | **Email**
  613. Migrating email to the new FusionPBX native voicemail.
  614. ::
  615. wget https://github.com/fusionpbx/fusionpbx-scripts/tree/master/upgrade/voicemail_export.php
  616. | Run from the browser it will take the voicemail data from the FreeSWITCH database and copy the information into the FusionPBX database.
  617. ::
  618. http://x.x.x.x/voicemail_export.php
  619. Remove the export file
  620. ::
  621. rm voicemail_export.php
  622. | **Call Forward / Follow Me**
  623. | No longer using hunt groups. So the backend has changed so keep in mind that you need to reset call forward and follow me settings. They are still listed in **app -> hunt groups**. After updating the info in call forward, follow me you should delete the hunt group.
  624. |
  625. Version 2 to 3.0
  626. ^^^^^^^^^^^^^^^^
  627. |
  628. | LESS than or EQUAL to revision 1877, use the migration tool. https://github.com/fusionpbx/fusionpbx-scripts/tree/master/upgrade
  629. | If greater than revision 1877, use latest.
  630. ::
  631. | When upgrading from previous versions, you may encounter the following issues:
  632. | **Changes to your dial plan or extensions don't take effect**
  633. | * Go to the **Advanced -> Default Settings** page
  634. | * Remove **"/default"** from the end of your dialplan and extensions directories
  635. |
  636. | **Missing menus**
  637. | * Go to hxxps://yourdomain.com/core/menu/menu.php
  638. | * Click the edit (e) button beside default
  639. | * Click the Restore Default button
  640. | * Check that all the entries in the list are accessible by the appropriate groups
  641. | **Emails not being sent for voicemail or fax**
  642. | * Double check the SMTP settings on the System -> Settings page
  643. | * Save it, even if you haven't changed anything
  644. Release Revisions
  645. * r0001 is 1.0 release - 6 Nov 2009
  646. * r2523 is 3.0 release - 3 May 2012
  647. * r2585 is 3.0.4 release - 24 May 2012
  648. * r2757 is 3.1 release - 18 Aug 2012
  649. * r2777 is 3.1.1 release - 26 Aug 2012
  650. * r2827 is 3.1.2 release - 12 Sep 2012
  651. * r2897 is 3.1.3 release - 26 Sep 2012
  652. * r2907 is 3.1.4 release - 27 Sep 2012
  653. * r3694 is 3.2 release - 19 Jan 2013
  654. * r3978 is 3.3 release - 1 May 2013
  655. * r4605 is 3.4 release - 28 Sep 2013
  656. * r6747 is 3.6.1 release - 22 Aug 2014
  657. * r8481 is 3.8.3 release - 11 May 2014
  658. * r793d386 is 4.0 release - Aug 2015
  659. * r4fdb6e9 is 4.1 release - Dec 2015
  660. * rxxxxxxx is 4.2 release - xxx 2016
  661. |
  662. SQLite
  663. ^^^^^^
  664. SQLite is the FreeSWITCH default. Databases are located in the freeswitch/db directory.
  665. ODBC
  666. ^^^^^
  667. http://wiki.freeswitch.org/wiki/ODBC
  668. Postgres
  669. ^^^^^^^^^
  670. Postgres native support will be in FreeSWITCH 1.2.4 but has been available in the Main GIT branch.
  671. Dependencies
  672. ^^^^^^^^^^^^^
  673. libpq and the associated dev packages are required
  674. Configure
  675. ^^^^^^^^^^
  676. To enable PostgresSQL as a native client in FreeSWITCH you must enable it during the build when running configure.
  677. ** ./configure --enable-core-pgsql-support **
  678. switch.conf.xml
  679. ^^^^^^^^^^^^^^^^^
  680. Under the Settings area insert the following line
  681. <param name="core-db-dsn" value="pgsql;hostaddr=127.0.0.1 dbname=freeswitch user=freeswitch password='' options='-c client_min_messages=NOTICE' application_name='freeswitch'" />