Actions

Difference between revisions of "ABSD Billing"

From Zenitel Wiki

 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Billing_Installation_Guide |Billing Installation Guide]]
+
ABSD = AlphaCom Billing Service Daemon
  
Upcomming billing function. This article focuses on the interface between AMCD and the AlphaCom Billing Service Daemon
+
A AlphaCom can host a ABSD process for billing services. ABSD requires a license to be inserted, and the application it self runs from local flash filesystem. ABSD handle the realtime authorization and charging of outgoing calls. Configuration and invoicing is handled by a BillingWeb application.
  
New Data protocol messages
+
The ABSD software communicates with the local AMCD using Stentofon Simple Link Layer. The ABSD software is defined as device number 198, and connects to local AMCD on TCP port 127.0.0.1/40002. In AlphaNet, remote AlphaComs communicates with ABSD via the hosting AMCD using the normal AlphaNet routing.
  
[[CDC_STATE]] from AMCD to ABSD <br\>
+
[[Category:Billing]]
[[CDC_CMD]] from ABSD to AMCD <br\>
 
 
 
 
 
== Basic Concept ==
 
 
 
CDC = Call Detail Control
 
ABSD = AlphaCom Billing Service Daemon
 
 
 
A AlphaCom can host a ABSD process for billing services. ABSD requires an external CIFS mounted network disk for the data storage, but the application  it self runs from local flash filesystem. ABSD handle the realtime authorization and charging of outgoing calls. Configuration and invoicing is handled by a BillingWeb application.
 
 
 
The ABSD software communicates with the local AMCD using [[Stentofon Simple Link Layer]].
 
The ABSD software is defined as [[device]] number '''198''', and connects to local AMCD on TCP port 127.0.0.1/'''40002'''. In AlphaNet, remote AlphaComs communicates with ABSD via the hosting AMCD using the normal AlphaNet routing.
 
 
 
== Startup Sequence ==
 
 
 
At startup ABSD sends "#!ABSD 00 C6 VER:xxxx" + a [[RESET_TAKEN]] message.
 
 
 
AMCD responds to RESET_TAKEN message with [[COMMAND_RESPONSE]]. Response code (2) is 1 = License OK,  or 4 = not license. Number of license in parameter 3
 
 
 
== Call charging overview ==
 
 
 
AlphaCom behavior is based on adding CDC handling to directory numbers using feature 81, Call to remote EXCHANGE and 83, Direct Global Number. When dialling feature 81/83 to ''dest_node'', AMCD checks .module_profile.node_profile[''dest_node''].''absd_node''. If ''absd_node'' is different from null, CDC handling is activated for the call. ''dest_node'' is usually a SIP-server. ''absd_node'' is the node number hosting the ABSD.
 
 
 
When CDC handlig is active, AMCD buffers all dialled by the user, as well forwards the digits to ABSD as [[CDC_STATE]](,,DIGIT,). ABSD decides whether digits are PIN code, trunk number, or digits to be sent to SIP.
 
 
 
When ABSD has recognized a PIN code or a trunk number, it sends [[CDC_CMD]] back to AMCD. The CDC_CMD contains code for the current state of dialing, and the number of digits which was associated with this part of the dialing sequence. AMCD removes the given number of digits from the start of the buffer. When ABSD sends CDC_CMD(,,TRUNK_SET...), AMCD opens the SIP connection, and send the remaining buffered digits to the SIP connection.
 
 
 
ABSD may determine that a call should be aborted, due to illegal PIN, barred telephone number or overdrawn account. ABSD will then send CDC_CMD(,,ABORT...) to AMCD, and wait for CDC(,,DISCONNECT...) in return.
 
 
 
== AlphaCom User interface for dialling ==
 
* When dial PIN
 
** Short pip  (handset off dialling)
 
** Display * ?
 
* When SIP connection starts:
 
** Reset display line 2, dont show PIN/trunk code
 
** Dialtone from SIP
 
 
 
* When aborted due to failed PIN/barred number/overdrawn account:
 
