didww/ai / skills/didww-to-elevenlabs
didww-to-elevenlabs
VerifiedConnect a DIDWW phone number to an ElevenLabs voice agent over SIP, as automatically as both platforms allow. Use whenever the user wants an ElevenLabs agent (Agents Platform, Conversational AI) on a real phone number via DIDWW, mentions pairing DIDWW with ElevenLabs, importing a SIP trunk into ElevenLabs, sip.rtc.elevenlabs.io, or debugging calls between the two. Covers inbound, outbound, transfers and verification.
| File | Kind | Size |
|---|---|---|
| .npmignore | other | 66 B |
| LICENSE | other | 1.1 KB |
| README.md | markdown | 1.3 KB |
| SKILL.md | skill md | 5.9 KB |
| bin/install.jsexecutable | script | 5.3 KB |
| install.shexecutable | script | 1.0 KB |
| package.json | manifest | 878 B |
| publish.shexecutable | script | 604 B |
| scripts/import_number.py | script | 4.2 KB |
| test.shexecutable | script | 488 B |
| tests/test_import_number.py | script | 5.0 KB |
tests/test_import_number.py
View on GitHub#!/usr/bin/env python3
"""Request-shape tests for scripts/import_number.py (stubbed HTTP)."""
import contextlib, io, json, os, runpy, sys, urllib.error, urllib.request
sys.dont_write_bytecode = True
P = sys.argv[1] if len(sys.argv) > 1 else os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "scripts", "import_number.py")
results = []
def check(name, ok, detail=""):
results.append(bool(ok)); print(f"{'PASS' if ok else 'FAIL'} {name} {detail}")
def run_script(argv, env, canned, fail=None):
"""Run the script with stubbed HTTP; return (captured requests, output, exit code)."""
reqs = []
class R:
def __init__(s, d): s.d = json.dumps(d).encode()
def read(s): return s.d
def __enter__(s): return s
def __exit__(s, *a): pass
def fake_urlopen(req, timeout=None):
reqs.append({"url": req.full_url, "method": req.get_method(), "headers": {k.lower(): v for k, v in req.header_items()}, "body": json.loads(req.data) if req.data else None})
if fail: raise urllib.error.HTTPError(req.full_url, fail, "err", {}, io.BytesIO(b'{"error":"stubbed failure"}'))
return R(canned)
old_env, old_argv, old_open = dict(os.environ), sys.argv, urllib.request.urlopen
os.environ.update(env); sys.argv = [P] + argv; urllib.request.urlopen = fake_urlopen
out = io.StringIO(); code = 0
try:
with contextlib.redirect_stdout(out), contextlib.redirect_stderr(out): runpy.run_path(P, run_name="__main__")
except SystemExit as e: # sys.exit("msg") prints msg only at interpreter exit; mirror that
code = e.code if isinstance(e.code, int) else (0 if e.code is None else 1)
if isinstance(e.code, str): out.write(e.code + "\n")
finally:
urllib.request.urlopen = old_open; sys.argv = old_argv; os.environ.clear(); os.environ.update(old_env)
return reqs, out.getvalue(), code
base = ["--number", "+33144556677", "--inbound-user", "iu", "--inbound-pass", "ip", "--outbound-host", "fra.eu.out.didww.com", "--outbound-user", "ou", "--outbound-pass", "op"]
reqs, out, code = run_script(base + ["--agent", "agent_x"], {"ELEVENLABS_API_KEY": "k"}, {"phone_number_id": "phnum_1"})
b = reqs[0]["body"] if reqs else {}; ib = b.get("inbound_trunk_config", {}); ob = b.get("outbound_trunk_config", {})
check("provider field is 'provider': 'sip_trunk' (OpenAPI CreateSIPTrunkPhoneNumberRequestV2; no provider_type)", b.get("provider") == "sip_trunk" and "provider_type" not in b, sorted(b))
check("inbound auth sent as credentials{username,password}", ib.get("credentials", {}).get("username") == "iu" and ib.get("credentials", {}).get("password") == "ip" and "auth_username" not in ib, json.dumps(ib))
check("transport is a lowercase enum value", ob.get("transport") in ("auto", "udp", "tcp", "tls"), repr(ob.get("transport")))
check("outbound credentials sent; agent_id set on the one create call", ob.get("credentials", {}).get("username") == "ou" and len(reqs) == 1 and b.get("agent_id") == "agent_x", [r["method"] for r in reqs])
check("xi-api-key header on the import call", reqs[0]["headers"].get("xi-api-key") == "k" if reqs else False)
reqs, out, code = run_script(base + ["--transport", "TLS"], {"ELEVENLABS_API_KEY": "k"}, {"phone_number_id": "p"})
check("--transport TLS normalised to tls", bool(reqs) and reqs[0]["body"]["outbound_trunk_config"]["transport"] == "tls")
reqs, out, code = run_script(base + ["--transport", "sctp"], {"ELEVENLABS_API_KEY": "k"}, {})
check("unknown transport refused before any API call", code != 0 and not reqs)
reqs, out, code = run_script(["--number", "+33144556677", "--inbound-user", "iu", "--inbound-pass", "ip"], {"ELEVENLABS_API_KEY": "k"}, {"phone_number_id": "p"})
check("inbound-only import: no outbound_trunk_config, says so", code == 0 and reqs and "outbound_trunk_config" not in reqs[0]["body"] and "Inbound only" in out, out[-150:])
reqs, out, code = run_script(["--number", "+33144556677", "--inbound-user", "iu", "--inbound-pass", "ip", "--outbound-host", "h"], {"ELEVENLABS_API_KEY": "k"}, {})
check("partial outbound flags refused before any API call", code != 0 and not reqs and "all of --outbound-host" in out)
reqs, out, code = run_script(["--number", "+33144556677", "--inbound-user", "iu", "--outbound-host", "h", "--outbound-user", "ou"], {"ELEVENLABS_API_KEY": "k", "ELEVENLABS_INBOUND_PASS": "envi", "DIDWW_TRUNK_PASS": "envo"}, {"phone_number_id": "p"})
check("passwords can come from ELEVENLABS_INBOUND_PASS / DIDWW_TRUNK_PASS", code == 0 and reqs and reqs[0]["body"]["inbound_trunk_config"]["credentials"]["password"] == "envi" and reqs[0]["body"]["outbound_trunk_config"]["credentials"]["password"] == "envo")
reqs, out, code = run_script(["--number", "+33144556677"], {"ELEVENLABS_API_KEY": "k"}, {})
check("missing arguments print usage, no API call", code != 0 and not reqs and "Usage" in out)
reqs, out, code = run_script(base + ["--agnet", "x"], {"ELEVENLABS_API_KEY": "k"}, {})
check("misspelt flag refused instead of ignored", code != 0 and not reqs and "Bad argument" in out)
print(f"\n{sum(results)}/{len(results)} passed"); sys.exit(0 if all(results) else 1)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |