Fwconsole reload error


(Dux) #1

Helo, everyone.
After upgrading asterisk today to version 16.2 I have encountered the following php error while reloading, in Sipsettings.class.php, line 433: json_decode() exprects parameter 1 to be string, array given. Asterisk works, but the upgrade itself did not run smoothly this time, probably due to this error. I had to manually restart asterisk after upgrade.


(Mohit Mishra) #2

Issue already fixed
https://issues.freepbx.org/browse/FREEPBX-20742

Upgrade SIP Settings to edge with:

fwconsole ma upgrade sipsettings --edge

Thanks


(Dux) #3

It says: sipsettings is the same as the online version, unable to upgrade


(Mohit Mishra) #4

Can you please let me know the sipsettings module version?


(Dux) #5

How can I learn the version? It is now shown in the User Interface, because, probably, it is broken.


(Dux) #6
  1. <?php
  2. global $currentcomponent;
  3. $sa = $this->getConfig(‘showadvanced’);
  4. $pjsip_identifers_order_default = array(0=>‘ip’,1=>‘username’,2=>‘anonymous’,3=>‘header’,4=>‘auth_username’);
  5. $pjsip_identifers_json = $this->getConfig(“pjsip_identifers_order”);
  6. if($pjsip_identifers_json != “”){
  7. $pjsip_identifers_order = json_decode($pjsip_identifers_json, true);
  8. } else {
  9. $pjsip_identifers_order = $pjsip_identifers_order_default;
  10. }
  • $interfaces[‘auto’] = array(‘0.0.0.0’, ‘All’, ‘0’);
  • if ($sa != “no”) {
  1. exec("/sbin/ip -o addr", $result, $ret);
  2. $interfaces = $this->parseIpAddr($result, $interfaces);
  3. }
  • $protocols = $this->getConfig(“protocols”);
  1. $protohtml = $udphtml = $bindhtml = ‘’;
  2. foreach ($protocols as $p) {
  3. $allBinds = $this->getConfig(“binds”);
  4. $binds = !empty($allBinds[$p]) && is_array($allBinds[$p]) ? $allBinds[$p] : array();
  5. $cbs = ‘’;
  6. $lastproto="";
  7. foreach ($interfaces as $i) {
  8. // Skip interfaces without an IP address.
  9. if (empty($i))
  10. continue;
  11. // $i = array( “1.2.3.4”, “eth1”, “24”);
  12. if ($p == “udp”) {
  13. $priority = 2;
  14. } else {
  15. $priority = 3;
  16. }
  17. if ($i[0] === “0.0.0.0”) {
  18. $isall = “btn-all btn-proto-$p”;
  19. } else {
  20. $isall = “btn-notall btn-proto-$p”;
  21. }

Arguments

  1. “json_decode() expects parameter 1 to be string, array given”

(Mohit Mishra) #7

Try to run below command at console.

fwconsole ma list

(Dux) #8

sipsettings | 15.0.6.7


(Mohit Mishra) #9

Try with below command

fwconsole ma downloadinstall sipsettings --tag 15.0.6.18

(Dux) #10

It says: Unable to update module sipsettings - 15.0.6.18, it does not exist


(Dux) #11

Also, when I reload the system, online softphones don’t work. I see the following error: ERROR[30300]: res_pjsip.c:4261 endpt_send_request: Error 171060 ‘Unsupported transport (PJSIP_EUNSUPTRANSPORT)’ sending OPTIONS request to endpoint …


(Mohit Mishra) #12

Try with
fwconsole ma downloadinstall https://mirror.freepbx.org/modules/packages/sipsettings/sipsettings-15.0.6.18.tgz.gpg


(Dux) #13

I have managed to update sipsettings from this link, but the problem with the extensions persists. They do not work after configuration reload for some time, the error is Unsupported transport (PJSIP_EUNSUPTRANSPORT)’ sending OPTIONS request to endpoint . The problem disappears after I flush the cache with the command ip -s -s neigh flush all, but it did not used to be so. How can I fix this?


(Mohit Mishra) #14

Try to set below settings, I hope it will help you out
In sipsettings, Chan PJSIP Settings / Misc PJSip Settings - set “Allow Transports Reload” to No.


(Dux) #15

Thank you. I have now set this to no. Will I be able to add and automatically enable extensions if it is set to no?


(system) closed #16

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