Registration problem/ UDP

Hi guys,

I need a little help, i’m sure it’s something stupid but i cannot find what it is.

I’m using Freepbx 16.24.0 on VMware (Cloud Telephony), i have over 20 virtuals machines working very well. And i use only yealink deskphone and Gigaset dect.

But sometimes, on client side, the phone loose is registration, it seems we cannot register the phone. Even when i restart the phone / dect nothing happened but if i switch to TCP most of the time it works.

And randomly at some point it will be blocked again and i will have to switch.
Usely i put on UDP or automatically but even on automatically mode it stopped randomly

I did put on asterisk sip settings my external ip adress which is redirected by a domain name, local network correspond to the local network of client.
RTP port are wide open request from provider: 1024-65534
I use the classic 5060 in UDP.
Due to that on some server i had to activate both TCP/UDP on sip settings

I am missing something clearly and i don’t know what.

Is anyone had this kind situation?

Kind Regards

Is it being blocked by the Responsive Firewall/Fail2Ban? Does the client side have a static IP that the traffic comes from, that you can put on the allowed list? Review the FreePBX logs to see if you can see the event.

Hi, thanks for replied and sorry about my late answer, iam quiet busy at the moment.

The client has a static public IP on internet and the IP is Whitelist into “Intrusion detection” and on Network its on trusted (excluded from firewall).

On responsive firewall, it’s on but SIP protocole(pjsip) is disabled.
I checked on putty avec le fail2ban-client status nothing into the jail
Where should i look ?

Kind Regards

Look for the registration failures on the Asterisk Full Log: /var/log/asterisk

Look for the registration failures on the Yealink: Yealink Logs

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

Hello everyone, i’m back with my unsolve topic.

I cannot find what’s going on. I explain:

I’m using Freepbx on Cloud server, Freepbx version is FreePBX 16.0.40.4 or latest, Phone side, i’m using Yealink for desktop and Gigaset N510 for DECT, my problem is with the Gigaset.

Most of the times i’m using this setting usually i used UDP only but due to my problem i have to put both.

The problem is that i’m losing registration, the phones are registers, it works and then someday nothing
sometimes i restart the dect and it work, but most of the times i have to change protocol, on those gigaset i have 3 choices (UDP only- TCP only, automatic), i tried all 3 same problem.
I tried to change the refeshing time from 3600 to 1s


same issue a little better.

And once i start to change one extension the rest follow, it’s like it unlock the registration process
some extension register alone some other i have to change the protocol from udp to TCP for example

i have this on many servers. 2 days ago we had major internet provider breaking during 3 hours on multiple providers, i had this problem on 3 servers impossible to register on UDP, i tried, restarted the freepbx, the VM, the phone, the internet box, all of it nothing i had to change the protocol and it started to get register on TCP and some of them on UDP

I really don’t understant, last time, someone told me to look into logs, which i did, don’t know really where to look so many logs… but i had a look again this morning and i found this:

23-11-07 17:59:07] VERBOSE[7881][C-0000178a] app_stack.c: Spawn extension (ext-group, h, 1) exited non-zero on ‘PJSIP/Trunk_control-00006209’
[2023-11-07 17:59:07] VERBOSE[7881][C-0000178a] app_stack.c: PJSIP/Trunk_control-00006209 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
[2023-11-07 18:22:06] VERBOSE[5819] res_pjsip/pjsip_configuration.c: Endpoint 40 is now Unreachable
[2023-11-07 18:22:06] VERBOSE[5819] res_pjsip/pjsip_options.c: Contact 40/sip:[email protected]:5843;x-ast-orig-host=192.168.1.137:5060 is now Unreachable. RTT: 0.000 msec
[2023-11-07 18:22:23] VERBOSE[25978] res_pjsip/pjsip_configuration.c: Endpoint 42 is now Unreachable
[2023-11-07 18:22:23] VERBOSE[25978] res_pjsip/pjsip_options.c: Contact 42/sip:[email protected]:5843;x-ast-orig-host=192.168.1.137:5060 is now Unreachable. RTT: 0.000 msec
[2023-11-07 18:22:28] VERBOSE[15210] res_pjsip/pjsip_configuration.c: Endpoint 41 is now Unreachable
[2023-11-07 18:22:28] VERBOSE[15210] res_pjsip/pjsip_options.c: Contact 41/sip:[email protected]:5843;x-ast-orig-host=192.168.1.137:5060 is now Unreachable. RTT: 0.000 msec
[2023-11-07 18:22:30] VERBOSE[2930] res_pjsip_registrar.c: Removed contact ‘sip:[email protected]:5843;x-ast-orig-host=192.168.1.137:5060’ from AOR ‘41’ due to expiration
[2023-11-07 18:22:30] VERBOSE[2930] res_pjsip_registrar.c: Removed contact ‘sip:[email protected]:5843;x-ast-orig-host=192.168.1.137:5060’ from AOR ‘42’ due to expiration
[2023-11-07 18:22:30] VERBOSE[2930] res_pjsip_registrar.c: Removed contact ‘sip:[email protected]:5843;x-ast-orig-host=192.168.1.137:5060’ from AOR ‘43’ due to expiration
[2023-11-07 18:22:30] VERBOSE[25978] res_pjsip/pjsip_options.c: Contact 41/sip:[email protected]:5843;x-ast-orig-host=192.168.1.137:5060 has been deleted
[2023-11-07 18:22:30] VERBOSE[22519] res_pjsip/pjsip_options.c: Contact 42/sip:[email protected]:5843;x-ast-orig-host=192.168.1.137:5060 has been deleted
[2023-11-07 18:22:30] VERBOSE[15210] res_pjsip/pjsip_options.c: Contact 43/sip:[email protected]:5843;x-ast-orig-host=192.168.1.137:5060 has been deleted
[2023-11-07 18:22:30] VERBOSE[15210] res_pjsip/pjsip_configuration.c: Endpoint 43 is now Unreachable
[2023-11-07 18:23:00] VERBOSE[2930] res_pjsip_registrar.c: Removed contact ‘sip:[email protected]:5843;x-ast-orig-host=192.168.1.137:5060’ from AOR ‘40’ due to expiration
[2023-11-07 18:23:00] VERBOSE[5819] res_pjsip/pjsip_options.c: Contact 40/sip:[email protected]:5843;x-ast-orig-host=192.168.1.137:5060 has been deleted
[2023-11-08 03:11:01] VERBOSE[2867] asterisk.c: Remote UNIX connection
[2023-11-08 03:11:01] Asterisk 16.30.0 built by mockbuild @ jenkins7 on a x86_64 running Linux on 2023-01-16 06:28:26 UTC
[2023-11-08 03:11:01] VERBOSE[6084] logger.c: Asterisk Queue Logger restarted
[2023-11-08 03:11:01] VERBOSE[6084] asterisk.c: Remote UNIX connection disconnected
[2023-11-08 03:11:01] VERBOSE[2867] asterisk.c: Remote UNIX connection