** Failure tone
 
* When ABSD is down (due to missing network disk):
 
** No responst to user on digits
 
** After 1 sec timeout, open SIP connection, and allow dialling to trunk
 
 
 
==AlphaPro Config==
 
New NVRAM field: module_profile.node_profile[''dest_node''].''absd_node''.
 
 
 
This will appear in AlphaPro, "net routing"/"Advanced settings". ''absd_node'' must be set in all AlphaComs which are to use the billing service.
 
 
 
== Digit Collection ==
 
=== Trunk no+PIN ===
 
System setup: <br\>
 
AudioCodes SIP gateway, trunk line 1 programmed with number 0047. <br\>
 
0047 programmed in AlphaCom as feature 83 global number with flag for Call Detail Control.<br\>
 
 
 
ABSD programmed with pin code "12" for user "101" <br\>
 
 
 
User "101" dials trunk extension "0047" then local number 64871300
 
 
 
AMCD                                            ABSD
 
CDC_STATE (REF, 101, START, 0047)  ----->        (Starts new billing process)
 
                                    <-----        CDC_CMD (REF, 101, DIAL_PIN,,  0, )
 
CDC_STATE (REF, 101, DIGIT,    1)  ----->        (Verify pin digits)
 
CDC_STATE (REF, 101, DIGIT,    2)  ----->
 
                                    <-----        CDC_CMD (REF, 101, TRUNK_SET,, 2, 0047 )
 
  (Send INVITE 0047 to SIP GW, SIP-trunk dial tone)
 
...
 
CDC_STATE (REF, 101, ESTABLISHED,) -----> 
 
CDC_STATE (REF, 101, DIGIT,    6)  ----->        (Collect digits for billing information)
 
CDC_STATE (REF, 101, DIGIT,    4)  ----->           
 
  digits....871300                                (When user stops dialing start billing?)
 
....
 
CDC_STATE (REF, 101, ACTIVE,    ) ----->        (Received every 10 sec as a heartbeat AFTER AMC sent ESTABLISHED)
 
CDC_STATE (REF, 101, SPEECH_START) ----->        (SIPD sent 200 OK to AMC (interpreted as B offhook),
 
                                                  AMC sent SPEECH_START to ABSD, ABSD start search for match in Fee table)
 
.....
 
CDC_STATE (REF, 101, DISCONNECT, ) ----->        (Conversation disconnected)
 
 
 
 
 
When the link to the SIP gateway is established AlphaCom has no knowledge if the user reach a destination or not.
 
 
 
===Trunk no+PIN+ digit collection in AMCD===
 
 
 
System setup: <br\>
 
SIP call manager <br\>
 
0047 programmed in AlphaCom as feature 81 Area code with Call Detail Control node set, plus SIP digit collection.<br\>
 
 
 
ABSD programmed with pin code "12" for user "101" <br\>
 
 
 
User "101" dials trunk extension "0047"
 
 
 
AMCD                                            ABSD
 
CDC_STATE (REF, 101, START, 0047)  ----->        (Starts new billing process)
 
                                    <-----        CDC_CMD (REF, 101, DIAL_PIN,,  0, )
 
CDC_STATE (REF, 101, DIGIT,    1)  ----->        (Verify pin digits)
 
CDC_STATE (REF, 101, DIGIT,    2)  ----->
 
(New dial tone from AMC)          <-----        CDC_CMD (REF, 101, TRUNK_SET,, 2, 0047 )
 
CDC_STATE (REF, 101, DIGIT,    6)  ----->        (Collect digits for billing information)
 
CDC_STATE (REF, 101, DIGIT,    4)  ----->           
 
  digits....871300                                (When user stops dialing start billing?)
 
....
 
(User stops dialing or press M. SIP INVITE is sent with all collected digits 64871300)
 
...
 
CDC_STATE (REF, 101, ESTABLISHED,) -----> 
 
....
 
CDC_STATE (REF, 101, ACTIVE,    ) ----->        (Received every 10 sec as a heartbeat)
 
