SOLVED Skyetel Dynamic IP Address Support

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
FYI: You may need to make the following adjustment to install the jq package on your server although most Incredible PBX platforms already include it:
Code:
yum -y install coreutils curl git epel-release
yum -y --enablerepo=epel install jq
 

SJ ILAGAN

New Member
Joined
Mar 9, 2019
Messages
1
Reaction score
0
Ward, is there a way to test functionality? My ip updated but was not updated on Skyetel. (I gave it 1hr+) I looked at the logs but didn't see an error in the cron log. Thanks.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Easiest way is to point a DID to your endpoint and make a call to the DID.
 

GBoone

New Member
Joined
Oct 11, 2019
Messages
12
Reaction score
9
Followed the install guide for Raspberry Pi. The new endpoint group was created in Skyetel and the initial IP address was populated. Subsequent public IP address changes have not updated to the endpoint. I don't see a new cron entry, nor am I am able to find logging for the cron when run. Any tips on what to check in logs or the cron job to ensure that install is applied correctly?
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Followed the install guide for Raspberry Pi. The new endpoint group was created in Skyetel and the initial IP address was populated. Subsequent public IP address changes have not updated to the endpoint. I don't see a new cron entry, nor am I am able to find logging for the cron when run. Any tips on what to check in logs or the cron job to ensure that install is applied correctly?

Have you contacted Skyetel for support??
 

GBoone

New Member
Joined
Oct 11, 2019
Messages
12
Reaction score
9
Skyetel was unable to provide support to resolve the issue. They did reference that dev was done on cent0s 6 & 7 and they are not familiar with raspberry pi. I provided the following to them in my troubleshooting efforts so far.

I see the entry ip-update-endpointgroup.cron in /etc/cron.d
root@incrediblepbx:/etc/cron.d# ls
anacron ip-update-endpointgroup.cron php
root@incrediblepbx:/etc/cron.d#


I also see the shell file is present at the path specified in the cron
root@incrediblepbx:/etc/cron.d# ls /usr/local/bin/ip-update-endpointgroup.sh
/usr/local/bin/ip-update-endpointgroup.sh


But, when looking at the cron log file the ip-update-endpointgroup.cron is never showing as having run.
When listing all cron jobs for root, the system is reporting there are no cron jobs listed for root, but this would conflict with the cron showing in /etc/cron.d as the ls in /etc/cron.d directory shows
root@incrediblepbx:/etc/cron.d# crontab -l
no crontab for root


Also when searching the system for local0.notice there is no entry returned for the log file. This would make sense as the cron never ran, so there would be no instruction for the log file to generate received.
root@incrediblepbx:/etc/cron.d# find . local0.notice
.
./anacron
./.placeholder
./php
./ip-update-endpointgroup.cron
find: 'local0.notice': No such file or directory
root@incrediblepbx:/etc/cron.d#


I am really not sure where to go from here, but am wondering if the cron should be running under user asterisk and not root?
 

rampageai

New Member
Joined
Oct 11, 2019
Messages
3
Reaction score
3
Hi Greg,
The name "local0.notice" is referring to a facility and log level combination so you will not find it as file name. "local0" is a 'facility' used by rsyslog to decide where to put log messages that are created and 'notice' is a log level about the same level as "informational" -- maybe a bit higher.

When logs messages are sent to that combination they will probably be directed to one your log files in /var/log folder. If you are having trouble finding them then it's possible you could remove the "| logger" portion in your cron script and cron will try to handle the output of the script as best as can.

I am not sure what operating system you are working with on your Raspberry Pi but it is also possible that it does not run cron.d scripts. If it doesn't then you can take the contents of the cron.d script and move it into your main /etc/crontab file. If there is reference to cron.d script inside of your main /etc/crontab files then it is probably being run like normal.

I hope some of that gives you a few hints to help.
 

GBoone

New Member
Joined
Oct 11, 2019
Messages
12
Reaction score
9
Thank you for the tips rampageai. The version is "Raspbian GNU/Linux 10 (buster)". I don't think running cron.d is an issue with the os release as there are entries in cron.log such as Ward's ipchecker that is an entry in cron.d.

I have taken the step to move the skyetel cron entry to crontab and now see the following in cron.log and am thinking this is good progress.

Oct 11 21:40:01 noreply CRON[19273]: (root) CMD (/usr/local/bin/ip-update-endpointgroup.sh 2>&1 | logger -p local0.notice -t ip-update-endpointgroup.sh)

I will monitor overnight to confirm the new IP is pushed to skyetel with the new entry in crontab now running. The IP generally refreshes after the scheduled router reboot that occurs early morning hours. The happy path is the new IP is showing in the endpoint config.

Pipping logger -p is something that I am not familiar. Where would I look for the resulting log file to review?
 

rampageai

New Member
Joined
Oct 11, 2019
Messages
3
Reaction score
3
Pipping logger -p is something that I am not familiar. Where would I look for the resulting log file to review?

