How to get outbound CallerID from trunk of a channel variable

I need to determine Outbound CallerID (CallerID for calls placed out on this trunk) from channel varsets.
How can i do this?
P.S. CALLERID(all) doesn’t contain that variable

Are you trying to get the information before you dial out a trunk? What kind of trunk?

Trunk, which using in my Outbound Route.

I need determine Outbound CallerID (my external number) in any way.

When call is incoming, i see only my Outbound CID (which present in my Outbound Route) and trunk name, but not my external number (Outbound CallerID, which present in my trunk)

I think there are language problems here.

Asterisk caller ID is taken from the incoming Caller ID which is then overridden by any callerid setting in the channel technology configuration file (e.g sip.conf), and by any caller ID settings in the dialplan.

It may subsequently be modified by connected line update processing, if that is properly enabled, the incoming channel supports it, and there is an actual update.

The final outgoing caller ID may be overridden if there is a conflict for the protocol field used (e.g with SIP, the From header is needed for authentication) and no alternative mechanism is enabled (e.g for chan_sip, sendrpid). However the final outgoing caller ID is not available to the dialplan, and cannot be fully known (e.g enabling sendrpid doesn’t mean that the the peer which actually make use of it).

I am fairly certain that you are not actually talking about the outgoing caller ID. I think you are talking about the incoming caller ID after any changes imposed by the channel technology configuration file and the dialplan.

Generally you should only conigure callerid in sip.conf (etc.) if there is no valid incoming caller ID.

1 Like

You should ask questions about FreePBX on http;//

1 Like