Setting caller ID before invoking Originate

I have the following in a context in my dialplan:

  ...
  exten => s, n, Set(CALLERID(num)=2125551234)
  exten => s, n, Set(CALLERID(name)=MyCompany)
  exten => s, n, Originate(${target_resolved},app,Playback,${SOUNDS}/alerts/${filename})
  ...

However, when this is applied internally the caller ID name and number read “Anonymous” and to outside land/cell lines is simply says “Unknown.” Is there some way to set CALLERID to work with Originate, or is there some possible parameter to pass to Originate to correctly render the desired caller ID?

send callerid in originate packet itself.

example…

fputs($oSocket, “Action: login\r\n”);
fputs($oSocket, “Events: off\r\n”);
fputs($oSocket, “Username: admin\r\n”);
fputs($oSocket, “Secret: admin\r\n\r\n”);
fputs($oSocket, “Action: originate\r\n”);
fputs($oSocket, “Channel: Local/7000@DTMF\r\n”);
fputs($oSocket, “Context: DTMF\r\n”);
fputs($oSocket, “CallerId: 9810265812\r\n”);//setting callerId …
fputs($oSocket, “Exten: 7000\r\n”);
fputs($oSocket, “Priority: 1\r\n\r\n”);
fputs($oSocket, “Action: Logoff\r\n\r\n”);

Callerid is available on AMI Originates, but not dialplan originates.

I think you need to originate to a local channel, and have that set the caller ID and do the real Dial.