Howto:Voicemail Scripting And Projektcode, PIN, Auth Code

From innovaphone-wiki

Jump to: navigation, search

Contents

Applies To

This information applies to

  • V6 SR2 HF7 and later

More Information

Some scenarios require project-based billing. Some others require people to login by means of entering a PIN before trunk access is going to be granted. This article sketches a solution for both of such demands by means of a downloadable and license-free voicemail script template.

Problem Details

A fictional customer drafted a specification where outgoing trunk calls shall be billed to some sort of project numbers. Trunk calls can only be accessed by PBX users having passed a login process. I.e. by entering an authentication code, respectively a PIN. The authentication server will be a PC+Webserver+PHP-scripting. The voicemail script acts as authenticator and keeps "talking" to the authentication server, in order to modify the configuration of PBX users seeking this service.

Possibility the PINs can be listed and check directly in the VM loginout-script. A Webserver, php and database isn't required. For this, the VM script needs to be modified.


Specification

The following rough specification outlines the main requirements of the fictional scenario:

  • Logging in
    • Users must login by calling into a voicemail 77 and by entering a 7-digit PIN.
      • Users will be immediately prompted to enter their PIN by Please, enter your PIN. A reprompting after 1s shall be in place.
      • If a reprompting took place, the PIN must be entered completely new (all 7 digits).
      • Users have two attempts to enter their PIN correctly. I.e. one failure/typo is allowed.
      • After 5s of no user-input the connection will be actively disconnected.
      • Successfully authenticated users will be prompted with a beep. Followed by an automatic call termination.
      • If an authenication fails, users will be informed. Followed by an automatic call termination.
    • A PC+Webserver is going to be granting access by investigating the entered PIN.
      • It is the PC returning the values for the user filter and for the user URL (s.b.).
    • If access is granted the user will be configured a filter Trunk_PIN, allowing to access a trunk line.
    • If access is granted the user will be configured the value 0815 as URL. This value serves as the project number mentioned above.
    • If access is granted a function key LED is lit up on the user's phone.
    • The LED shall even reflect the current login-status when the phone gets rebooted. The Login-status will be derived from the name of the currently configured user filter (Trunk_PIN => Logged-In, otherwise => Logged-Out).
  • Logout
    • Users must logout at the end of their working hours by pressing the configured function key.
    • The logout process shall inform with Please, wait... followed by You're logged out now.
    • After being logged out the user will be configured a filter noTrunk, revoking the right to access a trunk line.
    • After being logged out the user will be configured an emptied URL.
    • The logout process automatically terminates the call.
  • CDRs
    • Call Detail Records must contain the content of a user-URL. The user-URL will be holding information (e.g. project code or the PIN itself) that is returned by the PC during the login process.
    • User-URLs appear within CDRs as src_url.

Configuration

You may live-test the sample solution by running the voicemail script attached to this article.

  • Preconditions:
    • The sample script assumes the testing box to reside at the IP address 172.16.16.147. You must adapt all ocurrences of this address within the script and within the configured Script URL according to your needs.
    • For simplification purposes, the PC+Webserver will be simulated by the same box 172.16.16.147. The two files login.php and logout.php serve as the simulation mechanic. These two files shall be simply thought of as if being executed on a PC. Hence, the script assumes the "PC" to reside at the IP address 172.16.16.147.
    • A regular user 88::Hannes will be used for testing purposes.
    • The two filters noTrunk and Trunk_PIN must be configured accordingly under Reference7:Administration/PBX/Filter.
  • Configure Hannes' phone:
    • Create a new function key F4 Message Waiting.
    • Select blink under Active State/LED.
    • Enter 77 under Message Center Account/Number.
    • Activate Message Center Account/Append Own Number.

Testing

  • Positive Test, Login
    • Proceed to Hannes' phone and press F4.
    • The voicemail prompts: Please, enter your PIN.
    • Enter 7 arbitrary digits.
    • The voicemail prompts: Please wait.
    • The voicemail prompts: beep.
    • The voicemail disconnects the call.
    • The F4 LED starts blinking
    • Hannes' user object got assigned the value Trunk_PIN as Config/Filter and Config/Diversion Filter
    • Hannes' user object got assigned the value 0815 as URL.
    • If Hannes dialled a trunk line the generated CDRs will feature the parameter src_url=0815.
  • Negative Test, Login
    • Edit login.php.
    • Modify <assign out="$result" value="ok"/> into <assign out="$result" value="nok"/>, thereby simulating a negative server response.
    • Proceed to Hannes' phone and press F4.
    • The voicemail prompts: Please, enter your PIN.
    • Enter 7 arbitrary digits.
    • The voicemail prompts: Please wait.
    • The voicemail prompts: Your input was not successful.
    • The voicemail prompts: Please, enter your PIN.
    • Enter 7 arbitrary digits.
    • The voicemail prompts: Please wait.
    • The voicemail prompts: Your input was not successful.
    • The voicemail disconnects the call.
  • Positive Test, Logout
    • Proceed to Hannes' phone and press F4.
    • The voicemail prompts: Please wait.
    • The voicemail prompts: You are logged out now.
    • The voicemail disconnects the call.
    • Hannes' user object got assigned an empty value as URL.
    • Hannes' user object got assigned the value noTrunk as Config/Filter and Config/Diversion Filter
Personal tools