Skip to content

Update ip address restriction at OVH when your dynamic ip address changes and reload asterisk dialplan

Notifications You must be signed in to change notification settings

mgrant0/ovh-freepbx-new-ip-addr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

ovh-freepbx-new-ip-addr

Update the ip address restriction at OVH (ovhtelecom.com) when your dynamic ip address changes and reload asterisk dialplan. This is useful if you have a SIP phone at OVH and you restrict access to your SIP account to a specific ip address for security reasons.

Written by Michael Grant

Ths script is Public Domain. Do what you want with this.
It may or may not work for you. Unsupported. No warranty. Always keep your keys secret and secure.

This perl script is to be run in cron. It checks your dynamic ip address to see when it changes. When it changes, it does 2 things:

  1. it connects to the OVH API and updates your IP restriction and
  2. it prods asterisk (freepbx in my case) to reload the dialplan Without this script, it required manual intervention both in freepbx and in my OVH account to get my phone working again.

Instructions for use:

  1. cpan -i OVH::OvhApi
  2. follow instructions here to get an api key: https://api.ovh.com/g934.first_step_with_api to get a CK
  3. copypaste the validationUrl into a browser, log in to OVH and validate your keys
  4. configure ip address, domain name and keys below
  5. add to cron to run once a minute: * * * * * /usr/local/bin/watch-for-new-ip.pl

About

Update ip address restriction at OVH when your dynamic ip address changes and reload asterisk dialplan

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages