Cli channel originate limited to 80 characters?

Hi, I’ve got another annoying question. channel originate appears to be truncating our dial strings to 80 characters. Here’s an example dialout:

channel originate PJSIP/SIP__________/sip:@________________;provTag=PROVIDER;hostPin=123456123456 extension 12345

the problem being that the pin at the end is totally truncated, while the extension is fine. IS there a config I’m missing somewhere or is this something coded into asterisk that we can’t change?

There appears to be no limitation like that from quickly looking at the code. However, I’m not sure if the additional tag information (anything after the ‘;’) would work. Eventually that tries to create a PJSIP channel and it extracts the endpoint name as anything past the ‘@’. It then tries to lookup that endpoint name which would be the following:


in this case. It then attempts to lookup that endpoint, which I am guessing would fail.

What kind of output or error are you seeing?

1 Like

Hi, we are not seeing any errors other than the entire string itself being truncated to 80 characters, which is causing the dial to fail, and the endpoint needs the information that’s getting cut off.

Redefining AST_CHANNEL_NAME in both channel.h and options.h helps alleviate this problem, as we’re able to append more characters in our uri paramaeters; however, I’m told that this is not an option for us to maintain a separate patch for this.

Is there any other way to configure this, or send uri parameters for sip calls separately from a channel originate AMI command?

Maybe someone else knows a better way, but I believe you’ll have to originate a local channel into the dialplan and then build your dial string using variables you passed in via AMI originate. For instance:

Action: Originate
Channel: Local/999
Context: default
Exten: 12345
Priority: 1
Async: true
Variable: params=;provTag=PROVIDER;hostPin=123456123456

And then the dialplan:

exten => 999,1,NoOp()
    same => n,Dial(PJSIP/SIP_____/sip:@______${params})
    same => n,Hangup()
1 Like