ARI originate & SIP URI issue

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?

What version of Asterisk are you using? There was a fixed limit in older versions of 80 characters, but in latest releases that was removed[1].

[1] https://issues.asterisk.org/jira/browse/ASTERISK-28847

Hello Jcolp,

I’m using Asterisk 16.5.0, is it impacted by the bug?

Yes. The fixed versions are listed on the linked issue: 13.33.0, 16.10.0, 17.4.0.

Ok I will do that, thanks for your help!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.