When you're originating a call, you set the Caller ID yourself. There are two ways of doing this - either in the originate application yourself, or in the dialplan. An example of this is below.
Action: Originate
Channel: local/12345@outgoing
Application: Echo
CallerID: Asterisk <12345>
extensions.conf:
[outgoing]
exten => 12345,1,NoOp()
same => n,Verbose(1, Outgoing Caller ID: {$CALLERID(all)})
same => n,Dial(SIP/${EXTEN})
same => n,Hangup()
or you could do something like:
exten => 12345,1,NoOp()
same => n,Set(CALLERID(num)=54321)
same => n,Set(CALLERID(name)=Asterisk)
same => n,Verbose(1, Outgoing Caller ID: {$CALLERID(all)})
same => n,Dial(SIP/${EXTEN})
same => n,Hangup()
You should see your caller ID set either in the AMI originate or, if you choose to override it in the dialplan, those values.
For more information, see Manager Action Originate and CallerID Function.