Set outgoing CallerID based on dialed number

Hi,

i want to set the outgoing callerid based oin the number the user dialed.

What i have to do? I am searching the hole day in the internet, but i found no solution :frowning:

Thanks for help,
Mod

Hi

As you have not said otherwise we will assume that you are using a vanilla asterisk installation.

and we will also assume the users are sip peers.

what you can do is add a entry in the sip.conf for the users such as

setvar=call_ID=1234123456

then in the dialplan have

exten => s,n, Set(CALLERID(num)=${call_ID})

Ian

Hi Ian,

thanks for your quick reply.

I am using SIP peers, correct.

In your solution a sip peers gets a specific CallerID. What i want is, that when user A is Calling Number 123, it gets Callerid 20. When the same User A is calling number 456, it gets Callerid 30. I have a list of approx 10 external Numbers where another Callerid must be applied.

Mod

Ok thats simple

store the calleriD in the astdb then do a look up of that to check if the dialed number matches and then set that caller id

Ian

Hi,
i am not an experienced asterisk-admin, so could you please give more details (exten.conf)? Where do i find the astdb?

Florian