[Asterisk-bsd] Problen with ZAPTEL on my FreeBSD box

Andrew A. Kochetkoff andrews at mtelecom.chita.ru
Sat Apr 2 07:39:48 CST 2005


Hi, Konstantin

Konstantin Prokazoff wrote:
> Welcome!
> 
>     Version of zaptel you are using?
> 
> Best regards, Konstantin Prokazoff
> Center Of Excellence, SVR Ltd., Kyiv HQs, Ukraine
> Official business-partner & DevConnect member of Avaya, Inc.
> tel. +38 044 244 11 81, fax. +38 044 234 04 55
> 
> ----- Original Message ----- 
> From: "Andrew A. Kochetkoff" <andrews at mtelecom.chita.ru>
> To: "Asterisk on BSD discussion" <asterisk-bsd at lists.digium.com>
> Sent: Saturday, April 02, 2005 10:58 AM
> Subject: [Asterisk-bsd] Problen with ZAPTEL on my FreeBSD box
> 
> 
> 
>>Hi everybody!
>>
>>Help me please.
>>
>>I use ztdummy on my FreeDSD box.
>>When I try reboot my box or do "kldunload zaptel.ko" i heve kernel panic.
>>How correct this?
>>
>>Regards,
>>Andrew Kochetkoff
>>_______________________________________________
>>Asterisk-BSD mailing list
>>Asterisk-BSD at lists.digium.com
>>http://lists.digium.com/mailman/listinfo/asterisk-bsd
>>
> 
> _______________________________________________
> Asterisk-BSD mailing list
> Asterisk-BSD at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-bsd
> 
> 
I resolve my problem.
I just changed my zaptel.sh script like this:

zaptel.sh
#!/bin/sh
#
# Add the following lines to /etc/rc.conf to enable zaptel:
#
# zaptel_enable="YES"
# ztdummy_only="YES"  ; If you want use ztdummy
#

PREFIX=/usr/local
LIBDIR=${PREFIX}/lib/zaptel

if [ -z "${source_rc_confs_defined}"]; then
   if [ -r /etc/defaults/rc.conf ]; then
     . /etc/defaults/rc.conf
     source_rc_confs
   elif [ -r /etc/rc.conf ]; then
     . /etc/rc.conf
   fi
fi

case "$1" in
   start)
     case "${zaptel_enable}" in
     [Yy][Ee][Ss])
       /sbin/kldload ${LIBDIR}/zaptel.ko || exit 1
       case "${ztdummy_only}" in
       [Yy][Ee][Ss])
         /sbin/kldload ${LIBDIR}/ztdummy.ko || exit 1
         echo -n " zaptel loaded"
       ;;
       [Nn][Oo])
         /sbin/kldload ${LIBDIR}/wcfxo.ko || exit 1
         /sbin/kldload ${LIBDIR}/wcfxs.ko || exit 1
         if [ ! -d /dev/zap ]
         then
           mkdir -p /dev/zap || exit 1
         fi
         if [ ! -c /dev/zap/channel ]
         then
           /sbin/mknod /dev/zap/channel c 196 254 || exit 1
         fi
         if [ ! -c /dev/zap/ctl ]
         then
           /sbin/mknod /dev/zap/ctl c 196 0 || exit 1
         fi
         if [ ! -c /dev/zap/pseudo ]
         then
           /sbin/mknod /dev/zap/pseudo c 196 255 || exit 1
         fi
         if [ ! -c /dev/zap/timer ]
         then
           /sbin/mknod /dev/zap/timer c 196 253 || exit 1
         fi
         z=" zaptel"
         if /usr/sbin/pciconf -l | /usr/bin/grep -q ^wcfxo
         then
           for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
           do
             if /usr/sbin/pciconf -l | /usr/bin/grep -q ^wcfxo${i}
             then
               if [ ! -c /dev/wcfxo${i} ]
               then
                 /sbin/mknod /dev/wcfxo${i} c 197 ${i} || exit 1
               fi
             fi
           done
           ${PREFIX}/bin/ztcfg 2> /dev/null
         else
           if /usr/sbin/pciconf -l | /usr/bin/grep -q ^wcfxs
           then
             for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
             do
               if /usr/sbin/pciconf -l | /usr/bin/grep -q ^wcfxs${i}
               then
                 if [ ! -c /dev/wcfxs${i} ]
                 then
                   /sbin/mknod /dev/wcfxo${i} c 198 ${i} || exit 1
                 fi
               fi
             done
             ${PREFIX}/bin/ztcfg 2> /dev/null
           else
             z=""
           fi
         fi
       ;;
       esac
     ;;
     esac
   ;;
   stop)
     case "${ztdummy_only}" in
     [Yy][Ee][Ss])
       /sbin/kldunload ztdummy.ko || exit 1
     ;;
     [Nn][Oo])
       /sbin/kldunload wcfxs.ko || exit 1
       /sbin/kldunload wcfxo.ko || exit 1
     ;;
     esac
     /sbin/kldunload zaptel.ko || exit 1
     echo -n " zaptel unload"
   ;;
   *)
     echo ""
     echo "Usage: `basename $0` { start | stop }"
     echo ""
     exit 64
   ;;
esac

I think, that it is much will facilitate a life

Regards,
Andrew A. Kochetkoff


More information about the Asterisk-BSD mailing list