From owner-freebsd-isdn@FreeBSD.ORG Fri Jan 13 01:33:27 2006 Return-Path: X-Original-To: freebsd-isdn@freebsd.org Delivered-To: freebsd-isdn@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EE38516A422 for ; Fri, 13 Jan 2006 01:33:27 +0000 (GMT) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0540743D46 for ; Fri, 13 Jan 2006 01:33:26 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: Y1QAsIk9O44SO+J/q9KNyQ== X-Cloudmark-Score: 0.000000 [] Received: from mp-217-36-223.daxnet.no ([193.217.36.223] verified) by mailfe01.swip.net (CommuniGate Pro SMTP 5.0.2) with ESMTP id 71293128 for freebsd-isdn@freebsd.org; Fri, 13 Jan 2006 02:33:25 +0100 From: Hans Petter Selasky To: freebsd-isdn@freebsd.org Date: Fri, 13 Jan 2006 02:33:31 +0100 User-Agent: KMail/1.7 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601130233.31735.hselasky@c2i.net> Subject: Re: chan_capi with Asterisk 1.2.1 X-BeenThere: freebsd-isdn@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hselasky@c2i.net List-Id: Using ISDN with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2006 01:33:28 -0000 Hi, Sorry for late reply. On Thursday 12 January 2006 19:04, Maarten Dekker wrote: > Hello Hans Petter, > > I have installed the latest Asterisk version (1.2.1). Where did you get it? From ports? > I have installed just Asterisk, so no Zaptel and others. > > Does the chan_capi that you provided me a while ago work with this > version? I don't know. > > After the Asterisk install I did: > cd /root/chan_capi.hps > khif01# gmake Could you do: gmake clean Then: gmake all install And post what it outputs? > gmake: Nothing to be done for `all'. > khif01# gmake install > for x in chan_capi.so; do install -m 755 $x > /usr/local/lib/asterisk/modules ; done > khif01# > > make does not seem to work so I used gmake. > > When I start asterisk it fails: > == Parsing '/usr/local/etc/asterisk/modules.conf': Found > [chan_capi.so]Jan 4 19:09:13 WARNING[36465]: loader.c:325 > __load_resource: /usr/local/lib/asterisk/modules/chan_capi.so: Undefined > symbol "ast_pthread_create" > Jan 4 19:09:13 WARNING[36465]: loader.c:499 load_modules: Loading module > chan_capi.so failed! > > Any ideas? > Could you look up the sources. If you installed from ports then go to: /usr/ports/net/asterisk/work/a*[129] Then "cat *[ch] | less" Search for "pthread" and see if you can find the equivalent. Else just add the following to "chan_capi.c", somewhere before "ast_pthread_create()" is used: static int ast_pthread_create(pthread_t *thread, pthread_attr_t *attr, void *(*start_routine)(void *), void *data) { pthread_attr_t lattr; if (!attr) { pthread_attr_init(&lattr); attr = &lattr; } errno = pthread_attr_setstacksize(attr, PTHREAD_ATTR_STACKSIZE); if (errno) ast_log(LOG_WARNING, "pthread_attr_setstacksize returned " "non-zero: %s\n", strerror(errno)); return pthread_create(thread, attr, start_routine, data); } --HPS