Shashi Dookhee
2009-Aug-12 19:33 UTC
[asterisk-users] Creating an IAX/SIP-to-ISDN PRI gateway
Hi all, I'd like to setup a really lean Asterisk installation that essentially has a full ISDN PRI (AT&T, T1, 23 B-chans, 1 D-chan, BZ8S, 5ESS, National dialplan) on a Digium TE207P adapter that all it does is convert the ISDN channels to SIP/IAX channels. Then I would add this Asterisk 'gateway' as a provider on one (or many) Asterisk systems on the back. With such a config I don't need anything like Voicemails, mailboxes, etc... All I want it to do is accept calls and 'passthru' the caller ID, and when it receives a call, send it to the appropriate Asterisk server based on Called ID (and, of course, passthru that 'Called ID' too). Any help is appreciated - the Asterisk config files are overwhelming and we need to get this done pretty quickly! Thanks in advance for your help! S.
Miguel Molina
2009-Aug-12 20:05 UTC
[asterisk-users] Creating an ISDN PRI-to-SIP/IAX2 gateway
Shashi Dookhee escribi?:> Hi all, > > I'd like to setup a really lean Asterisk installation that essentially has a full ISDN PRI (AT&T, T1, 23 B-chans, 1 D-chan, BZ8S, 5ESS, National dialplan) on a Digium TE207P adapter that all it does is convert the ISDN channels to SIP/IAX channels. Then I would add this Asterisk 'gateway' as a provider on one (or many) Asterisk systems on the back. > > With such a config I don't need anything like Voicemails, mailboxes, etc... All I want it to do is accept calls and 'passthru' the caller ID, and when it receives a call, send it to the appropriate Asterisk server based on Called ID (and, of course, passthru that 'Called ID' too). > > Any help is appreciated - the Asterisk config files are overwhelming and we need to get this done pretty quickly! > > Thanks in advance for your help! > > S. >Fair simple: 1. Configure your PRI correctly on zaptel.conf and zapata.conf. On zapata.conf your define a context for each span or group of spans. That context will be where a call will be routed into the dialplan, for example pri-incoming. 2. Create a dialplan (extensions.conf) with callerid patterns that do a Dial() to the appropriate asterisk servers, for example: [pri-incoming] exten => _1XXX,1,Dial(SIP/ast1) exten => _1XXX,n,Hangup() exten => _2XXX,1,Dial(SIP/ast2) exten => _2XXX,n,Hangup() exten => _3XXX,1,Dial(IAX2/ast1) exten => _3XXX,n,Hangup() exten => _3XXX,1,Dial(IAX2/ast2) exten => _3XXX,n,Hangup() That way you get an incoming ISDN PRI to SIP or IAX2 gateway. Modify the dialplan patterns according to your needs. For your PRI zaptel.conf and zapata.conf there's plenty or info on the web to setup it. Hope you get the idea. Cheers, -- Ing. Miguel Molina Grupo de Tecnolog?a Millenium Phone Center
Dave Fullerton
2009-Aug-12 20:20 UTC
[asterisk-users] Creating an IAX/SIP-to-ISDN PRI gateway
Shashi Dookhee wrote:> Hi all, > > I'd like to setup a really lean Asterisk installation that essentially has a full ISDN PRI (AT&T, T1, 23 B-chans, 1 D-chan, BZ8S, 5ESS, National dialplan) on a Digium TE207P adapter that all it does is convert the ISDN channels to SIP/IAX channels. Then I would add this Asterisk 'gateway' as a provider on one (or many) Asterisk systems on the back. > > With such a config I don't need anything like Voicemails, mailboxes, etc... All I want it to do is accept calls and 'passthru' the caller ID, and when it receives a call, send it to the appropriate Asterisk server based on Called ID (and, of course, passthru that 'Called ID' too). > > Any help is appreciated - the Asterisk config files are overwhelming and we need to get this done pretty quickly! > > Thanks in advance for your help!Not exactly sure what information you're asking for, but here's a starting point. You'll need the latest DAHDI, libpri and asterisk (I'd grab 1.4.26.1 myself). Compile and install each in turn. As for configuration files, you should only need to worry about the following: /etc/dahdi/system.conf (this will get you started) # define spans span=1,0,0,esf,b8zs bchan=1-23 dchan=24 # Global Options loadzone=us defaultzone=us in /etc/asterisk: You can either "make samples" to install all sample files or you can copy the sample files from /usr/src/asterisk-1.4.26.1/configs/ (or wherever you extracted asterisk from). asterisk.conf (use the sample and tweak if needed) chan_dahdi.conf should look something like this: [channels] context=inbound-pri switchtype=national pridialplan=unknown resetinterval=never signalling=pri_cpe group=1 channel=>1-24 extensions.conf (you'll find plenty of examples online) iax.conf (start with sample config and tweak to your liking) sip.conf (again, start with sample and tweak) logger.conf (sample will work) modules.conf (start with sample) indications.conf (use the sample) Good Luck -Dave
Steve Edwards
2009-Aug-14 03:14 UTC
[asterisk-users] Creating an IAX/SIP-to-ISDN PRI gateway
On Wed, 12 Aug 2009, Shashi Dookhee wrote:> I'd like to setup a really lean Asterisk installation that essentially > has a full ISDN PRI (AT&T, T1, 23 B-chans, 1 D-chan, BZ8S, 5ESS, > National dialplan) on a Digium TE207P adapter that all it does is > convert the ISDN channels to SIP/IAX channels. Then I would add this > Asterisk 'gateway' as a provider on one (or many) Asterisk systems on > the back.I did something almost exactly like this for a client about 5 years ago, but we used 1 te410p in each pizza box with the 4 PRI's in an NFAS group.> With such a config I don't need anything like Voicemails, mailboxes, > etc... All I want it to do is accept calls and 'passthru' the caller > ID, and when it receives a call, send it to the appropriate Asterisk > server based on Called ID (and, of course, passthru that 'Called ID' > too).I "screen" each incoming call so I can discard [unwanted|abusive] callers on the "telco servers" before I hand off to the "application servers." On Wed, 12 Aug 2009, Dave Fullerton wrote:> extensions.conf (you'll find plenty of examples online) > iax.conf (start with sample config and tweak to your liking) > sip.conf (again, start with sample and tweak) > logger.conf (sample will work) > modules.conf (start with sample) > indications.conf (use the sample)I'd take a slightly different tack. I wouldn't start with the samples. I'd start with empty files and copy the bare minimum from the sample files until it works and then I would: ) Add access control features to [iax|sip].conf ) Only log to a central log host via syslog so you can [analyze|ignore] everything at once. My /etc/syslog.conf only has a single line: "*.* @loghost" Also, you reduce disk I/O and space consumption. I do use the sample indications.conf because I've never taken the time to figure out what I really need. "Building up" the conf files helps you understand exactly what you are doing and why. Also, as any good mechanic will tell you, parts left out don't get broke. This is most of my extensions.conf: [globals] HOSTNAME = ${ENV(HOSTNAME)} SERVER = iax2/${HOSTNAME}:${HOSTNAME}@192.168.0.x ; all calls start here [block-ani] exten = _x.,1, verbose(1,[${CONTEXT}:${EXTEN}]) exten = _x.,n, answer() exten = _x.,n, set(DNIS=${EXTEN}) ; update the channel status in the database exten = _x.,n, agi(update-channel-status,--offhook,--debug,--verbose) ; see if this ANI should be blocked exten = _x.,n, agi(block-ani) exten = _x.,n, goto(${STATUS},1) ; hand off to the application server exten = SUCCESS,1 dial(${SERVER}/${DNIS}) exten = SUCCESS,n, hangup() ; hangup exten = FAILURE,1, playback(redirect) exten = FAILURE,n, hangup() The AGIs are written in C so the performance "hit" is a very small fraction of that of AGIs written in Perl or PHP. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000