Dialplan: Inbound callerid

I’m kind of new to asterisk and am trying to understand how to make a dialplan. Our hardphones display 2 lines for callerid. By default both lines show the phone number of the caller. I want the first line to say which line its calling and the second line to be the callers phone number.

example:

[quote]Toll Free 1
9252345678
[/quote]

I tried this:

[quote]exten => 9999999999,1,SetCallerId(Toll Free 1)
exten => 9999999999,2,Dial(SIP/1004,20)
exten => 9999999999,3,VoiceMail(1004@default)
exten => 9999999999,4,PlayBack(vm-goodbye)
exten => 9999999999,5,Wait(2)
exten => 9999999999,6,HangUp()[/quote]

and I get this:

[quote]Toll Free 1
Asterisk
[/quote]

How do I change the 2nd line from “Asterisk” to the callers phone number?

Your phones prob have two lines for the cid name and number. Try this.

In place of.

try.

See there are two variables one for the name and one for the number. There is another one that has both I think that is what you are messing up. Change the name and leave the number as is.

Hope that helps.

Thanks! That is exactly what I was looking for.