A customer might be unable to make a call not only due to network problems, but also for various administrative reasons, for example, if their account is blocked or they do not have enough money on their account. If the end user can be informed of such administrative problems, instead of just being given a busy signal, this will greatly simplify troubleshooting. Here is what would happen in the event that, for instance, an account which is blocked attempts to make a call:
- The customer tries to make a call and sends the INVITE request to PortaSIP.
- PortaSIP sends an authorization request to the billing engine.
- PortaBilling determines that this account is blocked. An authorization reject is returned to PortaSIP. In addition to the h323-return-code, PortaSIP receives a special attribute. This attribute contains a description of the type of error – in this case, "user_denied".
- Upon receiving the authorization reject, PortaSIP redirects the call to the media server, including the error message as a parameter.
- The media server establishes a connection with the SIP UA. It locates a voice prompt file based on the error type and plays it to the user. After this the call is disconnected.
To avoid dynamic codec conversion, there are three files for each prompt (.pcm, .723 and .729). You can change these files according to your needs, if required.
Here is a list of the currently supported error types:
- account_expired – the account is no longer active (expired as per the expiration date or life time).
- cld_blocked – there was an attempt to call a destination which is not in the tariff, or is marked as forbidden.
- cld_dial_error – a mistake was made when dialing.
- cld_tmp_unavail – the account you are trying to contact has configured the incoming call to be dropped, or is out of money.
- cld_unassigned – the dialed number is configured to be terminated inside the network, but has not been assigned to any particular user yet.
- credit_disconnect – a call is disconnected because the maximum credit time is over.
- in_use – this call attempt is blocked because another call from the same debit account is in progress.
- insufficient_balance – there are not enough funds to make a call to the given destination.
- invalid_account – incorrect account ID, or account is not permitted to use SIP services.
- empty_routing – an outgoing call could not be established because an empty routing list was returned by billing (probably the customer’s routing plan is too restrictive).
- user_denied – the account is blocked.
- wrong_passwd – an incorrect password has been provided.
Every account in PortaBilling has a "preferred language" property, which defines the desired language for IVRs. The language code (e.g., ch for Chinese) assigned to the account is returned from the billing engine, so the media server will first attempt to play a voice prompt for that language. If that prompt does not exist, the default English voice prompt will be played.