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” } }

{“variables”:{“ac_phone_id”:”2914552″,”ac_client_id”:”24″,”ac_original_agent_id”:”24″,”ac_calllist_id”:”2090″,”ac_campaign_id”:”50″,”ac_account_id”:”18010965″,”ac_campaign_id”:”50″,”ac_automaticvoicemailstatus”:”2″,”ac_callrecording_path”:”/sc_recordings/client_24/2018-01-04/recording_outbound_10879″,”ac_action_id”:”5″,”ac_stasis_sufix”:”lucas”,”CALLERID(all)”:”666-6666″}}

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.