Howto:Limit number of calls and call duration on some extensions

From innovaphone-wiki

Jump to: navigation, search

The following xml solves a particular problem: a customer want limit the number of internal calls between extensions, and also the duration of such a call. For example user A should be able to call user B just 5 times in a day. And the duration of a call between A and B should not be longer than 2 minutes. Not for all extensions, only for some and also just for internal calls. How? Using a small xml script, here we go.

Contents

Applies To

This information applies to

  • All Innovaphone devices with PBX functionality
  • V12 and up

How it works

The basic principle is that a fix call diversion (CFU) can be set direct in the PBX; this is called “administrative CFU”. Such a fix CFU is not visible on the phone and the user cannot cancel or modify this setup. An administrative CFU can be assigned individually for each user and also be limited for just internal calls. The user with that feature on has an administrative CFU for all internal calls to a XML. The destination of the CFU is our XML, the XML will check the number of calls and if the number is under the threshold forwards the call to the original destination. This is possible because the destination of a CFU can reach the original call destination. The duration of the call will be controlled by a timer started before transferring the call; when the timer expired the call will be terminated. The number of calls to a destination is stored in a file, named with the calling extension. So each time the same internal uiser calls his counter will rise. If the threshold is reached a message (“You have exited the maximum number of calls today”) is played and the call released. If no message file is there the call is simply released. The daily reset is done comparing the creation day of the file with the actual day; if not equal the counter is set to one call again.

Setup

The defualt values in the xml are 4 calls and 30 seconds. Open the xml file with the editor and set the maximum number of calls (value="4") and the timeout (sec = 30) to the values you need, save the file, create a directory on the CF/webdav/mSata and copy the XML and the Voice prompt in. Then create a VM Object pointing on the xml and the option "$_pbxfwd=true".

Image:CallLim01.PNG

Now configure an administrative CFU on the user with the internal filter (in our example the number of the xml is 69):

Image:CallLim02.PNG

Done, have fun!

Known problems

The timer in the XML starts with the call transfer, therefore the ringing time counts as calling time. If you limit for example the timer on 30 seconds and the user answers the call just after 5 seconds the connection time will drop down after 25 seconds.

Because of the slow Compact Flash on older innovaphone gateways reading and writing cannot be done immediately. Therefore in the XML a 1 second delay is in, if you use a fast webdav for example in a VMware you can simple delete the line (Waiting=1) to fasten up the call transfer.


Related Articles

http://download.innovaphone.com/ice/wiki-src/ - download the complete file package of scripts and files described in this article.

Personal tools