Starting with version 0.6 (released 30 Aug 2005), Asterisk-MySQL driver allows to be configured to take billable extension from various sources and determine call direction from channels used to make the call.
Common stepsTo configure driver properties following steps are necessary:
- open Configuration/PBX Communication page
- activate Driver tab
- select Asterisk-MySQL in the PBX Driver field
- check that there is Version 0.6 in the driver comments (in case it's not please download and install the latest version of the driver from our support site)
- activate Properties tab to get access to the driver properties
Configuring billable extension source- to configure source of the billable extension 'Take billable extension from' field is used
- this field has 4 options:
- Call Source - driver uses 'src' and 'dst' fields to fill user extension for outgoing and incoming calls
- Channel - driver parses 'channel' and 'dstchannel' fields to extract user extension from there
- Account Code - driver uses 'accountcode' field to fill user extension
- Account/Source - driver uses 'accountcode' field to fill user extension. In case the 'accountcode' field is empty driver uses 'src' and 'dst' fields for this purpose
Configuring call directionDriver determines call direction by examining the 'channel' and 'dstchannel' fields (this requires to setup which channels are connected to the PSTN, otherwise known as COs or Trunks in other PBXs). Knowing of what channel is connected to PSTN the driver decides of what is the call direction depending of whether PSTN appears in 'channel' or 'dstchannel' field. Thus before using the driver you need to list all channels connected to PSTN.
Driver uses a partial match when searching the channel names, i.e. it compares all symbols of the defined channel name against captured string from the string first symbol to the defined name length and ignores rest of the captured string, thus Zap/1- will match Zap/1-1, Zap/1-2 etc. Trailing dash in the channel name pattern is necessary to avoid situations like when Zap/1 will match both Zap/1-1 and Zap/11-1. Exact pattern for channel names depends on the way your Asterisk reports the channels.
There are 2 options (2 places) to list these channels:
- CO/Trunk lines lookup table
- Driver settings on the Properties tab
Both options are equal and it's question of convenience which one you will choose (e.g. if you already have CO/Trunk lookup table filled you may prefer the 1st option).
Using CO/Trunk lines lookup table- use Settings/Line Numbers page to fill and manage list of channels connected to PSTN
- in the driver settings (Configuration/PBX Communication Properties tab) select 'CO/Trunk table' in the Take PSTNs from' field
- every time you change something on the Settings/Line Numbers page you will have to reload the driver by opening Configuration/PBX Communication page and clicking the Save button there
Using the driver settings- use Configuration/PBX Communication Properties tab to manage list of channels connected to PSTN
- select 'Driver Settings' in the Take PSTNs from' field, this enables PSTNs section at the bottom of the tab
- enter channel name in the New PSTN field in the section and press '>>' button to add the channel to the list; alternatively you may use <Ctrl>+<Enter> keys to add the channel
- select group of channels in the list using mouse and <Ctrl> and <Shift> keys and press '<<' button to remove channel names from the list
- after editing the list press Save button on the page to save the settings