wss-binding enable caused internal profile to disappear

Status
Not open for further replies.
Jul 15, 2021
102
9
18
34
The last entry in the internal profile was wss-binding with value :7443 and the param was disabled. I enabled the param to test out webrtc, however when I did a rescan of the profile, the profile disappeared, the console is complaining that there is no such profile. I checked using the fusionpbx's web admin page - the internal profile is completely missing. I just edited the profile by toggling one param and it has gone missing. Any thoughts on why this would have happened.

freeswitch@nr> sofia status profile internal ================================================================================================= Name internal Domain Name N/A Auto-NAT false DBName sofia_reg_internal Pres Hosts Dialplan XML Context public Challenge Realm auto_to RTP-IP 192.168.1.2 Ext-RTP-IP 192.168.1.2 SIP-IP 192.168.1.2 Ext-SIP-IP 192.168.1.2 URL sip:mod_sofia@192.168.1.2:5060 BIND-URL sip:mod_sofia@192.168.1.2:5060;maddr=192.168.1.2;transport=udp,tcp HOLD-MUSIC local_stream://default OUTBOUND-PROXY N/A CODECS IN PCMA,opus@48000h@20i@1c CODECS OUT opus@48000h@20i@1c,PCMA TEL-EVENT 101 DTMF-MODE rfc2833 CNG 0 SESSION-TO 0 MAX-DIALOG 0 NOMEDIA false LATE-NEG true PROXY-MEDIA false ZRTP-PASSTHRU false AGGRESSIVENAT true CALLS-IN 78 FAILED-CALLS-IN 22 CALLS-OUT 36 FAILED-CALLS-OUT 23 REGISTRATIONS 1 freeswitch@nr> sofia profile internal rescan Reload XML [Success] -ERR cannot find config for profile internal 2021-09-25 22:23:05.561578 [INFO] mod_enum.c:884 ENUM Reloaded 2021-09-25 22:23:05.581626 [INFO] switch_time.c:1430 Timezone reloaded 530 definitions 2021-09-25 22:23:05.821582 [WARNING] sofia.c:6228 No Such Profile 'internal' freeswitch@nr> fsctl loglevel debug
 
Last edited:

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
When you say completely missing, are the records still there in the database?:

Code:
select * from v_sip_profiles;


sip_profile_uuid           | sip_profile_name | sip_profile_hostname | sip_profile_enabled |                                                                                   sip_profile_description                                                                                  
--------------------------------------+------------------+----------------------+---------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 53ffa30b-20b9-4610-88cd-60a8adf50cb2 | external-ipv6    |                      | false               | The External IPV6 profile binds to the IP version 6 address and is similar to the External profile.
 30a8596e-2a93-4880-a2ab-803b08f9674b | internal-ipv6    |                      | false               | The Internal IPV6 profile binds to the IP version 6 address and is similar to the Internal profile.
 5467cfef-3464-458e-a2dc-4861a6796f6a | external         |                      | true                | The External profile external provides anonymous calling in the public context. By default the External profile binds to port 5080. Calls can be sent using a SIP URL "voip.domain.com:5080"
 3138c915-4baf-49ef-95b6-b202fbf744af | internal         |                      | true                | The Internal profile by default requires registration which is used by the endpoints. By default the Internal profile binds to port 5060.
(4 rows)


select * from v_sip_profile_settings where sip_profile_uuid = '3138c915-4baf-49ef-95b6-b202fbf744af';


       sip_profile_setting_uuid       |           sip_profile_uuid           |      sip_profile_setting_name       |                                  sip_profile_setting_value                                   | sip_profile_setting_enabled | sip_profile_setting_description
