Hello,
I have an issue with SIP-URI dialing & asterisk ARI.
I’m using Asterisk 16 and node-ari, and trying to create a new channel with originate, I need to add parameters in the INVITE URI, like in this example (some informations was redacted):
INVITE sip:+000001@test.local**;transport=tls;X-test=foo** SIP/2.0
Via: SIP/2.0 […]
So I already know that the dial syntax is PJSIP/<endpoint>/<SIP URI>
, it works inside a dialplan, but not with ARI (and yes, the endpoint exists inside pjsip.conf).
Here are my originate:
outgoing.originate(
{ endpoint: 'PJSIP/myendpoint/sip:+000001@test.local;transport=tls;X-test=foo',
app: 'originate-example',
appArgs: 'dialed',
callerId: '+1234'
},
function (err, channel) {}
);
Here are what asterisk received:
<--- ARI request received from: 127.0.0.1:52968 --->
user-agent: Shred
Accept: application/json
Authorization: Basic redacted
Host: 127.0.0.1:8088
Connection: close
Content-Length: 0
endpoint: PJSIP/myendpoint/sip:+000001@test.local;transport=tls;X-test=foo
app: originate-example
appArgs: dialed
callerId: +1234
channelId: 72e555b2-6677-40cb-a986-35b4f18be716
body:
Then the pjsip debug is not showing what I was expecting, my X-test is gone, it seems that something got truncated:
INVITE sip:+000001@test.local;transpor SIP/2.0
Via: SIP/2.0/TLS [...]
I’m quite stuck now, can’t figure what is wrong.
Any ideas?