Re: [Asterisk-Users] New PRI with DID in US?

2004-12-12 Thread Kevin Blackham
On Fri, 10 Dec 2004 17:26:48 -0600, Rich Adamson [EMAIL PROTECTED] wrote:
 Just turned up a new PRI with DID's in the US. I'm receiving 5 digits
 of the DID numbers as I requested.
 
 Assuming I have 100 DID numbers but only define 50 of those in
 extensions.conf, is there an easy way to send the incoming calls
 for the 20 undefined numbers to a common resource (ivr, operator,
 or canned message) without having to define each one?

I handle my DIDs with a macro.  A DBget fetches a target for Goto.  If
the key doesn't exist, it jumps to a hangup macro that can either drop
with PRI_CAUSE=1 (invalid) or play Zapateller and ss-noservice.gsm
twice, then hang up with PRI_CAUSE=31, depending on how you want it to
work.  Of course, don't answer first, and if you do Playback(),
remember the noanswer option and play a silence/1 first..

Some samples from database show (numbers changed to protect the
guilty, and I receive full 10 digits)
/DID/9001235900   : mainmenu|s
/DID/9001235904   : 104  
/DID/9001235917   : 117  
/DID/9001235939   : 139  
/DID/9001235942   : 142  
/DID/9001235970   : 170  
/DID/9001235949   : disa|s

[from-pstn]
exten = _NXXNXX,1,Macro(did,${EXTEN});

[macro-did]
exten = s,1,DBget(target=DID/${ARG1})
exten = s,2,Goto(${target},1); db should not include the priority
exten = s,102,SetVar(PRI_CAUSE=1); tells telco to play discon message
exten = s,103,Hangup; 
; target can be simply an extension: my stdexten does more DBget to find channel
exten = _1XX,1,Macro(stdexten,${EXTEN})
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] New PRI with DID in US?

2004-12-11 Thread Rich Adamson
  Just turned up a new PRI with DID's in the US. I'm receiving 5 digits
  of the DID numbers as I requested.
  
  Assuming I have 100 DID numbers but only define 50 of those in
  extensions.conf, is there an easy way to send the incoming calls
  for the 20 undefined numbers to a common resource (ivr, operator, 
  or canned message) without having to define each one?
 
 You should be able to us a pattern to match. By placing the catch-all 
 pattern in an included context it will only match if none of the actual 
 extensions match. 
 
 http://www.voip-info.org/wiki-Asterisk+config+extensions.conf+sorting
 

Excellent, thanks Peter. Exactly what I need.  :)



___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] New PRI with DID in US?

2004-12-11 Thread Andrew Kohlsmith
On December 10, 2004 06:26 pm, Rich Adamson wrote:
 Assuming I have 100 DID numbers but only define 50 of those in
 extensions.conf, is there an easy way to send the incoming calls
 for the 20 undefined numbers to a common resource (ivr, operator,
 or canned message) without having to define each one?

I have 30 (Bell sends us 7 digits) -- I define the ones I actually use first, 
then add this below -- this is hte last entry in that context for me:

; example of a DID I'm actually using:
exten = 2922022,1,Dial(IAX2/[EMAIL PROTECTED],,g)
exten = 2922022,n,Macro(handle-hangup)

; catch-all that matches anything I have not explicitly matched above:
exten = _29220XX,1,Wait(1)
exten = _29220XX,n,Playback(vm-num-i-have)
exten = _29220XX,n,SayDigits(${EXTEN})
exten = _29220XX,n,Playback(vm-goodbye)
exten = _29220XX,n,Hangup

Piece of cake.

-A.
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] New PRI with DID in US?

2004-12-10 Thread Rich Adamson
Just turned up a new PRI with DID's in the US. I'm receiving 5 digits
of the DID numbers as I requested.

Assuming I have 100 DID numbers but only define 50 of those in
extensions.conf, is there an easy way to send the incoming calls
for the 20 undefined numbers to a common resource (ivr, operator, 
or canned message) without having to define each one?


___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] New PRI with DID in US?

2004-12-10 Thread William Suffill
quickest would be pattern matching and just make the reoccuring patern
of #'s so you don't have to list em one at a time.
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] New PRI with DID in US?

2004-12-10 Thread Peter Svensson
On Fri, 10 Dec 2004, Rich Adamson wrote:

 Just turned up a new PRI with DID's in the US. I'm receiving 5 digits
 of the DID numbers as I requested.
 
 Assuming I have 100 DID numbers but only define 50 of those in
 extensions.conf, is there an easy way to send the incoming calls
 for the 20 undefined numbers to a common resource (ivr, operator, 
 or canned message) without having to define each one?

You should be able to us a pattern to match. By placing the catch-all 
pattern in an included context it will only match if none of the actual 
extensions match. 

http://www.voip-info.org/wiki-Asterisk+config+extensions.conf+sorting

Peter

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users