[Asterisk-Users] Xorcom Rapid

Tzafrir Cohen tzafrir.cohen at xorcom.com
Fri Jun 9 08:47:25 MST 2006


On Fri, Jun 09, 2006 at 04:50:11PM +0200, Olivier Saulnier wrote:
> Hello,
> 
> I've install Rapid for try to solve my problems of external acces (i 
> can't receive and send calls).
> I nedd some more information:
> On a Bristuff what are the channels names??
> For outgoing call, i name the channel ZAP/1 in extensions.conf file, but 
> i dont know if it's correct.
> And i always have the message "timeout, but no rule 't' in context XXXX
> What's mean??
> 
> I give some files:
> 
> zaptel.conf:
> --------------
> # Autogenerated by /usr/sbin/genzaptelconf -- do not hand edit
> # Zaptel Configuration File
> #
> # This file is parsed by the Zaptel Configurator, ztcfg
> #
> 
> # It must be in the module loading order
> 
> 
> # Span 1: ztqoz/2/1 "quadBRI PCI ISDN Card 1 Span 1 [TE] (cardID 0)"
> span=1,1,1,ccs,ami
> # termtype: te
> bchan=1-2
> dchan=3
> 
> # Span 2: ztqoz/2/2 "quadBRI PCI ISDN Card 1 Span 2 [TE] (cardID 0)"
> span=2,1,1,ccs,ami
> # termtype: te
> bchan=4-5
> dchan=6
> 
> # Span 3: ztqoz/2/3 "quadBRI PCI ISDN Card 1 Span 3 [TE] (cardID 0)"
> span=3,1,1,ccs,ami
> # termtype: te
> bchan=7-8
> dchan=9
> 
> # Span 4: ztqoz/2/4 "quadBRI PCI ISDN Card 1 Span 4 [TE] (cardID 0)"
> span=4,1,1,ccs,ami
> # termtype: te
> bchan=10-11
> dchan=12

I'm still not hapy with that as a default. It should provide you a basis
for manual editing at this stage. But I wonder what else could the
script configured there differently. Are those sane defaults for BRI on
France?

