Asterisk CPU Usage goes to around 100% in a few second

Here are things I would look for:

  1. Are there any WARNING or ERRORs in Asterisk when the issue occurs?

  2. When the issue occurs, what is happening in Asterisk? Are you running calls, recordings? What SIP messages are in flight?

  3. Are you interfacing to any external systems (databases, API servers, etc.), and is Asterisk communicating with them when the issue occurs?

  4. When the issue occurs, does Asterisk stop processing (a) SIP requests (you’ll stop seeing requests logged, or responses won’t be sent, etc.); (b) new calls (SIP messages are processed but calls hang); © calls are processed but get stuck at parts in the dialplan, etc.