# Lose registration when internet fails but not regain registration when internet comes back

**URL:** <https://wazo-platform.discourse.group/t/lose-registration-when-internet-fails-but-not-regain-registration-when-internet-comes-back/1313>\
**Category:** Installation/Configuration\
**Created:** [August 23, 2023, 3:41pm UTC](https://wazo-platform.discourse.group/t/lose-registration-when-internet-fails-but-not-regain-registration-when-internet-comes-back/1313 "2023-08-23T15:41:31Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramblin](https://yyz2.discourse-cdn.com/free1/user_avatar/wazo-platform.discourse.group/ramblin/32/34_2.png) [@Ramblin](https://wazo-platform.discourse.group/u/Ramblin)\
**Post date:** [August 23, 2023, 3:41pm UTC](https://wazo-platform.discourse.group/t/lose-registration-when-internet-fails-but-not-regain-registration-when-internet-comes-back/1313/1 "2023-08-23T15:41:31Z")

</div>

Anyone have any ideas on how to solve an issue with trunks NOT automatically returning to registering after an outage has ben restored, even after a system reboot?

I am having an intermittent issue which is ongoing and causing issues. Does anyone have configuration suggestions (or other suggestions) that could alleviate the issue?

I am on Wazo 23.10 on a Provmox VM. My 5 trunks are all with Vitelity. I have a fixed external IP address for my location and fixed internal IP address for the NATted Wazo server in my location.

This configuraiton has been in place for over a year and normally works very well for my small home/office installation with 8 landline IP Phones and a few other softphones occasionally connected.

The problem is when I lose internet connection, which can happen about once a month. The trunks connected to Vitelity lose registration when the internet connection goes down but if the internet outage is not a quick blip (ie lasts, say, 5 minutes or more), when the interent is restored, the trunks connected to Vitelity do NOT come back. Instead, when I enquire with  
`asterisk -rx "pjsip show registrations"`  
I get back, for each of the 5 Vitelity trunks a status of rejected.

The trunks will NOT re-register by themselves and will NOT re-register even if I reboot the system.

I need to shutdown the system and wait at least 15 minutes to start the system and then all is well again.

So it sounds like a firewall/fail2ban issue but I canot figure out what firewall/fail2ban issue would cause this, especially since a temporary (15 minute) shutdown and startup restores all to normal.

To say the least, not a good scenario. And since My “users” are my wife and daughter (and my clients and our friends who call), having them unhappy is not a good thing.

Unfortunately/Fortunately, the issue intermittent and troubleshooting/testing solutions is not easy to manage so I am asking if anyone has seen a similar issue and if so, what was their solution?

My trunk registration with Vitelity is set in a Template for all trunks and includes, in the Endpoint settings:  
`identify_by username,auth_username,ip`  
I include this bit if information since I read somewhere that NOT using IP registration is a potential issue but I want to be able to differentiate which trunks are in use so would prefer to keep the identify\_by setting as is but if it is causing the issue, then I will change.

I also read somewhere that if the provider sends a 403 (instead of 401) response to a lost registration this could cause the issue and in chan\_sip there was a setting called  
`register_retry_403=yes`  
but I cannot find an equivalent in chan\_pjsip nor would I know where to enter it using the Wazo GUI (which is what I use for all configurations)

So, I have exhausted my technical knowledge.

Anyone have any ideas on how to solve the issue of trunks NOT automatically returning to registering after an outage has been restored, even after a system reboot?

---

<div class="post-metadata">

**Author:** ![quintana](https://yyz2.discourse-cdn.com/free1/user_avatar/wazo-platform.discourse.group/quintana/32/916_2.png) [@quintana](https://wazo-platform.discourse.group/u/quintana)\
**Post date:** [August 23, 2023, 6:31pm UTC](https://wazo-platform.discourse.group/t/lose-registration-when-internet-fails-but-not-regain-registration-when-internet-comes-back/1313/2 "2023-08-23T18:31:12Z")

</div>

Can you check with sngrep? Trace is welcome for help.

---

<div class="post-metadata">

**Author:** ![Ramblin](https://yyz2.discourse-cdn.com/free1/user_avatar/wazo-platform.discourse.group/ramblin/32/34_2.png) [@Ramblin](https://wazo-platform.discourse.group/u/Ramblin)\
**Post date:** [August 23, 2023, 6:55pm UTC](https://wazo-platform.discourse.group/t/lose-registration-when-internet-fails-but-not-regain-registration-when-internet-comes-back/1313/3 "2023-08-23T18:55:05Z")

</div>

Thank you for the quick reply

All trunks are currently registered and working, so when it happens again, I can use sngrep to get the connection status at that time.

Is there anything you can suggest in the meantime that might be causing the issue?

---

<div class="post-metadata">

**Author:** ![quintana](https://yyz2.discourse-cdn.com/free1/user_avatar/wazo-platform.discourse.group/quintana/32/916_2.png) [@quintana](https://wazo-platform.discourse.group/u/quintana)\
**Post date:** [August 23, 2023, 7:09pm UTC](https://wazo-platform.discourse.group/t/lose-registration-when-internet-fails-but-not-regain-registration-when-internet-comes-back/1313/4 "2023-08-23T19:09:23Z")

</div>

Honestly i don’t know, i don’t think it’s an issue on Asterisk, but we need to have all informations. Sometimes it’s also an issue with the firewall packet inspector.

---

<div class="post-metadata">

**Author:** ![Ramblin](https://yyz2.discourse-cdn.com/free1/user_avatar/wazo-platform.discourse.group/ramblin/32/34_2.png) [@Ramblin](https://wazo-platform.discourse.group/u/Ramblin)\
**Post date:** [August 30, 2023, 9:04am UTC](https://wazo-platform.discourse.group/t/lose-registration-when-internet-fails-but-not-regain-registration-when-internet-comes-back/1313/5 "2023-08-30T09:04:15Z")

</div>

OK,

It happened again last night and I saved the pcap file for 4 of the rejected registrations. They are al sending “OPTIONS” but not attempting to Register.

I do not know how to send to you the pcap file since the forum only allows me to upload image files. I looked at sending you a message but it looks like it has the same upload restrictions.

How can I get the pcap file to you?

P.S. I am away for two days but will reply to any instructions you provide on my return.

---

<div class="post-metadata">

**Author:** ![quintana](https://yyz2.discourse-cdn.com/free1/user_avatar/wazo-platform.discourse.group/quintana/32/916_2.png) [@quintana](https://wazo-platform.discourse.group/u/quintana)\
**Post date:** [August 31, 2023, 11:47pm UTC](https://wazo-platform.discourse.group/t/lose-registration-when-internet-fails-but-not-regain-registration-when-internet-comes-back/1313/6 "2023-08-31T23:47:33Z")

</div>

Just send me on my e-mail, I’ll check.  
Sylvain

---

<div class="post-metadata">

**Author:** ![Ramblin](https://yyz2.discourse-cdn.com/free1/user_avatar/wazo-platform.discourse.group/ramblin/32/34_2.png) [@Ramblin](https://wazo-platform.discourse.group/u/Ramblin)\
**Post date:** [September 1, 2023, 12:17am UTC](https://wazo-platform.discourse.group/t/lose-registration-when-internet-fails-but-not-regain-registration-when-internet-comes-back/1313/7 "2023-09-01T00:17:42Z")

</div>

OK

But I need your email to do that … 🙂

I assume your email is NOT [notifications@wazo-platform.discoursemail.com](mailto:notifications@wazo-platform.discoursemail.com) , which is the email from which forum notifications are sent

If you want to keep your email off the forum, is a PM more secure?

Richard

---

<div class="post-metadata">

**Author:** ![quintana](https://yyz2.discourse-cdn.com/free1/user_avatar/wazo-platform.discourse.group/quintana/32/916_2.png) [@quintana](https://wazo-platform.discourse.group/u/quintana)\
**Post date:** [September 1, 2023, 12:29am UTC](https://wazo-platform.discourse.group/t/lose-registration-when-internet-fails-but-not-regain-registration-when-internet-comes-back/1313/8 "2023-09-01T00:29:52Z")

</div>

sylvain at wazo, you already sent me an e-mail, that why I don’t give you again ;-).

---

<div class="post-metadata">

**Author:** ![Ramblin](https://yyz2.discourse-cdn.com/free1/user_avatar/wazo-platform.discourse.group/ramblin/32/34_2.png) [@Ramblin](https://wazo-platform.discourse.group/u/Ramblin)\
**Post date:** [September 3, 2023, 6:22pm UTC](https://wazo-platform.discourse.group/t/lose-registration-when-internet-fails-but-not-regain-registration-when-internet-comes-back/1313/9 "2023-09-03T18:22:20Z")

</div>

I thought I had previously sent you an email but I guess I did not store the email address when I did. I will this time. I will PM you my email address so you can send me your email address.

Richard

---

<div class="post-metadata">

**Author:** ![sduthil](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@sduthil](https://wazo-platform.discourse.group/u/sduthil)\
**Post date:** [January 26, 2024, 9:52am UTC](https://wazo-platform.discourse.group/t/lose-registration-when-internet-fails-but-not-regain-registration-when-internet-comes-back/1313/10 "2024-01-26T09:52:04Z")

</div>

FYI the new PJSIP options replacing `register_retry_403` are:

- `forbidden_retry_interval` (in seconds, 0 by default)
- `fatal_retry_interval` (in seconds, 0 by default)

---

<div class="post-metadata">

**Author:** ![Ramblin](https://yyz2.discourse-cdn.com/free1/user_avatar/wazo-platform.discourse.group/ramblin/32/34_2.png) [@Ramblin](https://wazo-platform.discourse.group/u/Ramblin)\
**Post date:** [January 26, 2024, 2:52pm UTC](https://wazo-platform.discourse.group/t/lose-registration-when-internet-fails-but-not-regain-registration-when-internet-comes-back/1313/11 "2024-01-26T14:52:32Z")

</div>

@sduthil

Thank you for the feeback on the replacement for  
`register_retry_403`

I use the Wazo GUI so have entered them both into  
Menu → Call Management → Trunks  
{Select Trunk and Click Edit (pencil icon)}  
Registration

In my case, since I have multiple Trunks with Vitelity, I actually put the new settings into the Template for the Vitelity Trunks  
Menu → Advanced → Sip Templates  
{Select Template and Click Edit (pencil icon)}  
Registration

The good news:  
This sounds like it may be the solution

The Bad/Good news:  
Bad: I have ot been able to test solutions since @quintana offered to look at my sngrep output  
Good: The inability to test is because I have not had an outage with Vitelity so have not yet been able to take this further. So you may have saved Sylvain some time … 🙂

Thank you again
