Site Search
Navigation

Kiva - loans that change lives

Make a Difference

Visit the

Forum

Welcome

Thanks for visiting.  This site contains information about everthing I publish and is intended to provide helpful resources, news, and reviews primary (but not limited to) the area of open source telephony and VoIP. 

I'll be glad to answer any questions or accept feedback, so please feel free click on the contact tab or comment on an article.  I am an open source PBX and VoIP consultant, and will be happy to help you!  I hope you enjoy the site- Jeff

« Simple Asterisk Voicemail Instructions | Main | Digium rolls out new IAX security- what you should know »
Thursday
17Sep2009

Using FreePBX to Forward Calls by CID

Suppose you have a specific caller (or callers) that you need to send elsewhere, be it another extension, ring group, mobile or other external number.  There are a few ways to do this, and it doesn't require a lot of effort.  These instructions are for one of the many Asterisk aggregations that use FreePBX, but pure Asterisk installers should be able to gleen enough information to adapt it into their dialplans.  The only prerequisite is that you have the calling party's caller ID number, as this is how the call will be processed and routed to another destination.  Let's begin.

 

Ring Group Method:

This requires that a special ring group be setup and contain the extension(s) or external number(s) to forward to.  It's also the only method listed here that will ring multiple numbers (works great sending a call to a single number as well).

Step 1:  Create the ring group

Using FreePBX's gui, go to Setup->Ring Groups->Add Ring Group.  The ring group number will automatically fill in, but you can change it according to your needs.  Fill in the 'Group Description' box with a meaningful name (ie, TomsCell or Sales).

Ring Strategy: This is set according to your needs.  If this group is going to a single number, then 'ringall' is what you need.  If the ring group is going to have multiple numbers, select 'ringall' if you want all numbers to be called simultaneously, or 'hunt' if you want them called in their listed order.

Extension List:  Add the number(s) you wish to call.  When adding external numbers add them in the 1NXXNXXXXXX# format.  Notice the trailing '#', this tells asterisk to immediately send the call out the trunk. 

Destination if no answer:  Here you have some choices, if the call isn't picked up during the ring time you will need to designate where to send it.  An extension voicemail, another ring group, terminate call, pick one that's appropriate for your needs.

The other options (mouse-over for descriptions) can also be set according to your needs.  Hit the 'Submit Changes' box and orange 'Apply Changes' bar.

Step 2:  Add Incoming Route

Using FreePBX gui, go to Setup->Inbound Routes->Add Incoming Route. 

Description: Make it meaningful (Joe's Big Client, Jane's Personal Trainer, John's Wife, etc)

DID Number: Your incoming DID number

Caller ID Number: The CID number you wish to match

Set Destination: Select the Ring Group that you created above

Hit the 'Submit Changes' box and orange 'Apply Changes' bar.  You're all set!

 

 Miscellaneous Destination Method:

For forwarding to a single number, you can create a miscellaneous destination for the number you wish to forward calls to.

Step 1:  Create Miscellaneous Destination

Go to Setup->Misc Destination->Add Misc Destination

Description:  Add the name for your destination

Dial: Add the number for your destination

Hit the 'Submit Changes' box and orange 'Apply Changes' bar.

Step 2:  Add Incoming Route

This is a repeat of step two above, except it will be pointed to the newly created Misc Destination.
Using the FreePBX gui, go to Setup->Inbound Routes->Add Incoming Route. 

Description: Make it meaningful (Joe's Big Client, Jane's Personal Trainer, John's Wife, etc)

DID Number: Your incoming DID number

Caller ID Number: The CID number you wish to match

Set Destination: Select the Misc Destination you just created

Hit the 'Submit Changes' box and orange 'Apply Changes' bar.  Done!

 

For either method, if you find that the calling party's CID isn't being passed to the forwarded number(s), add these two lines to your sip_custom.conf file (or iax_custom.conf file if connect to your outgoing provider via IAX):

trustrpid=yes

sendrpid=yes

 

Let me know how it goes, and please feel free to leave comments!

 

 

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments (1)

Greetings from Singapore. I have this working brilliantly for a couple of phones in our office. I haven't explored the time condition capabilities of *, but could this be used with this as well for office mates that need phones to ring elsewhere during certain times on a regular basis?

September 20, 2009 | Unregistered CommenterJason

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>