Voip.ms - Endpoint voipms is now Unreachable

I have a few trunks configured the same way: pjsip, expiration=3600, qualify freq. = 120. Nothing special there. One of them is voip.ms and I had an issue that calls thru this trunk would randomly fail. The next try would always be fine. So I checked the logs and this is the error:
[2023-04-23 15:25:37] ERROR[12365] res_pjsip.c: Endpoint ‘voipms’: Could not create dialog to invalid URI ‘voipms’. Is endpoint registered and reachable?

And I looked back and 1-3 times every hour the trunk becomes “unreachable” for two minutes, perhaps it’s less but the trunk is qualified every two minutes. Other trunks, even being in another country, work well and never cause issues. I was thinking maybe changing expiration time from 60 minutes to say 10 would help, but sometimes it fails just 10 minutes apart, which makes no sense to me. Anyone having same problem? Not sure what to do. Change expiry to 5 min? Do not qualify the trunk at all? Anything seems just like a bad workaround.

[2023-04-23 04:22:10] VERBOSE[12365] res_pjsip/pjsip_configuration.c: Endpoint voipms is now Unreachable
[2023-04-23 04:22:10] VERBOSE[12365] res_pjsip/pjsip_options.c: Contact voipms/sip:[email protected]:5060 is now Unreachable. RTT: 0.000 msec
[2023-04-23 04:24:07] VERBOSE[12365] res_pjsip/pjsip_configuration.c: Endpoint voipms is now Reachable
[2023-04-23 04:24:07] VERBOSE[12365] res_pjsip/pjsip_options.c: Contact voipms/sip:[email protected]:5060 is now Reachable. RTT: 80.110 msec
[2023-04-23 04:40:10] VERBOSE[12329] res_pjsip/pjsip_configuration.c: Endpoint voipms is now Unreachable
[2023-04-23 04:40:10] VERBOSE[12329] res_pjsip/pjsip_options.c: Contact voipms/sip:[email protected]:5060 is now Unreachable. RTT: 0.000 msec
[2023-04-23 04:42:07] VERBOSE[12329] res_pjsip/pjsip_configuration.c: Endpoint voipms is now Reachable
[2023-04-23 04:42:07] VERBOSE[12329] res_pjsip/pjsip_options.c: Contact voipms/sip:[email protected]:5060 is now Reachable. RTT: 74.531 msec
[2023-04-23 04:44:10] VERBOSE[12365] res_pjsip/pjsip_configuration.c: Endpoint voipms is now Unreachable
[2023-04-23 04:44:10] VERBOSE[12365] res_pjsip/pjsip_options.c: Contact voipms/sip:[email protected]:5060 is now Unreachable. RTT: 0.000 msec
[2023-04-23 04:46:07] VERBOSE[12365] res_pjsip/pjsip_configuration.c: Endpoint voipms is now Reachable
[2023-04-23 04:46:07] VERBOSE[12365] res_pjsip/pjsip_options.c: Contact voipms/sip:[email protected]:5060 is now Reachable. RTT: 56.563 msec
[2023-04-23 05:16:10] VERBOSE[12329] res_pjsip/pjsip_configuration.c: Endpoint voipms is now Unreachable
[2023-04-23 05:16:10] VERBOSE[12329] res_pjsip/pjsip_options.c: Contact voipms/sip:[email protected]:5060 is now Unreachable. RTT: 0.000 msec
[2023-04-23 05:18:07] VERBOSE[12329] res_pjsip/pjsip_configuration.c: Endpoint voipms is now Reachable
[2023-04-23 05:18:07] VERBOSE[12329] res_pjsip/pjsip_options.c: Contact voipms/sip:[email protected]:5060 is now Reachable. RTT: 80.810 msec
[2023-04-23 06:06:10] VERBOSE[12365] res_pjsip/pjsip_configuration.c: Endpoint voipms is now Unreachable
[2023-04-23 06:06:10] VERBOSE[12365] res_pjsip/pjsip_options.c: Contact voipms/sip:[email protected]:5060 is now Unreachable. RTT: 0.000 msec
[2023-04-23 06:08:07] VERBOSE[12365] res_pjsip/pjsip_configuration.c: Endpoint voipms is now Reachable
[2023-04-23 06:08:07] VERBOSE[12365] res_pjsip/pjsip_options.c: Contact voipms/sip:[email protected]:5060 is now Reachable. RTT: 74.788 msec
[2023-04-23 06:34:10] VERBOSE[12329] res_pjsip/pjsip_configuration.c: Endpoint voipms is now Unreachable
[2023-04-23 06:34:10] VERBOSE[12329] res_pjsip/pjsip_options.c: Contact voipms/sip:[email protected]:5060 is now Unreachable. RTT: 0.000 msec
[2023-04-23 06:36:07] VERBOSE[12329] res_pjsip/pjsip_configuration.c: Endpoint voipms is now Reachable
[2023-04-23 06:36:07] VERBOSE[12329] res_pjsip/pjsip_options.c: Contact voipms/sip:[email protected]:5060 is now Reachable. RTT: 57.442 msec
[2023-04-23 06:52:10] VERBOSE[12365] res_pjsip/pjsip_configuration.c: Endpoint voipms is now Unreachable
[2023-04-23 06:52:10] VERBOSE[12365] res_pjsip/pjsip_options.c: Contact voipms/sip:[email protected]:5060 is now Unreachable. RTT: 0.000 msec
[2023-04-23 06:54:07] VERBOSE[12329] res_pjsip/pjsip_configuration.c: Endpoint voipms is now Reachable
[2023-04-23 06:54:07] VERBOSE[12329] res_pjsip/pjsip_options.c: Contact voipms/sip:[email protected]:5060 is now Reachable. RTT: 56.501 msec

Try setting qualify_timeout to e.g. 16. If your FreePBX doesn’t have this setting for your trunk (I don’t remember when this was implemented), add the following two lines to /etc/asterisk/pjsip_custom_post.conf
[voipms](+type=aor)
qualify_timeout=16

From a root shell prompt do
fwconsole restart

after that’s complete, from an Asterisk command prompt type
pjsip show aor voipms
and confirm that qualify_timeout is now 16.

Then see whether that reduces or eliminates the Unreachable occurences.

1 Like

Thank you, that helped, no more “unreachable” in the logs. Too bad it’s not in the pjsip settings.

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