Apply Config gives error after changing SIP drivers to CHAN_PJSIP Please help!

Hello! Thank you for taking the time to help. I was trying to set up a new FreePBX machine. I attempted to change all of the endpoints to the CHAN_PJSIP Drivers. I thought I could change all of them at once before hitting ‘apply configuation’. After I did, I get an error and can not get rid of the apply configuration or clear the changes that were made. I even tried rebooting.

Is there a way to “reset” any changes we made to clear the red apply config button?

Can anyone help? Thanks!
Here’s the error:


FreePBX®FreePBX is a registered trademark of
Schmooze Com., Inc.
FreePBX 12.0.2 is licensed under the GPL
Copyright© 2007-2014www.schmoozecom.com
Error!
close

Reload failed because retrieve_conf encountered an error: 255

exit: 255
found language dir fr for directory, not installed on system, skipping
Added to globals: ASTETCDIR = /etc/asterisk
Added to globals: ASTMODDIR = /usr/lib/asterisk/modules
Added to globals: ASTVARLIBDIR = /var/lib/asterisk
Added to globals: ASTAGIDIR = /var/lib/asterisk/agi-bin
Added to globals: ASTSPOOLDIR = /var/spool/asterisk
Added to globals: ASTRUNDIR = /var/run/asterisk
Added to globals: ASTLOGDIR = /var/log/asterisk
Added to globals: CWINUSEBUSY = true
Added to globals: AMPMGRUSER = admin
Added to globals: AMPMGRPASS = amp111
Added to globals: AMPDBENGINE = mysql
Added to globals: AMPDBHOST = localhost
Added to globals: AMPDBNAME = asterisk
Added to globals: AMPDBUSER = freepbxuser
Added to globals: AMPDBPASS = f72f358b3676
Added to globals: VMX_CONTEXT = from-internal
Added to globals: VMX_PRI = 1
Added to globals: VMX_TIMEDEST_CONTEXT =
Added to globals: VMX_TIMEDEST_EXT = dovm
Added to globals: VMX_TIMEDEST_PRI = 1
Added to globals: VMX_LOOPDEST_CONTEXT =
Added to globals: VMX_LOOPDEST_EXT = dovm
Added to globals: VMX_LOOPDEST_PRI = 1
Added to globals: MIXMON_DIR =
Added to globals: MIXMON_POST =
Added to globals: DIAL_OPTIONS = Ttr
Added to globals: TRUNK_OPTIONS = Tt
Added to globals: TRUNK_RING_TIMER = 300
Added to globals: MIXMON_FORMAT = wav
Added to globals: REC_POLICY = caller
Added to globals: RINGTIMER_DEFAULT = 15
Added to globals: TRANSFER_CONTEXT = from-internal-xfer
PHP Fatal error:  Uncaught exception 'Exception' with message 'Endpoint  already exists.' in /var/www/html/admin/modules/core/functions.inc/PJSip.class.php:512
Stack trace:
#0 /var/www/html/admin/modules/core/functions.inc/PJSip.class.php(388): FreePBX\modules\Core\PJSip->generateEndpoint(Array, Array)
#1 /var/www/html/admin/modules/core/functions.inc/PJSip.class.php(73): FreePBX\modules\Core\PJSip->generateEndpoints()
#2 /var/www/html/admin/libraries/BMO/FileHooks.class.php(88): FreePBX\modules\Core\PJSip->genConfig()
#3 /var/www/html/admin/libraries/BMO/FileHooks.class.php(25): FileHooks->processNewHooks()
#4 /var/lib/asterisk/bin/retrieve_conf(732): FileHooks->processFileHooks(Array)
#5 {main}
  thrown in /var/www/html/admin/modules/core/functions.inc/PJSip.class.php on line 512
1 error(s) occurred, you should view the notification log on the dashboard or main screen to check for more details.

Retry

Cancel

I’m really stuck on this issue, I would very very much appreciate any help anyone could help with. Thank you!

