A question before I start

Hi all,

I hope somebody can answer this question yes or no as to whether I could make Asterisk do what we need it to before I embark upon the time and effort needed to learn the skills of setting up a system. I hope its yes because our alternative is expensive traditional systems.

We run a virtual office service in the UK for UK based professionals. We issue each of our clients with an SIP phone number for them to divert their phone to. The reason they each need a number is so we can identify the caller as CLI sends the originators number on a diverted call, that’s no good to us. Consequently we have a high amount of numbers incoming each with low traffic, average 2 calls a day.

My plan is for an Asterisk system on a server with softphones as extensions. The crucial thing is can a dial plan be configured that will pass the ID of the incoming line ringing to the softphone extension. For example; line 1 rings and this is identified by a softphone as line 1 (or better still our clients name), whilst this call is in progress line 3 rings which is routed to another extension showing that line 3 is ringing.

We are going to use a VOIP phone with a 10 line limit while I get this going. Our hardware is a MacG4 running OSX10.4 as a database server, (Hopefully this will be the exchange with its underlying UNIX, if not something new will have to be sought), a collection of Macs that will have softphone clients running. All connected through an ADSL router with wireless and hard wired connections.

Skills are pretty good if armed with reference material I believe I could configure a system using what’s provided. Playing with source code etc is probably too difficult to get involved with.

Many Thanks

Ok The answer is a “yes”


Thanks Ian

I am sure I will be back with some more dumb questions when I start on this.

From reading this, I got the understanding that when a call comes in and is forwarded to its first extension (in my case a sec.) it will display to her the name of the channel the call is coming from? Also will it just show the channel number or can I label this to display a name?



H i

You can set whatever you want as the callerID number and Name.


along with that can I display which channel the call is coming in from? For example several different phone numbers are going to be tunneled together (each number belonging to a different office). Then from there all calls will be routed to a sec. and she will take the call and then ask if the client wants to talk, then handle the call how ever it needs to be handled.

But what I need inoder for this is work is for the sec to be able to see which phone number or channel the call is coming in on. For example, if someone called 765-623-8890 she would answer the phone hello ABC Corp. or if someone called 765-425-7522 she would answer hello GHI Corp.

I hope that explains my question a little better, and thanks a ton for your help!!!


I use this technique for my call center. I’ve got 6 different DIDs which all lead to the same queue, however they are for three different businesses, each of which has two different departments, and my techs need to be able to know which business/department is being called when they answer the phone.

What works is to answer the call normally and just set the callerid name to whatever it needs to be.


exten => 7656238890,1,Answer
exten => 7656238890,2,Set(CALLERID(name)=Company A)
exten => 7656238890,3,Dial(SIP/100)

For me, I transfer them into a queue. For you, you can have it ring a secretary or call group or directory or whatever you need, and providing you have a phone which accepts callerid text, your secretary will know exactly who they’re calling for.

The other option is to get a multi-line phone and setup one line for each business. This can get confusing however.

I’m sure there’s multiple ways to do this, and Ian probably has a better one, but this is what I do and it seems to work well.

Thanks! That is exactly what I was looking for…

I will be setting the server up over the next week, so you might hear back from me. :smiley:

Thanks Again,

using call groups, you can prefix each incoming call with an identifier of where the call has come in from (trunk)

I edited this config to work with my internal network before I get the T1 installed. My config loooks like this:

;pickup line to transfer
exten => 1000,1,Answer
exten => 1000,2,Set(CALLERID(name)=Company A)
exten => 1000,3,Dial,SIP/User1 

;internal extesions
exten => 2000,1,Dial,SIP/User1

However I can not get the code to work when the 2 line is active. If I comment out the second line, for the caller id, the system will go right threw. But when line 2 the call times out.

Any Ideas?

I finally got my card, and then finally got Asterisk to see it… and now I have come accross a new error which I can not seem to get my arm around, and my due date is tomorrow. :-/ But the error I am getting now looks like this:

When you call into the system

Starting Zap/1-1 at incoming,s,1 Failed so falling back to exten 's'
Starting Zap/1-1 at incoming,s,1 still failed so falling back to context 'default'
Channel 'Zap/1-1' sent into invalid extension 's' in context default, but no invalid handler


channel => 1


exten => 7657341508,1,Answer()


If this is a direct quote from your extensions.conf, look closely at the first line, and you should be able to see the issue.

no it is not a direct quote, I have been using my laptop to post I am sorry… The server shows it as [incoming]

You’re using an analog card? It’s looking for extension s. Try changing your extension in the incoming context from 7657341508 to s.

if i change the number from 7657341508 to s it will work but then the problem from before comes back in that I can not see between the different number aka companys. Using your Callerid information. Right? Is this because it is an analog card? would trunks now be the better option? I am sorry for all the question, they are just running threw my mind.


something just hit me I am going to give it a try, in the zapata.config
just giving each channel its on context then in the extensions linking each context to the company it should ring for.

[quote=“cweeks”]something just hit me I am going to give it a try, in the zapata.config
just giving each channel its on context then in the extensions linking each context to the company it should ring for.[/quote]

That should work. But, yes, the problem you are having, wherein Asterisk does not identify incoming numbers, is due to you being on an analog circuit. If you were to move to a PRI or an ISDN connection, you would not have this issue, and Asterisk would identify incoming calls by the number dialed. I use a T1, and this works just fine for me.

The only way for you to get around this is to give each analog channel its own incoming context.