Hi
I need some help please.
I am very inexperienced with Kamailio, and am trying to work out how to upgrade without rewriting any of the current config.
I am going from 5.6.0 to 6.0.0 and wanted to know if I can run make install on every iteration i.e. 5.6.1, the 5.6.2 etc. until I need to make a bigger step, and may have to change tables etc.
In the document for upgrading 5.6.x to 5.7.x it says make change to Watch table, but I have no watch table.
Very confused.
Thanks
Tony
On 12 Mar 2025, at 15:30, Anthony Ford via sr-users sr-users@lists.kamailio.org wrote:
Hi
I need some help please.
I am very inexperienced with Kamailio, and am trying to work out how to upgrade without rewriting any of the current config.
I am going from 5.6.0 to 6.0.0 and wanted to know if I can run make install on every iteration i.e. 5.6.1, the 5.6.2 etc. until I need to make a bigger step, and may have to change tables etc.
In the document for upgrading 5.6.x to 5.7.x it says make change to Watch table, but I have no watch table.
For database migration:
Each table has a version number which should be documented in the README. So first, check which tables you are using (with active data), then check the version numbers in the “version” table that is an internal table that kamailio is using.
If there is a different version for the new Kamailio, then you need to compare schemas and adjust the tables. If the table versions are the same, you don’t need to change.
For 6.0 you can find the database schemas here for MySQL:
https://github.com/kamailio/kamailio/tree/6.0/utils/kamctl/mysql%EF%BF%BC kamailio/utils/kamctl/mysql at 6.0 · kamailio/kamailio github.com
If you click on dialog-create, you’ll find an insert into the version table in the end
INSERT INTO version (table_name, table_version) values ('dialog_vars','1’);
So if you have no watcher table and are not using it, don’t worry. Focus on the database tables you use and check the versions. If you have an older version, update according to the schema for the database you are using.
/O
Thanks, Olle, will give it a go
Tony
From: "Olle E. Johansson" oej@edvina.net Date: Wednesday, 12 March 2025 at 15:06 To: "Kamailio (SER) - Users Mailing List" sr-users@lists.kamailio.org Cc: Olle E Johansson oej@edvina.net, Anthony Ford tony.ford@apalo.co.uk Subject: Re: [SR-Users] upgrading process
On 12 Mar 2025, at 15:30, Anthony Ford via sr-users sr-users@lists.kamailio.org wrote:
Hi
I need some help please.
I am very inexperienced with Kamailio, and am trying to work out how to upgrade without rewriting any of the current config.
I am going from 5.6.0 to 6.0.0 and wanted to know if I can run make install on every iteration i.e. 5.6.1, the 5.6.2 etc. until I need to make a bigger step, and may have to change tables etc.
In the document for upgrading 5.6.x to 5.7.x it says make change to Watch table, but I have no watch table.
For database migration:
Each table has a version number which should be documented in the README. So first, check which tables you are using (with active data), then check the version numbers in the “version” table that is an internal table that kamailio is using.
If there is a different version for the new Kamailio, then you need to compare schemas and adjust the tables. If the table versions are the same, you don’t need to change.
For 6.0 you can find the database schemas here for MySQL:
[cid:image001.png@01DB9361.3B162760] kamailio/utils/kamctl/mysql at 6.0 · kamailio/kamailiohttps://github.com/kamailio/kamailio/tree/6.0/utils/kamctl/mysql github.comhttps://github.com/kamailio/kamailio/tree/6.0/utils/kamctl/mysql
If you click on dialog-create, you’ll find an insert into the version table in the end
INSERT INTO version (table_name, table_version) values ('dialog_vars','1’);
So if you have no watcher table and are not using it, don’t worry. Focus on the database tables you use and check the versions. If you have an older version, update according to the schema for the database you are using.
/O
Luckily there usually aren't a lot of breaking changes in Kamailio updates, and config files are mostly back compatible. That doesn't mean that there are never changes, but it does mean that the number of issues to resolve is usually small.
* wanted to know if I can run make install on every iteration i.e. 5.6.1, the 5.6.2 etc
There shouldn't really be any changes needed to config for the patch/fix versions like that (third decimal place) so those should be fine (and is good practice if you're not able to quickly update to a supported version for any reason), but it shouldn't be necessary to touch every incremental version to upgrade Kamailio.
Every major release has an upgrade guide from the pervious version, so in your case:
* 5.6 to 5.7: https://www.kamailio.org/wikidocs/install/upgrade/5.6.x-to-5.7.0/ * 5.7 to 5.8: https://www.kamailio.org/wikidocs/install/upgrade/5.7.x-to-5.8.0/ * 5.8 to 6.0: https://www.kamailio.org/wikidocs/install/upgrade/5.8.x-to-6.0.0/
It still shouldn't be necessary to touch each individual version while upgrading. I'd recommend reading through these docs in order taking note of the following:
* Look for potentially breaking changes in the core. I don't see any in those documents, but a good example would be if upgrading from 4.x to 5.x how fifo was deprecated. * Look for modules changes. Mostly you'll see things like new features which shouldn't be breaking. A few modules were deprecated/archived in 5.8 ( app_sqlang, and auth_identity). Sometimes modules have small breaking changes in them as well, for example in 6.0 the dialog module dropped support for the dlg_flag parameter. Check your kamailio configs to see if any of these listed changes will impact you. * Follow any DB upgrade changes. These are usually simple changes - things like adding an index to a column, or changing a varchar(n) datatype to be varchar(n+y) which won't break your existing config. Another reply correctly points out that you should watch for changes to the version table. This is possibly a situation where a conflict could arise: The version required for one table might be 1 in 5.6 and 2 in 6.0. It might be worth while to copy the existing version table to a new table (like version_60 for example), and use kamailio's version_table parameter to use the new version table on the updated config. (note: The upgrade guides don't show any table version changes, so you probably don't need to do this).
Finally, as a recommendation, smoke test your config in docker. You might not have the container setup in a way to actually receive SIP messages, but "does the config file load correctly" is a nice thing to have resolved ahead of time.
*
Regards,
Kaufman
________________________________ From: Anthony Ford via sr-users sr-users@lists.kamailio.org Sent: Wednesday, March 12, 2025 9:30 AM To: sr-users@lists.kamailio.org sr-users@lists.kamailio.org Cc: Anthony Ford tony.ford@apalo.co.uk Subject: [SR-Users] upgrading process
CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi
I need some help please.
I am very inexperienced with Kamailio, and am trying to work out how to upgrade without rewriting any of the current config.
I am going from 5.6.0 to 6.0.0 and wanted to know if I can run make install on every iteration i.e. 5.6.1, the 5.6.2 etc. until I need to make a bigger step, and may have to change tables etc.
In the document for upgrading 5.6.x to 5.7.x it says make change to Watch table, but I have no watch table.
Very confused.
Thanks
Tony