Did you go through and SAVE all endpoints you changed?

Thank you for responding!

Yes, I even went back and changed them back to the original driver, then made sure to hit save as well.

Is there anything else I can try? Do you know if there’s a way to “Clear recent changes” or something like that?

Thanks!

I’m having the same issue.

exit: 255
found language dir ja for pbdirectory, not installed on system, skipping
found language dir es for pbdirectory, not installed on system, skipping
found language dir es for speeddial, not installed on system, skipping
Added to globals: ASTETCDIR = /etc/asterisk
Added to globals: ASTMODDIR = /usr/lib/asterisk/modules
Added to globals: ASTVARLIBDIR = /var/lib/asterisk
Added to globals: ASTAGIDIR = /var/lib/asterisk/agi-bin
Added to globals: ASTSPOOLDIR = /var/spool/asterisk
Added to globals: ASTRUNDIR = /var/run/asterisk
Added to globals: ASTLOGDIR = /var/log/asterisk
Added to globals: CWINUSEBUSY = true
Added to globals: AMPMGRUSER = admin
Added to globals: AMPMGRPASS = *
Added to globals: AMPDBENGINE = mysql
Added to globals: AMPDBHOST = localhost
Added to globals: AMPDBNAME = asterisk
Added to globals: AMPDBUSER = freepbxuser
Added to globals: AMPDBPASS = *
Added to globals: VMX_CONTEXT = from-internal
Added to globals: VMX_PRI = 1
Added to globals: VMX_TIMEDEST_CONTEXT =
Added to globals: VMX_TIMEDEST_EXT = dovm
Added to globals: VMX_TIMEDEST_PRI = 1
Added to globals: VMX_LOOPDEST_CONTEXT =
Added to globals: VMX_LOOPDEST_EXT = dovm
Added to globals: VMX_LOOPDEST_PRI = 1
Added to globals: MIXMON_DIR =
Added to globals: MIXMON_POST =
Added to globals: DIAL_OPTIONS = Ttr
Added to globals: TRUNK_OPTIONS = Tt
Added to globals: TRUNK_RING_TIMER = 300
Added to globals: MIXMON_FORMAT = wav
Added to globals: REC_POLICY = caller
Added to globals: RINGTIMER_DEFAULT = 15
Added to globals: TRANSFER_CONTEXT = from-internal-xfer
PHP Fatal error: Uncaught exception ‘Exception’ with message ‘Endpoint already exists.’ in /var/www/html/admin/modules/core/functions.inc/PJSip.class.php:547
Stack trace:
#0 /var/www/html/admin/modules/core/functions.inc/PJSip.class.php(402): FreePBX\modules\Core\PJSip->generateEndpoint(Array, Array)
#1 /var/www/html/admin/modules/core/functions.inc/PJSip.class.php(86): FreePBX\modules\Core\PJSip->generateEndpoints(Array)
#2 /var/www/html/admin/libraries/BMO/FileHooks.class.php(92): FreePBX\modules\Core\PJSip->genConfig()
#3 /var/www/html/admin/libraries/BMO/FileHooks.class.php(25): FileHooks->processNewHooks()
#4 /var/lib/asterisk/bin/retrieve_conf(740): FileHooks->processFileHooks(Array)
#5 {main}
thrown in /var/www/html/admin/modules/core/functions.inc/PJSip.class.php on line 547

Hey guys I solved the problem on my end. Here’s how:

  1. Go to admin interface at /admin in browser
  2. Go into Applications --> Bulk Extensions
  3. Download csv of current config for extensions
  4. Go through column by column and find inconsistencies… for me, some columns had blank data for NAT, transport, codecs, etc. I think that was the problem
  5. Copy and paste to fix the inconsistencies
  6. Go to the first column and change every row to say “edit” (without quotes)
  7. Go back into Bulk Extensions interface, find the browse button and upload your newly formatted csv file
  8. Once finished, press “Apply Changes”

Voila.