.....
 
CDC_STATE (REF, 101, DISCONNECT, ) ----->        (Conversation disconnected)
 
 
 
Dependent on the call manager the ESTABLISHED message can arrive during ringing or when the B-side actually lifting the handset.
 
 
 
 
 
===No PIN===
 
 
 
As example Trunk no+PIN, but "open" extension not requiring PIN<br>
 
 
 
AMCD                                            ABSD
 
CDC_STATE (REF, 101, START, 0047)  ----->        (Starts new billing process)
 
                                    <-----        CDC_CMD (REF, 101, TRUNK_SET,, 0, 0047 )
 
  (Send INVITE 0047 to SIP GW, SIP-trunk dial tone)
 
...
 
CDC_STATE (REF, 101, ESTABLISHED,) -----> 
 
CDC_STATE (REF, 101, DIGIT,    6)  ----->        (Collect digits for billing information)
 
CDC_STATE (REF, 101, DIGIT,    4)  ----->           
 
  digits....871300                                (When user stops dialing start billing?)
 
....
 
CDC_STATE (REF, 101, ACTIVE,    ) ----->        (Received every 10 sec as a heartbeat)
 
.....
 
CDC_STATE (REF, 101, DISCONNECT, ) ----->        (Conversation disconnected)
 
 
 
== Start of charging ==
 
Charging of calls in PSTN start when the called phone goes offhook. When analoge FXO SIP gateway is used for the connection to PSTN, it is problematic to detect when a call is actually answered. There is no well defined signal on the FX interface when the call is answered at the far end.
 
 
 
A analoge FXO SIP gateway will usually send the "200 OK" message when the outgoing line is seized, or maybe after the phonenumber has been dialled.
 
 
 
We have made a solution specific for the AudioCodes MP114/MP118 gateways:
 
===AudioCodes X-detect===
 
AudioCodes has implemented a proprietary SIP extension to its MP114/MP118 gateways. If the outgoing INVITE includes a "X-detect" request header, the gateway will use its DSP to detect call progress tones and far end speech. The gateway will send SIP INFO messages with a X-detect body when it detects events.
 
 
 
We have chosen to use the PTT/SPEECH-START event as an indication of when the call is answered, and charging can start. (The event is sent from SIPD as a [[AUDIO_PATH_STATE]] message to AMCD, and forwarded to ABSD in [[CDC_STATE]].) So accurate charging depends on that the called person talks to the phone as soon as he lifts the hook. 
 
 
 
The X-detect mechanism was introduced to the AudioCodes firmware in version 5.0, and we have tested it with version 5.2.
 
 
 
The X-detect mechanism can report call progress tones (CPT) like ring-back tone. But with version 5.2, only tone start is reported. There is no Ringback-end event. So CPT events are not usable for this purpose. In addition, the ringback tone depends on which country you are calling to. So a extensive CPT definition file has to be downloaded to the Audiocodes in order to detect all possible ringback tones.
 
 
 
== Failure situations ==
 
 
 
=== Illegal pin code ===
 
 
 
AMCD                                              ABSD
 
CDC_STATE (REF, 101, START, 0047)  ----->        (Starts new billing process)
 
                                    <-----        CDC_CMD (REF, 101, DIAL_PIN,,  0, )
 
CDC_STATE (REF, 101, DIGIT,    1)  ----->        (Verify pin digits)
 
CDC_STATE (REF, 101, DIGIT,    3)  ----->
 
                                    <-----        CDC_CMD (REF, 101, ABORT,,  , )
 
  User get failure tone and disconnect)
 
CDC_STATE (REF, 101, DISCONNECT, ) ----->        (Conversation disconnected)
 
...
 
 
 
=== No reply from billing ABSD ===
 
 
 
AMCD                                              ABSD
 
CDC_STATE (REF, 101, START, 0047)  ----->        (Starts new billing process)
 
 
 
.... No response to user on digits, just collect in buffer.
 
