Inbound DID

I have a T-1 line that has about 100 DID numbers asociated with it. I would like to have asterisk get the digits from the phone company and display the number and an associated name with that number so that the operator know to pickup the phone and answer with the correct company name. It would be best if it could be displayed on the PC that the operator is sitting at.


i’ve done similar things using a MySQL table and an AGI script, that then feeds a string out to a listener app such as YAC - to create a popup and optionally, a link to a webpage. there are plenty of other apps out there that can do some or all of what you want.

it’s not difficult to achieve, but if you’re a complete newbie to this and have a deadline, you might be best asking for commercial help.

this might be useful too : … tification

How many companies are you talking about?
If it is only a few, you could just setup incoming routes for ech did and manually set the caller ID to what you want…

If there are quite a few, then one of the other solutions would work better…

That is the information I needed and it will work to have it pop up on a computer. I was also wondering if there was a way to have it send that information to a caller ID box setup as an extension.


sure, it just needs to be dialled with every incoming call. although you’ll have to figure out what happens if you have 2 or more simultaneous incoming calls ringing. if it’s for record-keeping or someone else to watch, it would be much easier using CDR or similar.

I think I may have not been clear, I under stand that it can only show one call at a time, however I don’t need to see the caller ID of the person that is calling, I need to see the DID or the number they dialed to call into my pbx so that they know how to answer the phone. So if you dialed 2225551212 when the phone rang they secrutery could see that number and the name the line belongs to and answer the call appropriately. The phone company is sending the DID along the inbound t-1 trunk.

ok, what wasn’t clear from your post that there was a phone as well as the CallerID box on that extension.

so yes, you could set the CallerID to the text you want to display (the company name) and it should display ok. but iirc, not all CallerID boxes like text, you’ll need to establish this.

Thanks for the help.

The callerID and the Extention that rings would actually be seperate extentions and I still might just have it popup on her screen. I have been able to get it to show the ID of the Caller but I need it to show the DID of the Incoming Trunk.


What you need is something like this

exten => s,1, SetCallerID(<$EXTEN>)
exten => s,n,Dial(whoever)

But the only way I know to do it would be to use a goto to jump to the context for each did and set it like this

exten => s,1, SetCallerID(<1112222>)
exten => s,n,Dial(whoever)

I think I have a basic understand now and will work on it. If anyone is doing this same thing and has a step by steop on the setup I would greatly appreciate it.


This is on a somewhat smaller scale, but I have a situation where we have several companies that our receptionist answers the phone for. In our case, when she answers, I use the playback feature of the Dial command to play a sound file that I recorded back to her. The sound file says something to the effect of “Call coming in for Company A”, then it connects her to the caller. At this point, she can greet the caller appropriately.

we use the Set(CALLERID(num)) and Set(CALLERID(name)) functions for a purpose very similar to this. we have several compliance lines that all ring the same user/phone, and she needs to know how to answer. all i do is manually set the callerID name value to that company, and then leave the inbound callerID alone.

works great, and gives her all the info she could use.