Posted: Mon Mar 10, 2008 6:47 am Post subject: [Asterisk-bsd] isdn4bsd-asterisk setting for OpenVox B400P.
hello, all of users:
Firstly, i must say thanks to Hans, and other friends to help me. now it works with OpenVox B400P. It can support LEDs. wow! Since some users have problems with installation, i comes out a more detailed instruction for them. maybe, it can help them. if i missed something in the doc, please add on it. and try to be perfect. in my experience, you have to follow few steps:
hello, all of users:
Firstly, i must say thanks to Hans, and other friends to help me. now it works with OpenVox B400P. It can support LEDs. wow! Since some users have problems with installation, i comes out a more detailed instruction for them. maybe, it can help them. if i missed something in the doc, please add on it. and try to be perfect. in my experience, you have to follow few steps:
1) install freebsd-6.2 with source files:
run: sysinstall->configure->distributions->base, kernels, src and sys
and ports. if you not sure that, please select more options. it is very important for compiling isdn4bsd and kernels. please check it carefully.
2) portsnap fetch, it will take much time
3) portsnap extract
4) cd to asterisk port(usr/ports/net/asterisk(Asterisk 1.4.17) and make install clean to install asterisk with other packages.
5) install Subversion and created one dir call i4b under /usr/src
6) refer the doc from Hans to install svn code
Quote:
7) install chan_capi under /usr/src/i4b/i4b/trunk/chan_capi8) recompile kernel with capi and i4b. some people use kldload i4b, but i can not do that. edit the GENERIC and add these values:# i4b requiredoption IPR_VJdevice
"i4bdss1"device "i4b"device "i4btrc"device "i4bctl"device "i4brbch"device "i4btel"device ihfcdevice soundand recompile it and make depend and make install.9) after compile the kernel, you have to edit the capi.conf and extensiosn.conf under /usr/local/etc/asterisk. here, i list out my capi.conf and extensiosn.conf as a doc for you**************************capi.conf*****************; example "capi.conf";; FreeBSD: /usr/local/etc/asterisk/capi.conf; NetBSD: /usr/pkg/etc/asterisk/capi.conf; Linux: /etc/asterisk/capi.conf;[general];; In countries like Norway, the nationalprefix should; just be left empty.;nationalprefix=0internationalprefix=00rxgain=1.0txgain=1.0;ulaw=yes ;set this, if you live in u-law world instead of a-lawdebug=yes ;set this, if capi debugging should be enabled by default; interface sections ...;; This is an example for an ISDN adapter; configured for TE-mode:;[ISDN1] ;this example interface gets name 'ISDN1' and may be any ;name not starting with 'g' or 'contr'.isdnmode=msn ;'MSN'
(point-to-multipoint)incomingmsn=* ;allow incoming calls to this list of MSNs/DIDs, * == any;; Format of "incomingmsn" is like this:;; 0) This will only allow any MSN:;; incomingmsn=*;; 1) This will only allow (MSN == "1"):;; incomingmsn=1;; 2) This will only allow (MSN == "1") or (MSN == "2") or (MSN == "3"):;; incomingmsn=1,2,3;; 3) This will only allow (MSN == "1XX..") or (MSN == "2") or (MSN == "3XX.."):;; incomingmsn=1*,2,3*;; NOTE: When a number matches "1*", everything preceeding the "*" is ; stripped away from the incoming number. For example if "incomingmsn=1*" and ; the MSN is 1234, only 234 is passed to Asterisk.;controller=8 ;ISDN4BSD default (first controller)group=2 ;dialout group;prefix=0 ;set a prefix to calling number on incoming callssoftdtmf=1 ;enable/disable software dtmf detectionrelaxdtmf=off ;in addition to softdtmf, you can use ;relaxed dtmf detection, which implies softdtmf=yesaccountcode= ;Asterisk accountcode to use in CDRscontext=isdn_in_te ;context for incoming callsholdtype=local ;when Asterisk puts the call on hold, ISDN HOLD will be used. If ;set to 'local' (default value), no hold is done and Asterisk may ;play MOH.immediate=yes ;immediate start of pbx with extension 's' if no digits were ;received on incoming call (no destination number yet)echocancel=no ;disable echo canceller;echocancelold=yes;use facility selector 6 instead of correct 8 (necessary for older eicon drivers);echotail=64 ;echo cancel tail settingbridge=yes ;native bridging (CAPI line interconnect) if available;callgroup=1 ;Asterisk call group;deflect=1234567 ;deflect incoming calls to 1234567 if all B channels are busydevices=2 ;number of concurrent calls on this controller ;(2 makes sense for single BRI, 30 for PRI);wait_silence_samples=1000 ; wait for 1/8 second of silence before passing ; any audio (outgoing calls in te-mode only);dtmf_generate=yes ; set this if your [SIP] phone does not generate ; inband DTMF tones. It is not recommended to ; enable this. You should configure your [SIP] phone ; to generate both inband DTMF and SIP INFO.;; This is an example for an ISDN adapter; configured for NT-mode:;[ISDN2] ;this example interface gets name 'ISDN1' and may be any ;name not starting with 'g' or 'contr'.isdnmode=msn ;'MSN' (point-to-multipoint)incomingmsn=* ;allow incoming calls to this list of
MSNs/DIDs, * == any;; Format of "incomingmsn" is like this:;; 0) This will only allow any MSN:;; incomingmsn=*;; 1) This will only allow (MSN == "1"):;; incomingmsn=1;; 2) This will only allow (MSN == "1") or (MSN == "2") or (MSN == "3"):;; incomingmsn=1,2,3;; 3) This will only allow (MSN == "1XX..") or (MSN == "2") or (MSN == "3XX.."):;; incomingmsn=1*,2,3*;; NOTE: When a number matches "1*", everything preceeding the "*" is ; stripped away from the incoming number. For example if "incomingmsn=1*" and ; the MSN is 1234, only 234 is passed to Asterisk.controller=9 ;ISDN4BSD default (first controller)group=2 ;dialout
group;prefix=0 ;set a prefix to calling number on incoming callssoftdtmf=0 ;enable/disable software dtmf detectionrelaxdtmf=off ;in addition to softdtmf, you can use ;relaxed dtmf detection, which implies softdtmf=yesaccountcode= ;Asterisk accountcode to use in CDRscontext=isdn_in_te ;context for incoming callsholdtype=local ;when Asterisk puts the call on hold, ISDN HOLD will be used. If ;set to 'local' (default value), no hold is done and Asterisk may ;play MOH.immediate=yes ;immediate start of pbx with extension 's' if no digits were ;received on incoming call (no destination number yet)echocancel=no ;disable echo canceller;echocancelold=yes;use facility selector 6 instead of correct 8 (necessary for older eicon drivers);echotail=64 ;echo cancel tail settingbridge=yes ;native bridging (CAPI line interconnect) if available;callgroup=1 ;Asterisk call group;deflect=1234567 ;deflect
incoming calls to 1234567 if all B channels are busydevices=2 ;number of concurrent calls on this controller ;(2 makes sense for single BRI, 30 for PRI);wait_silence_samples=1000 ; wait for 1/8 second of silence before passing ; any audio (outgoing calls in te-mode only);dtmf_generate=yes ; set this if your [SIP] phone does not generate ; inband DTMF tones. It is not recommended to ; enable this. You should configure your [SIP]
phone ; to generate both inband DTMF and SIP INFO. [ISDN3] ;this example interface gets name 'ISDN1' and may be any ;name not starting with 'g' or 'contr'.isdnmode=msn ;'MSN' (point-to-multipoint)incomingmsn=* ;allow incoming calls to this list of MSNs/DIDs, * == any;; Format of "incomingmsn" is like this:;; 0) This will only allow any MSN:;; incomingmsn=*;; 1) This will only allow (MSN == "1"):;; incomingmsn=1;; 2) This will only allow (MSN == "1") or (MSN == "2") or (MSN == "3"):;; incomingmsn=1,2,3;; 3) This will only allow (MSN == "1XX..") or (MSN == "2") or (MSN == "3XX.."):;; incomingmsn=1*,2,3*;; NOTE: When a number matches "1*", everything preceeding the "*" is ; stripped away from the incoming number. For example if "incomingmsn=1*" and ; the MSN is 1234, only 234 is passed to Asterisk.;controller=10 ;ISDN4BSD default (first controller)group=2 ;dialout group;prefix=0 ;set a prefix to calling number on incoming callssoftdtmf=0 ;enable/disable software dtmf
detectionrelaxdtmf=off ;in addition to softdtmf, you can use ;relaxed dtmf detection, which implies softdtmf=yesaccountcode= ;Asterisk accountcode to use in CDRscontext=isdn_in_te ;context for incoming callsholdtype=local ;when Asterisk puts the call on hold, ISDN HOLD will be used. If ;set to 'local' (default value), no hold is done and Asterisk may ;play MOH.immediate=yes ;immediate start of pbx with extension 's' if no
digits were ;received on incoming call (no destination number yet)echocancel=no ;disable echo canceller;echocancelold=yes;use facility selector 6 instead of correct 8 (necessary for older eicon drivers);echotail=64 ;echo cancel tail settingbridge=yes ;native bridging (CAPI line interconnect) if available;callgroup=1 ;Asterisk call group;deflect=1234567 ;deflect incoming calls to 1234567 if all B channels are busydevices=2 ;number of concurrent calls on this controller ;(2 makes sense for single BRI, 30 for PRI);wait_silence_samples=1000 ; wait for 1/8 second of silence before passing ; any audio (outgoing calls in te-mode only);dtmf_generate=yes ; set this if your [SIP] phone does not generate ; inband DTMF tones. It is not recommended to ; enable this. You should configure your [SIP] phone ; to generate both inband DTMF and SIP INFO. [ISDN4] ;this example interface gets name 'ISDN1' and may be any ;name not starting with 'g' or 'contr'.isdnmode=msn ;'MSN' (point-to-multipoint)incomingmsn=* ;allow incoming calls to this list of MSNs/DIDs, * == any;; Format of "incomingmsn" is like this:;; 0) This will only allow any MSN:;; incomingmsn=*;; 1) This will only allow (MSN == "1"):;; incomingmsn=1;; 2) This will only allow (MSN == "1") or (MSN == "2") or (MSN == "3"):;; incomingmsn=1,2,3;; 3) This will only allow (MSN == "1XX..") or (MSN == "2") or (MSN ==
"3XX.."):;; incomingmsn=1*,2,3*;; NOTE: When a number matches "1*", everything preceeding the "*" is ; stripped away from the incoming number. For example if "incomingmsn=1*" and ; the MSN is 1234, only 234 is passed to Asterisk.;controller=11 ;ISDN4BSD default (first controller)group=1 ;dialout group;prefix=0 ;set a prefix to calling number on incoming callssoftdtmf=0 ;enable/disable software dtmf detectionrelaxdtmf=off ;in addition to softdtmf, you can use ;relaxed dtmf detection, which implies softdtmf=yesaccountcode= ;Asterisk accountcode to use in CDRscontext=isdn_in_te ;context for incoming callsholdtype=local ;when Asterisk puts the call on hold, ISDN HOLD will be used. If ;set to 'local' (default value), no hold is done and Asterisk may ;play MOH.immediate=yes ;immediate start of pbx with extension 's' if no digits were ;received on incoming call (no destination number yet)echocancel=no ;disable
echo canceller;echocancelold=yes;use facility selector 6 instead of correct 8 (necessary for older eicon drivers);echotail=64 ;echo cancel tail settingbridge=yes ;native bridging (CAPI line interconnect) if available;callgroup=1 ;Asterisk call group;deflect=1234567 ;deflect incoming calls to 1234567 if all B channels are busydevices=2 ;number of concurrent calls on this controller ;(2 makes sense for single BRI, 30 for PRI);wait_silence_samples=1000 ; wait for 1/8 second of silence before passing ; any audio (outgoing calls in te-mode only);dtmf_generate=yes ; set this if your [SIP] phone does not generate ; inband DTMF tones. It is not recommended to ; enable this. You should configure your [SIP] phone ; to generate both inband DTMF and SIP INFO.;example "extensions.conf" (Also see "capi.conf" example);; FreeBSD: /usr/local/etc/asterisk/extensions.conf; NetBSD: /usr/pkg/etc/asterisk/extensions.conf; Linux:
/etc/asterisk/extensions.conf;********************extensions.conf********************[isdn_in_te]exten => s,1,NoOp(Invalid incoming call ${EXTEN})exten => s,2,Dial(SIP/600)[from-internal]exten => 100,1,Dial(CAPI/contr11/1342439XXXXXX/b1,100,Tt)exten => 100,2,Hangupexten => 500,1,Dial(sip/500)exten => 500,2,Hganup;;exten => 100,1,Dial(CAPI/ISDN1/${CALLNUMBER[${CALLERIDNUM}]}:${DIALSTR}/bl)10) run the isdnconfig: isdnconfig -u 8(9,10,11) pcm_master -p DRVR_DSS1_TE11) run asterisk: asterisk -vvvvvvvvvvgc, pleae check chan_capi.soi called to controller 11, it works. i can call out and calling using this port.it also show erros when inbound call comes
in:************************************* == cd_free:1817:ENTRY=ISDN4:PLCI=0x040b:PBX_CHAN=CAPI/ISDN4/-2: == > CAPI: Command=DISCONNECT_IND, 0x848c: no call descriptor for PLCI=0x040b, MSGNUM=0x0000:[Mar 7 15:55:35] ERROR[692]: chan_capi.c:1643 cd_by_pbx_chan: PBX channel has no interface! == Spawn extension (isdn_in_te, s, 2) exited non-zero on 'CAPI/ISDN4/-2'[Mar 7 15:55:35] ERROR[692]: chan_capi.c:1643 cd_by_pbx_chan: PBX channel has no interface! > Data = 'ISDN4/' > Out of order update usecount!*************************that's all i did. hope somebody add more and make it as much complete as possible.Regards,James.zhu from OpenVox
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum