Unwanted fax calls

Hello all,

I am running into an issue with setting up the requirement for a caller to press 1 to continue their call. Here is the issue:

Unwanted calls from faxes to a particular line, which is routed to numerous people in a department.

My solution is likely the most simple of ones I can think of to handle this issue, which is why I feel having the requirement of “press 1 to continue your call”.

Here is my setup for the number in which is receiving the unwanted fax calls:

extensions.ael:

11231231234 => {
CALLERID(name)=“Call”;
Answer();
Wait(1);
BackgroundDetect(company-welcome,t);
&calldepartment(department);
};

I have of course replaced the real number with 11231231234, the call in CALLERID(name)=""; with Call, the BackgroundDetect(company-welcome,t); and department. Those aren’t the actual configured strings.

In sip.conf, I have the following:

[somethinghere]
context=inbound
type=peer
host=host
qualify=yes
canreinvite=no
username=11231231234
fromuser=11231231234
secret=something
port=port
insecure=port,invite
disallow=all
allow=ulaw
nat=yes

I’ve done the replace content above as well.

Is this possible to do and if so, how would I do this? I’ve spent hours on this idea, checked Google countless times, used all sorts of ways to accomplish this, with no success.

Here is my environment:

OS: Linux (CentOS 5.3)
Asterisk Version: 1.6.2.10

If more info is needed, please let me know.

I can do this in extensions.conf, but I don’t use extensions.ael. If the extensions.conf solution is good for you, I can give you an example.

You are using a very old and unsupported version of Asterisk. Don’t you think it’s time for an upgrade? :wink:

I can look into using this, but ael is what we use for these things, yet I believe this is simply because I am not 100% familiar with ael yet (learning though). What do you have in mind for extensions.conf?

The instance we’re running is heavily modified, and an upgrade is not something we’re prepared to do at this time, though perhaps in the future, it could be considered.

This is something I had in mind for extensions.conf

[telos-ivr-dan]
exten => s,1,Answer()
exten => s,n,Wait(0.5)
exten => s,n,Background(file_you_want_played)
exten => s,n,WaitExten(8)

exten => 1,1,Goto(where_you_want_to_go)

exten => t,1,Hangup()

exten => i,1,Hangup()

Sorry for the long delay before replying, but here is what I came up with using extensions.ael

Swift("Say something");
Swift(Please press any digit to continue your call|3000|10);
Read(SWIFT_DTMF);
&callqueue(dept,30);
AGI(mixmonitor.pl,${UNIQUEID},${CALLERID(number)},tech,${BRIDGEPEER});
&hangup(${DIALSTATUS});
&hangupcause(${EXTEN});
Voicemail(${deptvm:1});
Hangup();

Which is wrapped in a case statement and called via:

1231231234 = {
// Other code
&calldepartment(case);
// Other code
};

This works… kind of…

When someone calls, it instructs them to press a number, any number – that’s fine, that works… but if they don’t press a number, it waits the 10 seconds, and connects the call anyway. How can I make it wait until a number is pressed to continue? I’m googling this now, but not finding much, if I find something first, I’ll update my findings.