Piping to logger is just a way of jacking into the operating system's method of logging. The "-p X.Y" option is just telling the logging system where to send the log message (facility) and how important it is (log level). It's a somewhat portable way to let Raspbian, CentOS, or Debian choose whatever their 'normal' log files are use them.

Here are some details about facilities and log levels: http://man7.org/linux/man-pages/man1/logger.1.html#FACILITIES_AND_LEVELS

In Raspbian it looks like this will most likely send any standard output from the script to /var/log/syslog based on what I am reading here: http://blog.scphillips.com/posts/2015/05/raspberry-pi-system-logging-and-loggly/

You can test this theory by sending a test message into the logging system

echo "This a test. DON'T PANIC." | logger -p local0.notice -t TESTING

That message *should* then appear in /var/log/syslog on your system. If it doesn't then perhaps try omitting the "-p local0.notice" and see if it shows up by default.

If your test works but the script doesn't send any output then perhaps it is simply not generating any output for logging.
 

GBoone

New Member
Joined
Oct 11, 2019
Messages
12
Reaction score
9
Moving the entry to crontab did not result in the IP being updated. However, after digging around the interwebs for additional information on running jobs in cron.d in Rasbain I came across an entry that referenced that in Raspbian files in cron.d folder should not have an extension.

The fix for running the update utility on a Pi is copy or rename the ip-update-endpointgroup.cron file without the .cron extension. In my case, I did the following to preserve the original file:

root@incrediblepbx:~# cp /etc/cron.d/ip-update-endpointgroup.cron /etc/cron.d/gbip-update-endpointgroup

To validate, I checked the public-facing ip of the router, rebooted the router to force public IP change, checked skytele dashboard to confirm that the endpoint was offline as the public IP had changed, waited for the cron.d to run at next scheduled time and confirmed via skyetel dashoard the ip had changed and the endpoints were on line again.

I will continue to monitor for the next few days, but it seems the script is working as it should for the ip updates.

Thanks for the insights and pointers rampageai.
 

Deltahotel

New Member
Joined
Jul 30, 2018
Messages
8
Reaction score
1
I tried to follow along to fix mine but no luck... Is there a step by step on how to get my sketel linked back up with my server?
 

Deltahotel

New Member
Joined
Jul 30, 2018
Messages
8
Reaction score
1
Have you contacted @Skyetel for assistance??

Yes, I kind of got a generic response.

"You can see this for yourself here: https://login.skyetel.com/#endpoints/health

Would you please double check your settings on your PBX and review you firewall settings? We do need all of our IPs configured and whitelisted. You can check out our PBX guides here:
https://skyetel.atlassian.net/wiki/x/PYBm

The IPs are unchanged and may always be found here: https://skyetel.atlassian.net/wiki/spaces/SUG/pages/6619143/Skyetel+IP+Addresses

You can also check this guide to run through common bugs:
https://skyetel.atlassian.net/wiki/x/AQAUJ

I'd also strongly recommend enabling Endpoint Alerting. That way you will get an alert the next time your system is not responding to our network. You can learn about that here: https://skyetel.atlassian.net/wiki/x/AYCK
Thanks!"
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
@Deltahotel: If none of their suggestions solved your problem, then you obviously need to let them know that. Otherwise, they have no way of knowing that you're still having a problem.
 

rampageai

New Member
Joined
Oct 11, 2019
Messages
3
Reaction score
3
@Deltahotel If it helps with your troubleshooting, the only way that Endpoint Health will appear as "red" is if Skyetel's published IP addresses are actively sending SIP messages to your IP address and not getting a response back. That is almost always caused by a firewall preventing the messages arriving at your PBX, or your PBX is not configured to respond to the messages, or maybe your IP has changed?
 

Deltahotel

New Member
Joined
Jul 30, 2018
Messages
8
Reaction score
1
@Deltahotel If it helps with your troubleshooting, the only way that Endpoint Health will appear as "red" is if Skyetel's published IP addresses are actively sending SIP messages to your IP address and not getting a response back. That is almost always caused by a firewall preventing the messages arriving at your PBX, or your PBX is not configured to respond to the messages, or maybe your IP has changed?
OH MY LORD!! What a rookie mistake! It was my IP address on my end. We been getting a lot of power outages because of the high winds in NY. One visit to whatsmyip.org and then updated on the Skyetel endpoint and BAM everything went green again! Thanks ramageai!
 

beaglemaster

New Member
Joined
Nov 26, 2019
Messages
1
Reaction score
0
I installed the skyetel script to update the dynamic IP address. The script uses a service to restart asterisk. I am running the 13-13 incrediblepbx on RPi3 and noticed that there is not a service for asterisk. I have checked asterisk on how to create a service for asterisk but that failed. Do you have a script that will create a service or should I modify the script to run "fwconsole restart" instead?

Thanks
 

Members online

Forum statistics

Threads
25,778
Messages
167,504
Members
19,198
Latest member
serhii
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top