Control the Remote Party ID header in Asterisk ARI

I am oriingating a call using the asterisk py-ari library. However, I am unable to set the caller ID. The only caller ID the SIP provider accepts is the account username. Any other called ID is denied with SIP/2.0 603 Declined.

The provider has asked me to control the Remote Party ID header and place the caller ID there while the FROM header has the user (extension id).

Below is the line for placing the call.

response = client.channels.originate(endpoint=‘SIP/provider/+’+data[‘number’],context=‘phones’,priority=1,callerId=897236523,app=‘stasis-app’,channelId=data[‘call_id’])

How do I implement this in Asterisk ARI?

I am using Asterisk 16.2.1

The same way as you implement it with dialplan!

This is set in you channel technology configuration file, e.g. for chan_sip it was:

fromuser=<what the provider needs to identify you>


From the ARI point of view, you then set the caller ID in the same way as before.

That worked. Thanks a lot.

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