timeout after 1 sec, continue call setup. Throw away all digits buffered
 
so far.  (Send INVITE to SIP GW, SIP-trunk dial tone)
 
...
 
CDC_STATE (REF, 101, ESTABLISHED,) -----> 
 
CDC_STATE (REF, 101, DIGIT,    6)  ----->     
 
CDC_STATE (REF, 101, DIGIT,    4)  ----->
 
 
 
=== Illegal number series dialed ===
 
AMCD                                            ABSD
 
CDC_STATE (REF, 101, START, 0047)  ----->        (Starts new billing process)
 
                                    <-----        CDC_CMD (REF, 101, DIAL_PIN,,  0, )
 
CDC_STATE (REF, 101, DIGIT,    1)  ----->        (Verify pin digits)
 
CDC_STATE (REF, 101, DIGIT,    2)  ----->
 
                                    <-----        CDC_CMD (REF, 101, TRUNK_SET,, 2, 0047 )
 
  (Send INVITE 0047 to SIP GW, SIP-trunk dial tone)
 
...
 
CDC_STATE (REF, 101, ESTABLISHED,) -----> 
 
CDC_STATE (REF, 101, DIGIT,    8)  ----->
 
CDC_STATE (REF, 101, DIGIT,    2)  ----->
 
CDC_STATE (REF, 101, DIGIT,    0)  ----->
 
                                        <-----  CDC_CMD (REF, 101, ABORT)  (Illegal number series 820xxx)
 
(User get failure tone and disconnect)
 
CDC_STATE (REF, 101, DISCONNECT, ) ----->        (Conversation disconnected)
 
....
 
 
 
=== Pin Dial timeout ===
 
AMCD runs normal 5 sec timer during PIN code dialing. If timer expires, AMCD disconnects.
 
 
 
 
 
=== Various ===
 
 
 
* Only define extentions where exstention calls can be made.
 
 
 
* Use same feature for User and extention call. If origin station is in the extention list with "pin code enable" flag use extention code. (Follow the configuration for the exstention table). User call from a extention with pin code is not possible.
 
 
 
* Remove trunk line table? Insert number of trunks and "trunk directory number" in the trunk group table?
 
 
 
* No relation of Billing licenses and SIP-trunk licenses. More billing-licenses than available SIP-trunk licenses is possible. Means user will not get line out after dialing pin code.
 
 
 
* Pin codes must be terminated by use of '*'
 
 
 
* The Call log and User - table should be stored in seperate SQLite files. Restore/Backup of User/Call log is not advisable.
 
 
 
* Backup must have option for backup of User/Call log table???
 
 
 
* Restore must have option for restore of User/Call log table.
 
 
 
* Billing Web Backup/Restore must inform AMCD about start/stop of backup, inhibit use of SQLite tables. First version will not have any safety system...
 
 
 
* Wake-Up....AMCD or ABSD reads wake-table? DP-message from ABSD ? New AMCD "nvram" SQLite table for Wake-Up?
 
 
 
* AMCD must send DPMT_UPDATE to ABSD after received update command on BillingWeb socket.
 
 
 
== SQL tables ==
 
 
 
AMCD export directory number table as a Sqlite3 table.
 
 
 
The "official" path is /opt/amc/ex_data/AmcConf.sqlite
 
 
 
Softlink may be used to place the actual file on alternative filesystem (/tmp).
 

Latest revision as of 09:55, 2 September 2010

ABSD = AlphaCom Billing Service Daemon

A AlphaCom can host a ABSD process for billing services. ABSD requires a license to be inserted, and the application it self runs from local flash filesystem. ABSD handle the realtime authorization and charging of outgoing calls. Configuration and invoicing is handled by a BillingWeb application.

The ABSD software communicates with the local AMCD using Stentofon Simple Link Layer. The ABSD software is defined as device number 198, and connects to local AMCD on TCP port 127.0.0.1/40002. In AlphaNet, remote AlphaComs communicates with ABSD via the hosting AMCD using the normal AlphaNet routing.