Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jan 2006 02:33:31 +0100
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        freebsd-isdn@freebsd.org
Subject:   Re: chan_capi with Asterisk 1.2.1
Message-ID:  <200601130233.31735.hselasky@c2i.net>
In-Reply-To: <Pine.CYG.4.58.0601041859170.4856@server01.datastorm.nl>
References:  <Pine.CYG.4.58.0601041859170.4856@server01.datastorm.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601130233.31735.hselasky>