Asterisk 13 - Set caller id on originate post

I am trying to set the caller id to appear on the customer’s phone but it keeps showing anonymous.

Checking the documentation, it says I can set it:

  1. As a parameter

Query parameters => callerId: string – CallerID to use when dialing the endpoint or extension.
POST /ari/channels?endpoint=PJSIP/17162298050@clickproxytrunk&extension=s&context=ac_customer&callerId=12423424587&label=1

  1. As a body variable

Body parameter
variables: containers – The “variables” key in the body object holds variable key/value pairs to set on the channel on creation. Other keys in the body object are interpreted as query parameters. Ex. { “endpoint”: “SIP/Alice”, “variables”: { “CALLERID(name)”: “Alice” } }


But none of them worked.

Have you confirmed that your callerid is not going out in the SIP signaling using pjsip set logger on? What is the configuration of the endpoint? What does “core show channel” show for the resulting originated channel?

Hi Joshua,
I tracked down the problem. The issue was the string format of the CallerId.
I used it as a parameter and it worked.
Instead os sending “callerIdName” <+171612323424>
I changed to set “callerIdName <+171612323424>”

The double quotes were the problem. On Asterisk 11 it worked and on Asterisk 13 I had to double quote everything not only the caller id name.