I’m trying to replicate a channel that is created when a SIP endpoint calls an extension:
server*CLI> core show channel PJSIP/1011009248-00000002
-- General --
Name: PJSIP/1011009248-00000002
Type: PJSIP
UniqueID: pbx.example.com-1606346626.4
LinkedID: pbx.example.com-1606346626.4
Caller ID: 2003
Caller ID Name: [redacted]
Connected Line ID: (N/A)
Connected Line ID Name: (N/A)
Eff. Connected Line ID: (N/A)
Eff. Connected Line ID Name: (N/A)
DNID Digits: 600
Language: en
State: Up (6)
NativeFormats: (ulaw)
WriteFormat: gsm
ReadFormat: ulaw
WriteTranscode: Yes (gsm@8000)->(slin@8000)->(ulaw@8000)
ReadTranscode: No
Time to Hangup: 0
Elapsed Time: 0h0m7s
Bridge ID: (Not bridged)
-- PBX --
Context: internal-sip
Extension: 600
Priority: 1
Call Group: 0
Pickup Group: 0
Application: BackGround
Data: demo-echotest
Call Identifer: [C-00000002]
Variables:
CDR Variables:
level 1: dnid=600
level 1: clid="[redacted]" <2003>
level 1: src=2003
level 1: dst=600
level 1: dcontext=internal-sip
level 1: channel=PJSIP/1011009248-00000002
level 1: lastapp=BackGround
level 1: lastdata=demo-echotest
level 1: start=1606346626.867974
level 1: answer=1606346626.869008
level 1: end=0.000000
level 1: duration=6
level 1: billsec=6
level 1: disposition=1
level 1: amaflags=3
level 1: uniqueid=pbx.example.com-1606346626.4
level 1: linkedid=pbx.example.com-1606346626.4
level 1: sequence=2
My understanding is that something like:
curl -q -v -u [redacted]:[redacted] -X POST 'http://pbx:8088/ari/channels?endpoint=PJSIP/1011009248&extension=600&context=internal-sip&priority=1&callerId=12345'
should do it. But instead I am getting:
{"message":"Resource not found"}
from the curl
command and the ari debug
on the Asterisk console shows:
<--- ARI request received from: 10.75.22.1:47770 --->
Host: pbx:8088
Authorization: Basic [redacted]
User-Agent: curl/7.69.1
Accept: */*
endpoint: PJSIP/1011009248
extension: 600
context: internal-sip
priority: 1
callerId: 12345
body:
<--- Sending ARI response to 10.75.22.1:47770 --->
404 Not Found
Content-type: application/json
{"message":"Resource not found"}
What am I missing?