ARI - How to set the From: field when making a call

I’m using ARI to place a call and want to set the caller id number.

My SIP trunk provider says that I need to set the From field in the SIP invite to the caller id. How can I do that programmatically on the ARI POST /channels/create? The “callerId” field is setting the number in the SIP Inviter Remote Part ID field.

This is how my dial command looks like:


Will I need to pass the number as a variable to the dialplan when passing it to Stasis? What other alternatives do I have?

What’s in your pjsip.conf? I suspect you are overriding the From header there.

Is this the funny provider that uses From for caller ID and remote-party-id for the account code? In that case, they are broken and you will need to look back a couple of months to see if anyone found a work around for them. (The normal expectation is that, if you have both, From is the account code and remote-party-id is the caller ID.

Why are you enabling remote party id, at all?

Here’s the pertinent portion:

type = endpoint
allow= !all,ulaw,alaw
aors = SipTrunkProviderOutbound
from_domain=Our Public IP

So yes! Thanks a lot. That did the trick. Once I removed the from_user field, it worked as expected.

As for the remote-party-id field, we were setting it following SIP Remote Party ID and RPID Privacy for Outbound Calls

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