--------------------------------------+--------------------------------------+-------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+---------------------------------
 8dd6bee6-01c0-4611-8407-ed55309b3b0a | 3138c915-4baf-49ef-95b6-b202fbf744af | accept-blind-auth                   | true                                                                                         | false                       |
 6c89c959-39f3-4a4d-8498-9624bb53bbf8 | 3138c915-4baf-49ef-95b6-b202fbf744af | accept-blind-reg                    | true                                                                                         | false                       |
 58b9127a-5b8d-488c-9dde-5ff51eb751c4 | 3138c915-4baf-49ef-95b6-b202fbf744af | aggressive-nat-detection            | true                                                                                         | true                        |
 a375ef45-3bb8-4edc-b42a-0f4a47e81a28 | 3138c915-4baf-49ef-95b6-b202fbf744af | alias                               | sip:10.0.1.251:5555                                                                          | false                       |
 0a900d91-5513-4bfe-9758-f4954624db5b | 3138c915-4baf-49ef-95b6-b202fbf744af | apply-inbound-acl                   | domains                                                                                      | true                        |
 3054d7d4-43b4-4e95-833f-3038b353f3ed | 3138c915-4baf-49ef-95b6-b202fbf744af | apply-nat-acl                       | nat.auto                                                                                     | true                        |
 3c82ca07-8a92-43c0-b0b5-5b437ae947c3 | 3138c915-4baf-49ef-95b6-b202fbf744af | apply-register-acl                  | domains                                                                                      | false                       |
 cdc5b10a-aca4-4b28-ac37-0306a0a03b3b | 3138c915-4baf-49ef-95b6-b202fbf744af | auth-all-packets                    | false                                                                                        | true                        |
 9ddef294-e321-4084-8ddd-1b2c0f4d2d4d | 3138c915-4baf-49ef-95b6-b202fbf744af | auth-calls                          | $${internal_auth_calls}                                                                      | true                        |
 fd1249c1-a754-4491-8d7d-34569994f8c5 | 3138c915-4baf-49ef-95b6-b202fbf744af | auto-jitterbuffer-msec              | 60                                                                                           | false                       |
 734338bc-a32f-4711-8821-ab5d1b8dab6a | 3138c915-4baf-49ef-95b6-b202fbf744af | auto-rtp-bugs                       |                                                                                              | false                       |
 af6a150c-ce43-4d19-ad01-3396b0b3c79b | 3138c915-4baf-49ef-95b6-b202fbf744af | bind-params                         | transport=udp                                                                                | false                       |
<snip>
<snip>
 9f03cd1d-5dce-4262-8ccc-97656687a26b | 3138c915-4baf-49ef-95b6-b202fbf744af | vad                                 | out                                                                                          | false                       |
 554c5cad-0ee8-450a-85ba-3ff9ee6eac81 | 3138c915-4baf-49ef-95b6-b202fbf744af | watchdog-enabled                    | no                                                                                           | true                        |
 922a09f5-bc23-497e-a423-106f5a25d49d | 3138c915-4baf-49ef-95b6-b202fbf744af | watchdog-event-timeout              | 30000                                                                                        | true                        |
 37cceb9c-7e1c-4b0b-bf84-cc4061cd43d5 | 3138c915-4baf-49ef-95b6-b202fbf744af | watchdog-step-timeout               | 30000                                                                                        | true                        |
(121 rows)
 
Last edited:

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
psql --host=127.0.0.1 --port=5432 --username=fusionpbx

You will find your db password in /etc/fusionpbx/config.php

If you su to the postgres user you can connect without a password:

Code:
root@a2es-dev16:~# su - postgres
postgres@a2es-dev16:~$

postgres@a2es-dev16:~$ psql fusionpbx
psql (11.5 (Debian 11.5-1+deb10u1))
Type "help" for help.

fusionpbx=#
fusionpbx=# select * from v_domains;
fusionpbx-# quit
Use \q to quit.
 
Jul 15, 2021
102
9
18
34
Thank you for your help, the internal profile was present in the v_sip_profiles table, however the settings were not present in the v_sip_profile_settings - no rows returned. I have now recreated them based on internal-ipv6, this didn't have the wss-binding entry, I have just manually added it and rescaned the profile. No issues this time, the wss port is enabled and running. It appears to be a random bug, I am unable to reproduce the bug.


internal Profilesips:mod_sofia@192.168.1.2:7443;transport=wssRUNNING (0) (WSS)
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
I'm glad you have got it sorted.
Records disappearing in v_sip_profile_settings sounds like it could be a bug in the FusionPBX code. What FusionPBX version are you using?
 
Jul 15, 2021
102
9
18
34
Just noticed something, after restarting freeswitch alone using the command line, all the ringback tone's turned to US ringtone's (fusionpbx was configured with uk ring back tone). It appeared as if that the freeswitch's ringback field had been disabled. The reason for this conclusion is, in the logs there was no sign of ringback being provided - it was the client provided ringback.

I had to restart the individual profiles once again (not just rescan) to get this resolved.
 
Jul 15, 2021
102
9
18
34
There appears to be some issue with the code, I tried enabling wss on another profile - I did a backup this time in advance. However the profile didn't disappear. So far so good. The profile was already running TLS on a different port and all the certs were in place.

However when I added the wss-binding and port to the profile, the profile didn't restart. fs_cli console tried to restart the profile twice and emitted an error message saying either the sip port is in use or the IP that it is trying to bind is not local.

There was nothing on that port and the ip was correct, just to be sure, I used a different port, the log message showed the new port but again it didn't start.

The only way I could restart the profile was to disable TLS (I tried just disabling the wss-binding but it didn't restart), I am not sure why and what is causing this mess.

When I mean the profile didn't start, I mean the whole profile not just the wss-binding or TLS.

Restart of freeswitch/reboot of the server - nothing made the profile start - only recourse was to disable TLS.
 
Status
Not open for further replies.