Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Pre-pending certain digits (like 9) to an o


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
jkinard at closeup.org
Guest





PostPosted: Mon Mar 17, 2008 5:29 pm    Post subject: [asterisk-users] Pre-pending certain digits (like 9) to an o Reply with quote

Hey all,

Working slowly on getting the myriad number of parts to my fax system plan together, and one of the pieces I want to nail is how to go about, for the outbound context (fax-out) pre-pending a digit onto a number? I.e., for all my testing right now, I've been dialing '91XXXXXXXXXX', as the asterisk server doing faxing junctions into my old Rolm CBX switch, and so I need the '9' digit to dial outside numbers. However, for deployment, I'd like to save the users confusion and have the server automatically append that leading '9' digit.

That possible by chance? I assume it is, but off the top of my head, it didn't seem intuitive. Below is the exten lines for my [fax-out] context, followed by some test exten lines that wound up failing:

exten => _X.,1,Dial(Zap/g1/${EXTEN}|20)
exten => _X.,n,Busy
exten => _X.,n,Hangup

; Test appending 9?
;;exten => _9XNPANXXXXXX,1,Dial(Zap/g1/${EXTEN}|20)
;;exten => _9XNPANXXXXXX,n,Busy
;;exten => _9XNPANXXXXXX,n,Hangup
I was trying to do some basic matching to the NANP formula to catch when someone accidentally mistypes a number, but that didn't match up and asterisk was complaining that no exten lines in the [fax-out] context were matching.

Also, is it possible offhand to block the dialing of certain numbers in the same context? I.e., just as a check, to block faxes to 900 numbers? I believe my Rolm CBX will do this for me, as it's got a pretty extensive list of area codes and exchanges that are known to be sinister in nature pre-loaded (probably needs updating, though...), but I figured that if I could block it in asterisk, to do so. Save the Rolm a wee bit of processing and all (it is old, and probably senile...)

That, and I'd like to filter accidental '9911...' dials using this technique (which would dial 911 emergency, and that wouldn't be good, since I doubt faxes are a good method of calling in an emergency (unless they have a color fax and can discern that the red ink really isn't red ink...)).

Thoughts anyone? Thanks!,

--Josh
Back to top
jkinard at closeup.org
Guest





PostPosted: Mon Mar 17, 2008 5:44 pm    Post subject: [asterisk-users] Pre-pending certain digits (like 9) to an o Reply with quote

-----Original Message-----
Quote:
From: Gerald A

Try:
exten => _X.,1,Dial(Zap/g1/9${EXTEN}|20)

You want to add the number automagically, not match it being dialled.

Doh!</homer>

I knew it'd be simple. I categorically blame Monday for the lapse in my ability to have seen the obvious Razz

Thanks!
Back to top
Guest






PostPosted: Mon Mar 17, 2008 5:52 pm    Post subject: [asterisk-users] Pre-pending certain digits (like 9) to an o Reply with quote

Like this?

exten => _XNPANXXXXXX,1,Dial(Zap/g1/9${EXTEN}|20)

Notice it matches 18005551212 and it dials 918005551212. (The 9 before the ${EXTEN})

Moj

Joshua Kinard wrote:
Quote:
Hey all,

Working slowly on getting the myriad number of parts to my fax system plan together, and one of the pieces I want to nail is how to go about, for the outbound context (fax-out) pre-pending a digit onto a number? I.e., for all my testing right now, I've been dialing '91XXXXXXXXXX', as the asterisk server doing faxing junctions into my old Rolm CBX switch, and so I need the '9' digit to dial outside numbers. However, for deployment, I'd like to save the users confusion and have the server automatically append that leading '9' digit.

That possible by chance? I assume it is, but off the top of my head, it didn't seem intuitive. Below is the exten lines for my [fax-out] context, followed by some test exten lines that wound up failing:

exten => _X.,1,Dial(Zap/g1/${EXTEN}|20)
exten => _X.,n,Busy
exten => _X.,n,Hangup

; Test appending 9?
;;exten => _9XNPANXXXXXX,1,Dial(Zap/g1/${EXTEN}|20)
;;exten => _9XNPANXXXXXX,n,Busy
;;exten => _9XNPANXXXXXX,n,Hangup


I was trying to do some basic matching to the NANP formula to catch when someone accidentally mistypes a number, but that didn't match up and asterisk was complaining that no exten lines in the [fax-out] context were matching.

Also, is it possible offhand to block the dialing of certain numbers in the same context? I.e., just as a check, to block faxes to 900 numbers? I believe my Rolm CBX will do this for me, as it's got a pretty extensive list of area codes and exchanges that are known to be sinister in nature pre-loaded (probably needs updating, though...), but I figured that if I could block it in asterisk, to do so. Save the Rolm a wee bit of processing and all (it is old, and probably senile...)

That, and I'd like to filter accidental '9911...' dials using this technique (which would dial 911 emergency, and that wouldn't be good, since I doubt faxes are a good method of calling in an emergency (unless they have a color fax and can discern that the red ink really isn't red ink...)).

Thoughts anyone? Thanks!,

--Josh

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services