Filter out same inbound call on other trunks

Commercial and business-oriented Asterisk discussion.

Moderator: Moderator

Filter out same inbound call on other trunks

Postby blaze985 » Wed Oct 21, 2015 5:01 am

Hi,

I have this problem with one of my clients.
They use more(for a simplicity lets say 3) PSTN lines coming from one(same) telecom provider. When someone tries to calls one of the lines, the telecom provider uses ringall strategy and then all of them are signaling asterisk(3 lines ring at same time, showing the same incoming CID). I fight with the telcom but they are saying it cannot be changed to linear logic :)

Now what I need is a small adaptation on the asterisk inbound routes module, where if a same call(same CID) comes in on a x trunks with in a window of lets say 4-5sec, one of the incaming calls to be placed for a farther processing, and all of the rest n-1 calls to be discarded as not needed...

Can this be done?
I havent programmed C in a long time, but should be not that hard to change inside the inbound module.

Blaze
blaze985
Newsterisk
 
Posts: 7
Joined: Wed May 27, 2015 3:25 pm

Re: Filter out same inbound call on other trunks

Postby satish4asterisk » Thu Oct 22, 2015 2:48 am

Probably you can use GROUP(https://wiki.asterisk.org/wiki/display/ ... tion_GROUP) and GROUP_COUNT(https://wiki.asterisk.org/wiki/display/ ... ROUP_COUNT) functions to achieve what you want.
Don't forget to clear out Group after ~4 seconds on a call which is being processed by dialplan.

--Satish Barot
satish4asterisk@gmail.com
satish4asterisk
Oldsterisk
 
Posts: 210
Joined: Fri Dec 23, 2011 1:12 am

Re: Filter out same inbound call on other trunks

Postby david55 » Sat Oct 24, 2015 4:56 am

There isn't an inbound routes module.

As hinted at in the previous reply, that sort of thing would normally be done in the dialplan, which is something that is always provided by the end user (or a third party). I'm not convinced that GROUP COUNT is a useful approach. I think you would need to use a combination of locks and database accesses.

Depending on the nature of your callers, and the country you are in, you may find that you have a requirement to remove old entries from the database, for data protection reasons, which might be the most difficult part of the job.

If there were an inbound routes module, the chances are that there would be a lot of locking involved in this, and locking problems cause the most difficult to debug Asterisk failures, so coding would be non-trivial.

I would note that the service being offered by the PSTN operator is basically not PABX friendly and seems very strange. I'm wondering if it is some sort of Centrex offering, where the PSTN operator simulates the PABX and expects to connect to individual phones, rather than a standard, business line, hunt group.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am


Return to Asterisk Biz & Jobs

Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests