Skip to main content

Sort callerid on inbound route

Posted by diffen on Mon, 11/15/2010

Hello,

Is it possible to sort an incoming call on the caller id? What I want to do is to send all the calls that have +46X to one IVR and all other calls to another IVR. Is that possible to do?

Br

Jörgen


Submitted by eeman on Mon, 11/15/2010 Permalink

yes its possible, no it isn't simple. We wrote one for a call company that had different groups or queues based on the region that the customer is located. The AGI script compares the callerid information to matches in the table and selects the most specific match. It did not use patterns, basically one loads the entire NPA structure into a flat-file database and it returns what extension to direct the call to. Those 'extensions' can be feature codes that route to ivr's or queues or hunt lists for that matter.

If your interested I could sell you what we wrote fairly cheap, save you on programming time etc. The customer we did the work for wanted a low-cost solution so there's no gui to load the table data, instead its done in excel and exported to a flat file.

Submitted by diffen on Tue, 11/16/2010 Permalink

Hello

Hmmm ok sounds very complicated, shouldn´t something like this work?

exten => 206,1,GotoIf($["${CALLERID(num)}" = "303"]?dial1)
exten => 206,n,GotoIf($["${CALLERID(num)}" != "304"]?moh:dial2)
exten => 206,n(dial1),Dial(${SPHONE1},15,rt)
exten => 206,n,Hangup()
exten => 206,n(dial2),Dial(${PHONE2},15,rt)
exten => 206,n,Hangup()
exten => 206,n(moh),MusicOnHold(default)

but instead of 303 i use _+46X. dial Swedish IVR and instead of != 304 i use != _+46X. dial English IVR.

Submitted by chris on Wed, 11/17/2010 Permalink

You should be able to do something like exten => 206,1,GotoIf($["${CALLERID(num):0:3}" = "+46"]?dial1) as long as you want to match all callerids starting with +46.

Submitted by diffen on Wed, 11/24/2010 Permalink

Hello jimellis,

I haven´t had time to try this out yet but i will do that this weekend. We have a couple of new installations this week so all my time will go to doing that. But i will get back to you when I have tested it.