Trunks Not Restored


Hi, i have updated the distro freepbx to latest version and asterisk to 16.15.1 on both my serves and now i run into a problem, when i do restore to the backup server the Trunks are not restoring, i got this error :
There were errors during the restore process
SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 39 of file /var/www/html/admin/modules/core/Restore/Trunks.php

(Kapil Gupta) #2

Hi, @Edmond Are you using v15.0.12.51 of the Core module? if not then please update the core module by fwconsole ma downloadinstall core --edge .



yes i am using core module v15.0.12.51


i had a backup 2 weeks old (core module v15.0.12.46) and restore it and that works but with latest update doesn’t work


any idea ?

(Kamil) #6


I’m glad I’m not the only one with this issue. I have updated core module using edge repo as advised by @kgupta1 but it is still not restoring. Updated both source and destination servers.
Please find below error:
Processing Trunks SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 39 of file /var/www/html/admin/modules/core/Restore/Trunks.php #0 /var/www/html/admin/modules/core/Restore/Trunks.php(39): PDOStatement->execute(Array) #1 /var/www/html/admin/modules/core/Restore/Trunks.php(13): FreePBX\modules\Core\Restore\Trunks->updateTrunks(Array) #2 /var/www/html/admin/modules/core/Restore.php(53): FreePBX\modules\Core\Restore\Trunks->setConfigs(Array) #3 /var/www/html/admin/modules/backup/Handlers/Restore/Common.php(138): FreePBX\modules\Core\Restore->runRestore() #4 /var/www/html/admin/modules/backup/Handlers/Restore/Common.php(126): FreePBX\modules\Backup\Handlers\Restore\Common->runRestore(Object(FreePBX\modules\Core\Restore)) #5 /var/www/html/admin/modules/backup/Handlers/Restore/Multiple.php(56): FreePBX\modules\Backup\Handlers\Restore\Common->processModule('core', '') #6 /var/www/html/admin/modules/backup/Console/Backup.class.php(324): FreePBX\modules\Backup\Handlers\Restore\Multiple->process(false) #7 /var/www/html/admin/libraries/Composer/vendor/symfony/console/Command/Command.php(255): FreePBX\Console\Command\Backup->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #8 /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php(960): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #9 /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object(FreePBX\Console\Command\Backup), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #10 /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/lib/asterisk/bin/fwconsole(163): Symfony\Component\Console\Application->run() #12 {main}

(Itzik) #7

Please report this:

(Kamil) #8

Whoever experiences the same problem here is the ticket:

(Kapil Gupta) #9

Please upgrade to the latest Core v15.0.12.53 which has the fix for this reported issue.

Best Regards


I have the same issue, and am using Core It appears that this affects warm spare exports as well. So the problem is not resolved per my experience. Any help would be greatly appreciated.

(Tom Ray) #11

Wow. Second time in 45 days Core has broken outside modules that depend on it. QA needs to be better.

(Alsur2) #12

any idea? I have the same issue


I was bitten by the same bug, running core on both source and destination systems.

So I did
fwconsole ma downloadinstall core --tag
on the destination system only, retried the restore, success!

OK, so did the bug get ‘restored’ in Core ? Or, is it a subtle problem that was only partially fixed?

(Hawk McDuck) #14

Anybody know for sure if this “Trunks Not Restored” issue has been addressed in the GA load, and if not, when we can expect it?

$ sudo fwconsole ma list | grep core
| core | | Enabled | GPLv3+ |

(Hawk McDuck) #15

I answered my own question. The ticket has been closed."backup"%20ORDER%20BY%20created%20DESC

OK, it looks as though the issue was the fact that the PBXes were not activated prior to running the restore procedure. Thanks for the help. We can close the ticket.

(system) closed #16

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.