How to modify outbound cid by trunk?

hi,
on our user database we use local outbound cid (ie. not contains the
country code) since only this case working with our pstn provider’s trunk the caller id. but when i register with tello.com they require to send outbound cid with country code. how can i modify outbound cid on each trunk? is the any similar way as in case of dial rules? it’d be very useful.
thanks in advance.
yours.

I asume that you have something like this:

;Trunk 1

Exten => _718XXXXXXX,1,Dial(SIP/${EXTEN}@provider)

Exten => _011.,1,Dial(SIP/${EXTEN}@provider)

etc…

So what you would do is set the caller ID first. So you would have

Exten => _718XXXXXXX,1,SetCallerID(+17185551212)
Exten => _718XXXXXXX,2,Dial(SIP/${EXTEN}@provider)

Exten => _011.,1,SetCallerID(+97255233641)
Exten => _011.,2,Dial(SIP/${EXTEN}@provider)