Any help is welcome
Thanks a lot for your time

This sounds like an issue with your firewall’s NAT tables. What’s sitting between your phones and the internet? You may have to look there and make sure that the firewall isn’t dropping the NAT info for your phones. Possibly look into disabling SIP ALG on your firewall if it’s got it enabled by default.

Does the phone need a proxy server and port?
Registration refresh time 1s is quite un-usual.
In general, STUN needs not to be enabled.

Thanks for your replies

To dobrosavljevic:
i know about SIP ALG, its always disabled
Most of the time i have an internet box on client side (IP is static) and that’s it, some of them has a Pfsense
Usually i open a range port if its a pfsense RTP:10000-50000 and SIP 5060-5090 on the IP of those problematic equipement. But still the problem happens.
On freepbx side, i opened lots of address due to prerequisites of the trunk operator (unyc), on firewall/network and Firewall intrusion detection
Responsive firewall is on but sip protocol is disabled as well as Fail2ban Bypass


On external adress i have the server IP

I have nothing else in between

To guenni:

I never used proxy on phones, neither STUN.

What time do you preconise before that bug, i used to put between 1200 to 3600

Kind Regards

Hi guys,

Anyone has a clue or had experienced something similar ?

Thanks a lot

I would really hope that Asterisk rejects that with a 423 response, but I’m not sure there is any min-expires, and I don’t know what FreePBX sets this to. I’d suggest that anything less than 60 seconds is going to be be unreasonable.

Thanks for your reply david55. I 'll try that.

some strange points on your sip settings picture:

  1. Most important: Neither chan-sip nor pjsip is marked dark green (both are light green). First conclusion out of this: Neither chansip (e.g. UDP 5160) nor pjsip (UDP/TCP 5060) are running. This might be o.k. as long as no secure connect is required (TLS).
  2. RTP port range should be 10.000 - 20.000. It depends on the number of expected simulatneous calls (2 per call) e.g. for 100 simultaneous calls 10.000 - 10.200 would be enought. I asume that there might be port conflict setting 1024 - end.
  3. Try to delete the external adress and the local network range and do fwconsole reload and fwconsole restart.
  4. Next disable firewall or better allow 192.168.1.0/24 in your intrusion detection (like my 192.168.2.0/24)

You may show your port also in firewall menue at:

Thanks mate, i made the changes as you say,
I’m not using TLS. I change the RTP port ( i put that much because of the trunk provider asked me that range), i did the other thing too. I will monitor it now and let you know

Here the capture you asked.

Thanks a lot for your help , i get back to you if something happened

Hi guys,

i got some update for you, for about 2 weeks its seems working and then today, 3 clients went down for this reason.
What i observed is, all dect phone are unregister (on gigaset dect there is 3 mode automatic- UDP only - TCP only)
If i was on UDP only for example, i change my first extension to automatic or TCP then the extension will register and all the others will register too without modifying something, if i go back to first and put the original value, it still register.

Its like something is blocking and after a modification, it unlock all

Did you experienced this ? it’s weird and a little tricky

Thanks guys for your time

Kind Regards

Hi guys, anyone had this issue ?

If i resume, it register on TCP or UDP and randomly at some point it loose th connection, it can be 1 day like 1 month later, then all phone appears unregistered.
I have to change swap whatever setting i have if TCP i put UDP and the other way around
and it registered until next error.

Kind regards