I already tried to set the option “register_retry_403=yes”, but this does not work in that case.
At the moment the only way is a
“fwconsole reload”
command to force a “re-register”.
Registration Attempts is already set to “0” and the timeout is set to 20.
So in the case of a “Rejected” there has to be done something other to force a re-register.
Can someone help me please? At the moment i wrote a script, which runs as a cronjob, that checks the registry state and forces a reload when the state “Rejected” occours, but this is not really a solution.
Did you solve this issue?? I’m experimenting the same on one site, and need to reload to get registered again. And it normally happens on bad moments that you need to reload quickly to get poeple on the phone again.
I also se the register_retry_403 but didn’t solve it neither, and on the logs I have no info
i got some new trunk settings from my provider and had no issues in the past.
But for sure i wrote a Script which checks the connection every minute and reloads asterisk in the case of the state “Rejected”.
Maybe it is a workaround for you.
Then make the cronjob as root user:
If you make the cronjob with the asterisk user, it can happen, that freepbx does not autostart anymore on boot if you use the SNG7 distro!
export VISUAL=nano; crontab -e
add the line: * * * * * su asterisk -c "/usr/bin/php /home/asterisk/checkregistry.php" >/dev/null 2>&1
This is my workaround in the case that the trunk turns into “rejected”.
Asterisk will reload.
The reloadlog shows you when this happened.
I do not give any warranty for this. Use this at your own risk!!!
Thanks for your quick reply. I’ve setup your script, keeping an eye when it happens again.
When you got the “Rejected” status of the trunk, did you have any info logged in the asterisk log?? On my site the only issues I’ve seen was that the trunk was unreachable and afterwards reachable.
[2017-11-27 05:00:30] NOTICE[2289] chan_sip.c: Peer 'trunkxxx' is now UNREACHABLE! Last qualify: 13
[2017-11-27 05:01:34] NOTICE[2289] chan_sip.c: Peer 'trunkxxx' is now Reachable. (11ms / 2000ms)
After this normally it’s rejected without any other notices.
Did the new trunk settings connect to the same trunk or did they change it completly??
I will give you some feedback to confirm script is working as soon I get a rejected!
Sorry i cannot remember the logs anymore. It is already over a month ago since i had the issues.
I changed my trunk settings. My incoming settings are completely empty now. Everything is set under “outgoing”.
The only incoming setting is the registry string.
The script just executes “fwconsole reload” and writes a timestamp into the logfile “reloadlog.txt” if there is a registry with the value “Rejected”. For me it worked.
By the way i strongly recommend you to use the Sangoma RMS Services!!! @tonyclewis am i right that the Sangoma RMS Service can monitor the trunks out of the box without any knowledge of developing plugins or something else?
ohh i missed that information. I thought RMS is already available to buy.
In my case i use omdistro with CheckMK and Nagios Plugins for Asterisk to monitor the PBX Systems.
But i do not recommend it to anyone else because the setup is not easy and you have to know how to work with nagios plugins.
However if someone wants to build his own monitoring Server, try your luck with the sources below.
You need to change the crontab from the Script. I had an issue today.
The Script worked as it should and putted an entry into the reloadlog file.
But the fwconsole reload command did not work from crontab.
Hi @mitterhuemer , thanks for the update. The last weeks it seems to be working without any incident until yesterday, and your script did the work properly!
(I had to change /sbin/fwconsole to /bin/fwconsole as the distro I’m using has a different path)
My provider says this is a asterisk bug. Asterisk looses the connection and then it does not send the password anymore inside the registry string until the next kernel reload.
The provider sent me his logfiles.
Dec 11 10:05:25 spce proxy[29846]: NOTICE: <script>: Authentication failed, no credentials - R=sip:sip.myprovider.at ID=0aa3a5f24d9596eb2d248edf36c3a952@[::1] UA='FPBX-14.0.1.19(13.17.2)'
I have to ask Mr. @tm1000 if i can have a key to sign modules, i dont want to make a unsigned module public.
@pietervos i will only test my scripts in the official SNG7 Distro.