Callerid

Dear all,

i have a SIP Trunk for incoming and outgoing calls.
I need to overwrite the callerid of all outgoing calls going through that trunk.

Is it possible to do it globally?

Thanks and regards,
Davide

if your provider allows you to do that then yes you can by using:Set(CALLERID(num)=yourcidhere)

There are some more options available with callerid in Asterisk
${CALLERID(ani)} - Caller ANI (PRI channels)
${CALLERID(ani2)} - ANI2 (Info digits) also called Originating line information or OLI
${CALLERID(all)} - Caller ID
${CALLERID(dnid)} - Dialed Number Identifier
${CALLERID(name)} - Caller ID Name only
${CALLERID(num)} - Caller ID Number only
${CALLERID(rdnis)} - Redirected Dial Number ID Service

Make a note that some of these are read only and can’t be set in dialplan.

–Satish Barot

Thank for your replies, i already use Set(CALLERID(num)=yourcidhere) an it works properly.

I have the problem when i set the automatic forward from the phones (Yealink T28P).
The provider wants to recognize the callerid of the system that generate the call, so in the dialplan i have set Set(CALLERID(num)=mycidhere)

So, if i answer an incoming call and then i forward the call outside it works properly.

While if i set the automatic forward from the phone it doesn’t work (provider voice says number not recognized). In both cases the call go through the same dialplan instructions.
The only difference is that the Asterisk channel is differente. In the automatic forward the channel that originates the forward is Local while in the first case is Sip.

Thank you for your help

Why don’t you use fromuser in sip.conf so the user portion is always what the provider expects?