agentleFS
sentineldesksentineldesk/agent/skills/voip-telephony/SKILL.md

voip-telephony

Skill0 starsChanged 3 months agoApache-2.0View on GitHub

Operate and troubleshoot Asterisk and Kamailio — check registrations, read the dialplan, trace a call that will not connect, diagnose one-way or no audio, and reload config safely. Use when the task involves SIP, a PBX, extensions, trunks, calls dropping, or audio problems.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before anything that could interrupt: asterisk -rx "core show channels".

    line 30
  2. Very specific:

    When editing pjsip.conf or a Kamailio subscriber, have the person supply the password directly — the rule in your system prompt applies.

    line 86

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Reload, never restart

This is the rule that separates someone who works on a PBX from someone who has just dropped every call in progress. A restart tears down active calls; a reload re-reads config and leaves them up.

run_command   asterisk -rx "dialplan reload"
run_command   asterisk -rx "sip reload"       (chan_sip)
run_command   asterisk -rx "pjsip reload"     (chan_pjsip — current)
run_command   kamailio -c                     (check config FIRST)
run_command   kamctl restart                  (only when genuinely needed)

Check before you reload. asterisk -rx "dialplan show" parses what is loaded; kamailio -c validates the config file without touching the running process. A reload of a file with a syntax error can leave you worse off than before it.

Before anything that could interrupt: asterisk -rx "core show channels". If calls are up, say so and let a person decide the moment.

-rx is how you talk to a running Asterisk

asterisk -rx "<command>" sends one command to the running daemon and returns. Plain asterisk -r opens an interactive console that will hang here, waiting for input nothing can send. Never use it in a run_command.

The questions, in the order they answer things

  • Is the endpoint registered? pjsip show endpoints / pjsip show registrations, or sip show peers on chan_sip. An unregistered extension explains every symptom below it, so check this first.
  • Which trunk, and is it up? pjsip show endpoint <name> — look at the status and the transport.
  • Where does the call go? dialplan show <exten>@<context> — the context is what actually decides routing, and a call landing in the wrong context is the commonest "it dials but nothing happens".
  • What happened live? core set verbose 3 then watch — as a job, because a log follow never returns: job_start "asterisk -rvvv" … job_abort when done. Same for journalctl -u asterisk -f.

No audio and one-way audio are network problems, not PBX problems

This is the single most common Asterisk/Kamailio call, and the diagnosis is almost never in the dialplan:

  • One-way audio is almost always NAT: RTP is going somewhere that cannot reach back. Check external_media_address / external_signaling_address and local_net in pjsip.conf (externip/localnet on chan_sip).
  • No audio at all is usually the RTP port range blocked — 10000–20000 UDP by default in rtp.conf. run_command "ss -ulpn | grep asterisk" shows what it is actually listening on; the firewall is the other half.
  • Codec mismatch shows as a call that connects and drops immediately. The verbose log names the codecs both sides offered.

Prove it with a capture rather than a theory: job_start "tcpdump -n -c 500 -i any port 5060 -w /tmp/sip.pcap", place the call, then read it. Scope the capture to the port and bound it — a shared machine's traffic is not yours to hoover up.

Kamailio is a proxy, not a PBX

It routes SIP; it does not usually touch media. So when audio is broken and Kamailio is in the path, look at whether RTPProxy/RTPEngine is running and whether record_route() is being called — a missing record_route means in-dialog requests bypass the proxy and end up nowhere.

kamctl ul show lists current registrations; kamcmd is the runtime control if the ctl socket is enabled.

Credentials

A SIP secret in a config file is normal; a SIP secret in a tool argument is not. When editing pjsip.conf or a Kamailio subscriber, have the person supply the password directly — the rule in your system prompt applies. And a sip.conf readable by everyone is a finding worth reporting.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.