chan_capi with Asterisk 1.2.1
Hans Petter Selasky
hselasky at c2i.net
Thu Jan 12 17:33:28 PST 2006
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
More information about the freebsd-isdn
mailing list