jerry@voiptower.com
2005-Jun-11 23:55 UTC
[Asterisk-Users] Not answering inbound a line used for outbound
Hi, I've dug a bit through the wiki and the mailing lists, and haven't really seen anything like this, but there must be someone out there doing this. Basically, there is a fax line that I don't want to answer inbound, but I want it available to do dial out from. Right now, we are using a busy wait around the ringing line, but I was hoping for something that might be a little more elegant. Here is the dialplan snip: exten => s,1,Wait(1) exten => s,2,GoTo(s,1) If I'm on the console when a call comes in, it loops through this bit of code a bunch of times. I'm guessing I could lengthen the "Wait(1)" time, but is there any other way to do this? Now, two other related questions: Can Asterisk recognize that something other then a Zap card has a line offhook? (ie there is a fax transmission in progress) Can I do something interesting with CallerID? (for example, create a log of all faxes that called us, or answer certain numbers inside of asterisk) Do excuse me if this is all answered in some concise FAQ, but I've been seriously looking and haven't seen anything about it. Thanks, J
Dinesh Nair
2005-Jun-12 00:35 UTC
[Asterisk-Users] Not answering inbound a line used for outbound
On 06/12/05 14:55 jerry@voiptower.com said the following:> Basically, there is a fax line that I don't want to answer inbound, but I > want it available to do dial out from. Right now, we are using a busy wait > around the ringing line, but I was hoping for something that might be a > little more elegant. Here is the dialplan snip: > > exten => s,1,Wait(1) > exten => s,2,GoTo(s,1)that'll still leave the line offhook until the caller hangs up. why not just use Hangup() to hang up on any incoming call ? -- Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+
Rich Adamson
2005-Jun-12 07:11 UTC
[Asterisk-Users] Not answering inbound a line used for outbound
> I've dug a bit through the wiki and the mailing lists, and haven't really > seen anything like this, but there must be someone out there doing this. > > Basically, there is a fax line that I don't want to answer inbound, but I > want it available to do dial out from. Right now, we are using a busy wait > around the ringing line, but I was hoping for something that might be a > little more elegant. Here is the dialplan snip: > > exten => s,1,Wait(1) > exten => s,2,GoTo(s,1) > > If I'm on the console when a call comes in, it loops through this bit of > code a bunch of times. I'm guessing I could lengthen the "Wait(1)" time, > but is there any other way to do this?Sure there is, but without knowing what type of pstn interface your using, can't suggest an exact coding method. For me (with a TDM-fxo card), the zapata.conf entry for that channel has a context=nowhere kind of statement. Since the "nowhere" context doesn't exist, nothing in asterisk will answer that pstn line. You can also use one of the fax detect mechanisms (including spandsp) to sense incoming calls, and if its an incoming fax call send it to a message that says "this number doesn't accept fax calls" (or something like that). The folks that generate junk faxes won't listen to it (since they are automated anyway), but real fax users might. We use that mechanism when a fax number changes; let your live customers know the number has changed kind of thing.> Now, two other related questions: > Can Asterisk recognize that something other then a Zap card has a line > offhook? (ie there is a fax transmission in progress)You'll have to clearify the above better. If you're asking about another bridged phone on the same analog pstn line, no asterisk doesn't currently have code in it that would recognize speech on the line, lack of a dial tone, or any other parameter that would suggest the line is in use. (The TDM card's chipset can detect it, but the code isn't in asterisk to take advantage of it.)> Can I do something interesting with CallerID? (for example, create a log > of all faxes that called us, or answer certain numbers inside of asterisk)Sure you can. Take a look at the various README files in: /usr/src/asterisk/doc and particularily the README.variables file. However, be careful with CallerID assumptions. Telemarketing and junk fax generators typically disable sending any CallerID info, so it won't be all that useful.> Do excuse me if this is all answered in some concise FAQ, but I've been > seriously looking and haven't seen anything about it.There are lots of good references that come with the asterisk source code including the doc directory noted above, samples of various configurations in the configs directory, and the wiki (amoung others).
Jerry
2005-Jun-12 09:44 UTC
[Asterisk-Users] Not answering inbound a line used for outbound
Hi, On Sun Jun 12 02:35:27 CDT 2005 dinesh at alphaque.com wrote:> > On 06/12/05 14:55 jerry at voiptower.com said the following: > > Basically, there is a fax line that I don't want to answer inbound, but I > > want it available to do dial out from. Right now, we are using a busywait> > around the ringing line, but I was hoping for something that might be a > > little more elegant. Here is the dialplan snip: > > > > exten => s,1,Wait(1) > > exten => s,2,GoTo(s,1) > > that'll still leave the line offhook until the caller hangs up. why not > just use Hangup() to hang up on any incoming call ?I was apparently clear as mud in my first post, sorry about that. This Zap line (FXO) shares the PSTN line with a fax machine. We want to use it as an outbound line for voice calls, but never want to answer it inbound. This is the only bit that is in the start of the context, so the phone is in fact never answered. On the Asterisk console, I get to see it loop around. So, it works. But it just seems crufty to me. Would Hangup() work on an un-Answered() channel? That might be a way to do it, but I think that won't help, as the line will keep ringing. Thanks, J.