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

Kevin Blackham blackham at gmail.com
Sun Dec 12 23:42:09 MST 2004


On Fri, 10 Dec 2004 17:26:48 -0600, Rich Adamson <radamson at routers.com> 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 => _NXXNXXXXXX,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})



More information about the asterisk-users mailing list