keywords: ip pbx voip gateway gsm gateway

×

Notice

The forum is in read only mode.
× Questions about B100/200/400/800 ISDN BRI Cards

openvox BRI card + mISDN + chan_capi

14 years 1 month ago #4931 by Denins.Den
my environment:
intel DG41MJ motherbroad
openvox B200P
debian lenny 5.0.3
mISDN-1.1.9.1
chan_capi-1.1.4
asterisk-1.4.26.2

1. install the mISDN, asterisk, then modify chan_capi-1.1.4/chan_capi.c
    add some head files:

#include "chan_capi_platform.h" //under this line

#include <asterisk/strings.h>
#include <asterisk/dsp.h>
#include <asterisk/devicestate.h>
#include <asterisk/features.h>


then complie chan_capi

2. modify the /usr/sbin/mISDN in line 186, add # in the head, add a new line " HFCMULTI_layermask[${i}]="0x1f,0x1f"  " under line 186

3. modify /etc/asterisk/modules.conf, add those:
   load => res_features.so
load => chan_capi.so
[global]
chan_capi.so=yes

4. my capi.conf like:

[general]
nationalprefix=0        ; or for example "+49"
internationalprefix=00  ; or for example "+"
;subscriberprefix=+4969 ; prefix including area code (some lines need this)
rxgain=1.0       ;linear receive gain (1.0 = no change)
txgain=1.0       ;linear transmit gain (1.0 = no change)
language=de      ;set default language
;ulaw=yes        ;set this, if you live in u-law world instead of a-law
;jb.....         ;with Asterisk 1.4 you can configure jitterbuffer,
                 ;see Asterisk documentation for all jb* setting available.
;mohinterpret=default ;Asterisk 1.4: default music on hold class when placed on hold.
; interface sections ...
[ISDN1]          ;this example interface gets name 'ISDN1' and may be any
                 ;name not starting with 'g' or 'contr'.
                 ;Use one interface section for each ISDN port!
;ntmode=yes      ;if the ISDN card operates in NT-mode, set this to 'yes'
isdnmode=msn     ;'MSN' (point-to-multipoint) or 'DID' (direct inward dial)
                 ;when using NT-mode, 'DID' should be set in any case
incomingmsn=*    ;allow incoming calls to this list of MSNs/DIDs, * = any
;defaultcid=123  ;set a default caller ID to that interface for dial-out,
                 ;this caller ID will be used when the dial option 'd' is set.
;controller=0    ;ISDN4BSD default
;controller=7    ;ISDN4BSD USB default
controller=1     ;CAPI controller number of this interface/port
group=1          ;dialout group
;prefix=0        ;set a prefix to the calling number on incoming calls
softdtmf=on      ;enable/disable software DTMF detection, recommended for AVM cards
relaxdtmf=on     ;in addition to softdtmf, you can use relaxed DTMF detection
faxdetect=off    ;enable faxdetection and redirection to EXTEN 'fax' for incoming and/or
                 ;outgoing calls. (default='off', possible values: 'incoming','outgoing','both')
faxdetecttime=0  ;Only detect faxes during the first 'n' seconds of the call.
                 ;(default '0' meaning for the whole duration of the call)
;accountcode=     ;PBX accountcode to use in CDRs
;amaflags=default;AMA flags for CDR ('default', 'omit', 'billing', or 'documentation')
context=from-isdn  ;context for incoming calls
;holdtype=hold   ;when the PBX puts the call on hold, ISDN HOLD will be used. If
                 ;set to 'local' (default value), no hold is done and the PBX may
                 ;play MOH.
;immediate=yes   ;DID: immediate start of PBX with extension 's' if no digits were
                 ;     received on incoming call (no destination number yet)
                 ;MSN: start PBX on CONNECT_IND and do not wait for SETUP/SENDING-COMPLETE.
                 ;     info like REDIRECTINGNUMBER may be lost, but this is necessary for
                 ;     drivers/pbx/telco which does not send SETUP or SENDING-COMPLETE.
;echosquelch=1   ;_VERY_PRIMITIVE_ echo suppression. Disable it before you start recording voicemail
                 ;or your files may get choppy. (you can use capicommand(echosquelch|no) for this)
;echocancel=yes  ;Dialogic(R) Diva(R) (CAPI) echo cancellation (yes=g165)
                 ;(possible values: 'no', 'yes', 'force', 'g164', 'g165')
;echocancelpath=1;Dialogic(R) Diva(R) (CAPI) echo cancellation path
                 ;(possible values: default '1' - E.1/T.1/S0, '2' - IP, '3' - both)
;echocancelold=yes;use facility selector 6 instead of correct 8 (necessary for older eicon drivers)
;echotail=64     ;echo cancel tail setting (default=0 for maximum)
;echocancelnlp=1 ;activate non-linear-processing; this improves echo cancel ratio, but might
                 ;incorporate variable gain in the signal path.
bridge=no        ;native bridging (CAPI line interconnect) if available
;callgroup=1     ;PBX call group
;pickupgroup=1   ;PBX pickup group (which call groups are we allowed to pickup)
;transfergroup=1 ;Controller(s) where a transfer on native bridge is allowed to.
;language=de     ;set language for this device (overwrites default language)
;disallow=all    ;RTP codec selection (valid with Dialogic(R) Diva(R) Media Boards only)
;allow=all       ;RTP codec selection (valid with Dialogic(R) Diva(R) Media Boards only)
devices=2        ;number of concurrent calls (B-Channels) on this controller
                 ;(2 makes sense for single BRI, 30/23 for PRI/T1)
;jb.....         ;with Asterisk 1.4 you can configure jitterbuffer,

                 ;see Asterisk documentation for all jb* setting available.
;mohinterpret=default ;Asterisk 1.4: default music on hold class when placed on hold.
;qsig=1           ;enable use of Q.SIG extensions. ECMA Variant
;qsig_prnum=1234  ;enable inbound bridging - this should be an QSIG-network-wide unique number
[ISDN2]
;isdnmode=msn
controller=2
bridge=no
echocancel=noi
incomingmsn=*
context=from-isdn
devices=2


5. add those in extensions.conf


[from-isdn]
exten => s, 1, answer()
exten => s, 2, Dial(SIP/100)
exten => s, 3, hangup
[from-sip]
exten => 1, 1, Dial(CAPI/ISDN2/xxxx(the number you want to dial)/b)
exten => 1, n, hangup

6. add a sip account in sip.conf

[100]
type=friend
username=100
secret=100
host=dynamic
context=from-sip

7. Now you can use those command to start:

modprobe capi
mISND start
asterisk -vvvvvvvvvvvvvvgc

8. the use command " capi info " & " capi show channels " to check

9. You can dial in or dial out with the soft phone if all those step are work.
Time to create page: 0.041 seconds
Powered by Kunena Forum