Actions

AudioCodes - More than 8 lines needed

From Zenitel Wiki

Revision as of 02:41, 14 February 2012 by Roarl (talk) (Expanding the System)

Situation

The AudioCodes MP118 has 8 FXO lines which can be accessed with a single directory number from the AlphaCom stations. Usually "0". If more lines are needed, one must connect another AudioCodes MP11x and add this to the AlphaCom as a SIP node. Normally this will be accessed with a different directory number. In some cases it can be desirable to only have 1 directory number.

Solution

Since there are no feedback to the AlphaCom from the AudioCodes on how many lines that are in use, the AlphaCom must keep track on this itself. This is done by simply counting how many outgoing calls there are to a certain directory number. This article describes how to enable the use of 16 FXO lines, using 2 AudioCodes MP118.

Programming

Create the SIP Trunk Nodes

From the AlphaPro main menu, use the ‘+’ button next to the ‘Select Exchange’ dropdown list to create a new exchange. The exchange type must be set to ‘SIP Node’.

Set the parameters as follows:

SIP Node 101
SIP Node 102


The SIP Trunk IP address must be identical to the IP address of the SIP Gateway. Repeat this operation for the second SIP node.

Define the AlphaCom / SIP routing

In Exchange & System > Net Routing use the Insert button to create a route between the AlphaCom and the SIP Gateway. Set Preferred codec to G711u and RTP Packet Size to 20 ms.

AlphaNet Routing SIP Node 101
AlphaNet Routing SIP Node 102


Create Prefix number

The directory number (prefix) used to access the telephone line must be programmed in the AlphaCom directory table with feature 83 and Node = SIP Trunk node number (101 and 102 in this example). Normally one will use directory number 0 to be used as prefix, but for the purpose of the wanted function we will use 9521 and 9522.

SIP NODE 101 Directory Number
SIP NODE 102 Directory Number


Create Event Trigger Number

The number dialled by the user will actually be an Event Trigger. This must be added in the AlphaCom directory table as feature 52 and ID 0. The directory number is set to "0".

Common Directory number: 0


Event Handler Programming

Two events are needed by this function. The first event is the event trigger, which is set off when the user dials "0". This event checks a udd and decides which SIP Node the user should be directed to. The second event keeps track of how many lines that are busy in the first SIP Node.


Event Owner: Stations w/ UDP Id: 8 (all stations)
Event type: 15 – Event Trigger Feature
Subevent: 0
When change to: ON
When related to: Directory Number: 0
Action: IF %op(%udd(2),=,8)
  $CALL L%1.dir L9522
  STOP
  ENDIF
  $CALL L%1.dir L9521

Event Owner: Stations w/ UDP Id: 8 (all stations)
Event type: 08 – Conversation - Outgoing
Subevent: 0
When change to: ON or OFF
When related to: Directory Number: Node: 101, Id: 9521
Action: IF %op(%chg(1,2),=,1)
  WUDD 2 %op(%udd(2),+,1)
  STOP
  ENDIF
  IF %op(%chg(1,2),=,2)
  WUDD 2 %op(%udd(2),-,1)
  STOP
  ENDIF

Explanation

When a user dials "0", the event trigger will go on and check the value of udd 2. If this value i 0-7 the user will be forced to call 9521. When anyone is calling 9521 the second event is triggered. An ON action will increase the value of udd 2 with 1. An OFF action will decrease the value of udd 2 with 1. If 8 users are having an outgoing conversation with the first SIP Node (Node 101, dir no 9521) the event trigger will force the user to call 9522 instead.

Expanding the System

If more than 16 lines are needed, a third MP11x can easily be added. The following actions must be taken: - Add new SIP Trunk Node. - Add Routing. - Add Directory Number 9523. - Add Conversation Outgoing Event, related to 9522. - Add IF statement to the Event Trigger Event which checks the udd counter for the second SIP Node.