All Calls Randomly Drop about once an hour - Everything works as it should otherwise

I’m afraid you’re already there. I was getting errors almost exactly the same as yours and it was a bad memory module. I replaced the RAM and the problem moved to a bad CPU/Mobo. I ended up replacing the entire motherboard to solve the problem.

You don’t have to lose the CDR records. Use “mysqldump” to dump your CDR records to a flat file, upgrade the system, and use “Insert on error ignore” to put the CDR records back.

2 Likes

@cynjut Ironically, the calls dropping was on the new system, the old consumer grade tower w/ bios raided drives is running strong. I was thinking that I could just migrate CDR’s, but I was concerned that they would change during upgrade. TY for the suggestion tho,

Regardless, I did get my somewhat answer, looking in /var/log/messages gave me some insite as to what the cause was, but we have started completely fresh on a new server just to cut out HW issues. Upgrading the old production system to FreePBX v2.12 then over to FreePBX 6, which is as far as I’ve tested our custom code anyway. Next step! SNG7!

You’re using the term ‘roll back’ incorrectly here, I think. There is no ability to ‘roll back’ because nothing is touched on the original machine. This means there is nothing to ‘roll back’ to.

However, yes, CDR records are not moved across, because they’re super trivial to do yourself and it does not need to be automated.

(It’s ‘mysqldump asteriskcdrdb > file’ and then ‘mysql asteriskcdrdb < file’ on the new machine)

Is this your only issue?

Edit: If you want me to add cdrs to the conversion, I’m not TOTALLY opposed to it, but doing that that will SIGNIFICANTLY increase the length of time it takes. CDRs can be copied at your leisure, without any issues at all.

@xrobau maybe you would consider adding it and prompting the user if they would like it ran this specific session or not? Give them the choice at execution.

Some people will definitely want it where others won’t. You could even warn them about the additional time required when they are prompted yes or no – to run or not.

You need some flags for mysqldump or it will write out the sql files with drop table before re-creating and restoring data. There are fewer columns in the cdr table in older versions.

@xrobau Our concern is yes, that CDR DB wouldn’t be able to go backwards, because it would have changed during the upgrade then the old system wouldn’t understand how to interact with it. There was a definite change between the structure of the CDR table on our last upgrade.

We are now on FreePBX Distro 6 w/ FreePBX 12 Ast 11, can you confirm the CDR table is the same on SNG7 w/ FreePBX 14 and Ast 11/13?

You don’t need me to confirm it, you can verify this yourself.

Asterisk 13, FreePBX 13

mysql> describe cdr;
+---------------+--------------+------+-----+---------------------+-------+
| Field         | Type         | Null | Key | Default             | Extra |
+---------------+--------------+------+-----+---------------------+-------+
| calldate      | datetime     | NO   | MUL | 0000-00-00 00:00:00 |       |
| clid          | varchar(80)  | NO   |     |                     |       |
| src           | varchar(80)  | NO   |     |                     |       |
| dst           | varchar(80)  | NO   | MUL |                     |       |
| dcontext      | varchar(80)  | NO   |     |                     |       |
| channel       | varchar(80)  | NO   |     |                     |       |
| dstchannel    | varchar(80)  | NO   |     |                     |       |
| lastapp       | varchar(80)  | NO   |     |                     |       |
| lastdata      | varchar(80)  | NO   |     |                     |       |
| duration      | int(11)      | NO   |     | 0                   |       |
| billsec       | int(11)      | NO   |     | 0                   |       |
| disposition   | varchar(45)  | NO   |     |                     |       |
| amaflags      | int(11)      | NO   |     | 0                   |       |
| accountcode   | varchar(20)  | NO   | MUL |                     |       |
| uniqueid      | varchar(32)  | NO   | MUL |                     |       |
| userfield     | varchar(255) | NO   |     |                     |       |
| did           | varchar(50)  | NO   | MUL |                     |       |
| recordingfile | varchar(255) | NO   |     |                     |       |
| cnum          | varchar(40)  | NO   |     |                     |       |
| cnam          | varchar(40)  | NO   |     |                     |       |
| outbound_cnum | varchar(40)  | NO   |     |                     |       |
| outbound_cnam | varchar(40)  | NO   |     |                     |       |
| dst_cnam      | varchar(40)  | NO   |     |                     |       |
+---------------+--------------+------+-----+---------------------+-------+
23 rows in set (0.00 sec)

mysql>

Have a look at your existing system, and see if it matches.