3

After moving Asterisk from one server to another, I noticed that ASR dropped by 15-20 %. Also I noticed following warning in logs file

[Dec  8 15:52:00] WARNING[4771][C-00000031] pbx.c: Maximum loadavg limit of 0.900000 load exceeded by 'SIP/889-00000061' (currently 1.010000)!
[Dec  8 15:52:00] WARNING[4771][C-00000031] chan_sip.c: Failed to start PBX (call limit reached)

maxload was set to 2 and later commented. The real CPU load was below 50 %, I have no clue, why Asterisk was mistaken.

mysql> SELECT
    -> terminatecauseid,
    -> count(terminatecauseid),
    -> count(terminatecauseid) * 100 /  t.cnt
    -> FROM cc_call c
    -> cross join ( select count(1) as cnt FROM cc_call n where n.starttime BETWEEN '' AND '') t
    -> where c.starttime BETWEEN '' AND ''
    -> group by c.terminatecauseid;
+------------------+-------------------------+----------------------------------------+
| terminatecauseid | count(terminatecauseid) | count(terminatecauseid) * 100 /  t.cnt |
+------------------+-------------------------+----------------------------------------+
|                0 |                   16731 |                                 3.1444 |
|                1 |                  184780 |                                34.7277 |
|                2 |                   21788 |                                 4.0948 |
|                3 |                   51831 |                                 9.7411 |
|                4 |                  165769 |                                31.1547 |
|                5 |                   40409 |                                 7.5945 |
|                6 |                   50775 |                                 9.5427 |
+------------------+-------------------------+----------------------------------------+

Removing maxload helped, however I still can see, that congestion is above normal. As I understand 6 stands for CHANUNAVAIL and 5 for CONGESTION.

What is the congestion and chanuavail parameters about? What else can affect it? How to distinguish congestion of my own Asterisk and "congestion responses" sent by donwstream softswitches ?

Anton
  • 166
  • 1
  • 5

1 Answers1

2

In order to diagnose your problem, you will need to run a "tcpdump" trace for a duration of a day or something like that. Another option will be to use a tool like voipmonitor (voipmonitor.org) or homer (sipcapture.org).

Congestion messages can be caused by various SIP result codes. Normally, a congestion will indicate that you had used up all your allocated channels on the remote end. A CHANUNAVAIL will normally indicate that either a network fault or a resource fault had occurred and the channel resource you are seeking to utilize isn't available for your usage.

You calculation of ASR is very global, you need to pin point the ASR calculation according to a specific destination prefix. For example, what is your ASR to prefix 44, or prefix 33. This way, you will be able to pin point the accurate cause of the ASR drop. I would also suggest to check your ACD (Average Call Duration), if your ACD had increased, you may be suffering from lack of resources - which is a good problem, which means - your business is doing well.

  1. Putting the discussion of how to calculate ASR and ACD apart, judging from your table, you are using the A2Billing engine. Now, you need to pay attention to the following:

  2. Your maxload should reflect your machine type. For example, if you are using a Quad Core CPU server, a maxload of 3 well serve you well. Normally, I would set (CORE COUNT - 1) for Quad/Hex Cores, and (CORE COUNT - 2) for anything Octa core and above.

  3. Remember, you are running the a2billing script for every call. Make sure that your php.ini settings provide enough memory and resources for your script runtime, or you will get errors.

  4. Remember to set the MAXFILES, SYSMAXFILES and PRIORITY in safe_asterisk - if you don't, similar issues may arise.

  5. If you are running a high power system, set PRIORITY to -10. It will give the Asterisk process a high priority in CPU access and resource allocation.

Good luck.