[asterisk-users] PBX -> PRI -> * -> Telco not working

Tony Mountifield tony at softins.clara.co.uk
Sat Nov 15 16:37:10 CST 2008


In article <57a815bf0811151112idbec4deobd93e43b9d701f33 at mail.gmail.com>,
Mikel Lindsaar <raasdnil at gmail.com> wrote:
> 
> Good.  Got the darn thing working.

Good news! Been away from the computer for a while, so wasn't able to
keep up with your efforts.

> Problem was the NEC Xen Master does post-connect DTMF to dial.  So I had to
> read the digits after connect.
> 
> Then, I had to configure the PRI to be pridialplan = unknown
> 
> Thanks for your help Tony.

You're welcome. Glad to have provided some pointers.

Actually, if Read() works, then WaitExten should have worked too. I expect
what was missing was the Answer(). So this ought to work as an alternative:

[from-nec]
exten => s,1,Answer()
exten => s,n,Set(TIMEOUT(digit)=2)
exten => s,n,Set(TIMEOUT(response)=5)
exten => s,n,WaitExten()
exten => _X.,1,Dial(DAHDI/g2/${EXTEN},,Tr)

This would allow you to match different patters to route to different
destinations (e.g. some calls to VoIP or to internal functions such as
conferencing).

Also, there is one improvement I think might be made to either, and that
is to replace the 'r' flag (always generate ringing) with a call to
Progress() before the Dial:

exten => _X.,1,Progress()
exten => _X.,n,Dial(DAHDI/g2/${EXTEN},,T)

or similarly for your Read() solution. Unless I've missed something, that
ought to allow your callers to hear proper busy tones if the call is busy,
or ringing tone if it rings. It might even be possible to put Progress()
before WaitExten() to avoid duplicating it in different dial patterns.

Cheers
Tony

> Here is the end result for Google's sake
> 
> 
> 
> #############################################
> ### /etc/dahdi/system.conf
> #############################################
> #
> # Span 1: TE2/0/1 "T2XXP (PCI) Card 0 Span 1" (MASTER)
> span=1,1,0,ccs,hdb3,crc4
> # termtype: te
> bchan=1-15,17-31
> dchan=16
> echocanceller=mg2,1-15,17-31
> 
> # Span 2: TE2/0/2 "T2XXP (PCI) Card 0 Span 2"
> span=2,2,0,ccs,hdb3,crc4
> # termtype: te
> bchan=32-46,48-62
> dchan=47
> echocanceller=mg2,32-46,48-62
> 
> 
> # Global data
> 
> loadzone = au
> defaultzone = au
> 
> 
> 
> 
> #############################################
> ### /etc/asterisk/chan_dahdi.conf
> #############################################
> [trunkgroups]
> 
> [channels]
> 
> #include dahdi-channels.conf
> 
> usecallerid=yes
> callwaiting=yes
> usecallingpres=yes
> callwaitingcallerid=yes
> threewaycalling=yes
> transfer=yes
> canpark=yes
> cancallforward=yes
> callreturn=yes
> echocancel=yes
> echocancelwhenbridged=yes
> 
> 
> callgroup=1
> pickupgroup=1
> 
> language=en
> hidecallerid=no
> callerid=asreceived
> restrictcid=no
> 
> 
> 
> 
> 
> 
> #############################################
> ### /etc/asterisk/dahdi-channels.conf
> #############################################
> ; Span 1: TE2/0/1 "T2XXP (PCI) Card 0 Span 1" (MASTER)
> group=1
> context=from-nec
> switchtype = euroisdn
> signalling = pri_net
> channel => 1-15,17-31
> 
> ; Span 2: TE2/0/2 "T2XXP (PCI) Card 0 Span 2"
> group = 2
> switchtype = euroisdn
> signalling = pri_cpe
> pridialplan=unknown
> context = from-pstn
> channel=>32-46,48-62
> 
> 
> 
> 
> 
> #############################################
> ### extensions.conf (relevant bits)
> #############################################
> 
> [from-pstn]
> exten => _555555XX,1,Dial(DAHDI/g1/${EXTEN},,T)
> 
> [from-nec]
> exten => s,1,Answer()
> exten => s,n,Set(TIMEOUT(digit)=2)
> exten => s,n,Set(TIMEOUT(response)=5)
> exten => s,n,Read(DialedNumber)
> exten => s,n,Dial(DAHDI/g2/${DialedNumber},,Tr)
> 
> -=-=-=-=-=-
> [Alternative: text/html]
> -=-=-=-=-=-
> -=-=-=-=-=-
> 
> _______________________________________________
> -- 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
> -=-=-=-=-=-


-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-users mailing list