Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Operator » Phone provisioning only for a specific IP adress range
  •  
link611

Messages: 106
Karma: 0
Send a private message to this user
Hi there,

i found this KB article: http://kb.kerio.com/product/kerio-operator/phone-provisionin g/editing-provisioning-templates-1532.html

The example "Changing a phone's language" is describing how to configure changes for a specific ip adress.


i want to set an option just for a specific IP adress range f.e. 192.168.5.0/24.


How can i do that?

  •  
Vladimir Toncar (Kerio)

Messages: 1696
Karma: 39
Send a private message to this user
Hi,

You need to test for the value of the variable $PHONE_IP. If it belongs to the given range, insert the option.
  •  
link611

Messages: 106
Karma: 0
Send a private message to this user
i know that.

but i need the syntax for that case.
  •  
Vladimir Toncar (Kerio)

Messages: 1696
Karma: 39
Send a private message to this user
The language used is PHP, so there are many possible solutions.

What about using the ip2long() function to convert the lower and upper bounds to numbers and then doing something like

if ($low_ip <= $PHONE_IP && $PHONE_IP <= $high_ip) {
echo "in range";
}
  •  
link611

Messages: 106
Karma: 0
Send a private message to this user
Thank you very much, is working perfectly


@ $range_low = ip2long('192.168.5.1');
@ $range_high = ip2long('192.168.5.254');
@ $ip_phone = ip2long($PHONE_IP);

@ if ($ip_phone > $range_low && $ip_phone < $range_high ) {


@ }
Previous Topic: SIP trunk supplier keeps blocking us with too many failed attempts
Next Topic: 1 extension, 2 registrations in one queue
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Thu Oct 19 01:57:03 CEST 2017

Total time taken to generate the page: 0.00431 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.