> 
> # Global data
> 
> loadzone    = fr
> defaultzone    = fr
> 
> 
> zaptel-channels.conf:
> ------------------------
> ; Autogenerated by /usr/sbin/genzaptelconf -- do not hand edit
> ; Zaptel Channels Configurations (zapata.conf)
> ;
> ; This is not intended to be a complete zapata.conf. Rather, it is intended
> ; to be #include-d by /etc/zapata.conf that will include the global settings
> ;
> 
> ; Span 1: ztqoz/2/1 "quadBRI PCI ISDN Card 1 Span 1 [TE] (cardID 0)"
> group=0
> context=PSTN
> switchtype = euroisdn
> signalling = bri_cpe
> channel => 1-2
> 
> ; Span 2: ztqoz/2/2 "quadBRI PCI ISDN Card 1 Span 2 [TE] (cardID 0)"
> group=0
> context=PSTN
> switchtype = euroisdn
> signalling = bri_cpe
> channel => 4-5
> 
> ; Span 3: ztqoz/2/3 "quadBRI PCI ISDN Card 1 Span 3 [TE] (cardID 0)"
> group=0
> context=PSTN
> switchtype = euroisdn
> signalling = bri_cpe
> channel => 7-8
> 
> ; Span 4: ztqoz/2/4 "quadBRI PCI ISDN Card 1 Span 4 [TE] (cardID 0)"
> group=0
> context=PSTN
> switchtype = euroisdn
> signalling = bri_cpe
> channel => 10-11
> 
> 
> extensions.conf:
> ----------------
> [general]
> static=yes
> ; we don't want asterisk to write the configuration, as it will write
> ; everything to a single file
> writeprotect=yes
> 
> [globals]
> #include "extensions-defs.conf"
> 
> ; another #include. This one includes complete contetexts.
> ; What happens if a section that has existed is re-added?
> ;
> ; Currently Asterisk ignores the new section. And thus is is very simple
> ; to override existing extensions. However nobody guarantees that the
> ; configurations will be paserd the same way in the future. This is 
> intended
> ; for immediate hacks and for long-run system breakage.
> #include "extensions.d/*.conf"
> 
> ; Basically you should not edit this file to add new stuff: add/edit
> ; files in extensions.d/ instead. Fr instance: to add an IVR: look at
> ; extensions.d/ivr.conf and later on 'include => ivr' instead of
> ; 'include =>phone'
> 
> [macro-stdexten]
> ;
> ; Standard extension macro:
> ;   ${ARG1} - Device(s) to ring
> ;   ${ARG2} - flags for Dial: if empty: tr. pass '-' for no flags.
> ;   ${ARG3} - voicemail box. If empty: use the extension number.
> exten => s,1,SetVar(VMBOX=${MACRO_EXTEN}); default for VMBOX, if no ARG3
> exten => s,2,GotoIf($[${LEN(${ARG3})} = 0]?4)
> exten => s,3,SetVar(VMBOX=${ARG3})
> ; Ring the interface, 20 seconds maximum
> exten => s,4,SetVar(FLAGS=r)
> ; why 'x'? see bourne shell 101
> exten => s,5,GotoIf($[ "x${ARG2}" = x- ]?7); '-' as the 'flags' argument
> exten => s,6,SetVar(FLAGS=${ARG2})
> exten => s,7,Dial(${ARG1},20,${ARG2})
> ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
> exten => s,8,Goto(s-${DIALSTATUS},1)
> 
> ; If unavailable, send to voicemail w/ unavail announce
> exten => s-NOANSWER,1,Voicemail(u${VMBOX})
> ; If they press #, return to start
> exten => s-NOANSWER,2,Goto(${MACRO_CONTEXT},s,1)
> 
> ; If busy, send to voicemail w/ busy announce
> exten => s-BUSY,1,Voicemail(b${VMBOX})
> ; If they press #, return to start
> exten => s-BUSY,2,Goto(${MACRO_CONTEXT},s,1)
> 
> ; Treat anything
> exten => _s-.,1,Goto(s-NOANSWER,1)
> 
> ;
> ; You may want to improve this one
> ;
> [macro-stdmeetme]
> exten => s,1,MeetMe(${MACRO_EXTEN},M)
> 
> [macro-dialout]
> ;
> ; a macro for setting up a trunk
> ; usage:
> ;
> ; Arguments:
> ;
> ;  ARG1: trunk channels: a '&'-separated list of channels
> ;  ARG2: number: the number to dial.
> ;
> ; Example:
> ;
> ;   exten => _9.,Macro(dialout,Zap/1&Zap2,${EXTEN:1})
> ;
> exten => s,1,ChanIsAvail(${ARG1}); use
> exten => s,102,Goto(s-CHANUNAVAIL,1) ; this indicates that all lines
> exten => s,2,SetVar(DIALLINE=${AVAILORIGCHAN})
> exten => s,3,Goto(start,1) ;
> include => trunk-macros-common
> 
> [macro-trunksip]
> ;
> ; a macro for setting up a trunk
> ; usage:
> ;
> ; Arguments:
> ;
> ;  ARG1: trunk channel: a *single* channel name: SIP/peer, IAX2/peer
> ;                       Does this work for OH323?
> ;  ARG2: number: the number to dial.
> ;  ARG3 (optional): maximal number of calls allowed in this trunk.
> ;                   If not given: unlimited.
> ;
> ; Example:
> ;
> ;   exten => _9.,Macro(Zap/1&Zap2,${EXTEN:1})
> ;
> exten => s,1,GotoIf($["${ARG3}" = ""]?6)
> ; The group name is the sip/iax peer
> exten => s,2,Cut(GROUPNAME,ARG1,&,1); leave only the first target
> exten => s,3,Cut(GROUPNAME,GROUPNAME,/,2); extract peer name
> exten => s,4,SetGroup(${GROUPNAME})
> exten => s,5,CheckGroup(${ARG3})
> exten => s,106,Goto(s-CHANUNAVAIL,1)
> exten => s,6,SetVar(DIALLINE=${ARG1})
> exten => s,7,Goto(start,1)
> include => trunk-macros-common
> 
> [trunk-macros-common]
> ;
> ; a macro for setting up a trunk
> ; usage:
> ;
> ; Arguments:
> ;
> ;  DIALLINE: trunk channels: The channel through which to dial
> ;  ARG2:     number: the number to dial.
> ;
> ; Example:
> ;
> ;   exten => _9.,Macro(Zap/1&Zap2,${EXTEN:1})
> ;
> exten => start,1,Dial(${DIALLINE}/${ARG2})
> exten => start,2,Goto(s-${DIALSTATUS},1)
> exten => s-ANSWER,1,Goto(s-HANGUP,1)
> exten => s-HANGUP,1,Hangup
> exten => s-NOANSWER,1,Goto(s-HANGUP,1)
> exten => s-CHANUNAVAIL,1,Playtones(congestion)
> exten => s-CHANUNAVAIL,2,Wait(3)
> exten => s-CHANUNAVAIL,3,Goto(s-HANGUP,1)
> exten => s-BUSY,1,Playtones(busy)
> exten => s-BUSY,2,Wait(3)
> exten => s-BUSY,3,Goto(s-HANGUP,1)
> exten => s-CONGESTION,1,Goto(s-BUSY,1)
> exten => s-CANCEL,1,Goto(s-HANGUP,1)
> 
> [phones]
> ; conf files in the extensions-phones.d subdirectory should have no context.
> ; They are all to be part of the 'phones' context
> #include "extensions-phones.d/*.conf"
> include => phones-zap
> 
> 
> [PSTN]
> exten => 1,1,Dial (IAX2/300,20)
> exten => s,2,Voicemail, u300)
> 
> [INTERNAL]
> ;exten => 300,1,Dial(IAX2/10,20,tr)
> ;exten => 300,2,voicemail(u10)
> ;exten =>300,hangup
> ;exten => 300,2,voicemail(b10)
> ;exten =>300,103,hangup
> exten => _0.,1,Dial(ZAP/2/${EXTEN:3})
> exten => _3.,1,Dial(ZAP/2/${EXTEN:3})
> 
> 
> Best regards,
> 
> -- 
> Olivier Saulnier
> STEGANUX
> 1er étage Diamecans
> Bel Air
> 03410 St Victor
> T: 04.70.02.27.62
> F: 04.70.09.97.41
> http://www.steganux.com
> 
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
> 

-- 
Tzafrir Cohen      sip:tzafrir at local.xorcom.com
icq#16849755       iax:tzafrir at local.xorcom.com
+972-50-7952406           
tzafrir.cohen at xorcom.com  http://www.xorcom.com



More information about the asterisk-users mailing list