Thomas Andrews
2005-Apr-07 01:15 UTC
[Asterisk-Users] capi segfault when incoming call is answered
I have a Fritz! card set up to use capi, however when incoming calls to
the card are answered, asterisk segfaults. Here is the output of gdb:
#0 0x4014f7af in memcpy () from /lib/tls/libc.so.6
#1 0x081316b0 in ?? ()
#2 0x08130680 in ?? ()
#3 0x40432da6 in pipe_msg (PLCI=257, CMSG=0x405052c0) at chan_capi.c:1560
#4 0x40436f90 in capi_handle_msg (CMSG=0x101) at chan_capi.c:2379
#5 0x404362f7 in do_monitor (data=0x0) at chan_capi.c:2404
#6 0x400229b4 in start_thread () from /lib/tls/libpthread.so.0
#7 0x00000000 in ?? ()
The problem is at line 1560 in chan_capi.c:
memcpy(&b3buf[AST_FRIENDLY_OFFSET],(char
*)DATA_B3_IND_DATA(CMSG),DATA_B3_IND_DATALENGTH(CMSG));
I'm using chan_capi-0.3.5 with the patch from
http://www.levigo.de/VoIP/chan_capi-0.3.5-cvs-HEAD-patch.tar.bz2
(A similar thing happens when I make outgoing calls via the Fritz! card
- it segfaults as soon as the phone on the other end starts ringing)
Here's a bit more info from gdb:
8<-----------------------------8<-------------------------------8<------------------------------
#0 0x4014f7af in memcpy () from /lib/tls/libc.so.6
No symbol table info available.
#1 0x081316b0 in ?? ()
No symbol table info available.
#2 0x08130680 in ?? ()
No symbol table info available.
#3 0x40432da6 in pipe_msg (PLCI=257, CMSG=0x405052c0) at
chan_capi.c:1560
p = (struct capi_pipe *) 0x1e
CMSG2 = {ApplId = 1, Command = 131 '\203', Subcommand = 131
'\203', Messagenumber = 202, adr = {adrController = 131585,
adrPLCI = 131585, adrNCCI = 131585}, AdditionalInfo = CAPI_COMPOSE,
B1configuration = 0x0, B1protocol = 0, B2configuration = 0x0,
B2protocol = 0, B3configuration = 0x0, B3protocol = 0, BC = 0x0,
BChannelinformation = 0x0, BProtocol = CAPI_COMPOSE,
CalledPartyNumber = 0x0, CalledPartySubaddress = 0x0,
CallingPartyNumber = 0x0, CallingPartySubaddress = 0x0, CIPmask = 0,
CIPmask2 = 0, CIPValue = 0, Class = 0, ConnectedNumber = 0x0,
ConnectedSubaddress = 0x0, Data32 = 0, Data64 = 0, DataHandle = 0,
DataLength = 0, FacilityConfirmationParameter = 0x0, Facilitydataarray
= 0x0, FacilityIndicationParameter = 0x0,
FacilityRequestParameter = 0x0, FacilityResponseParameters = 0x0,
FacilitySelector = 0, Flags = 0, Function = 0, HLC = 0x0, Info = 0,
InfoElement = 0x0, InfoMask = 0, InfoNumber = 0, Keypadfacility = 0x0,
LLC = 0x0, ManuData = 0x0, ManuID = 0, NCPI = 0x0, Reason = 0,
Reason_B3 = 0, Reject = 0, Useruserdata = 0x0, SendingComplete = 0x0,
Data = 0xc <Address 0xc out of bounds>, l = 1, p = 1078220081,
par = 0x40449700 "\f", m = 0x0, buf = '\0' <repeats 179
times>}
error = 160
fr = {frametype = 4, subclass = 4, datalen = 0, samples = 128,
mallocd = 192, offset = 0, src = 0x4020aebc "Ä}\023", data = 0x41,
delivery = {tv_sec = 135278508, tv_usec = 135457433}, prev 0x818b820, next =
0x1}
b3buf = "H¢C@\n\000\000\000ÿÿÿÿ", '\0' <repeats 36
times>,
"Ðð\017@TZ\000\000xûÿ¿\000\000\000\000¼®
@\t\000\000\0000VP@HSP@\017\234\026@ý»\037@", '\0' <repeats 16
times>,
"N¢C@", '\0' <repeats 60 times>, "\n¼\037@",
'\0' <repeats 16 times>,
"¼® @\2048\024@0VP@\bVP@¼® @`UP@/N\024@\224SP@`U40¯UP@\000\000\000\000¼®
@\224SP@¬TP@P\000\000\000\036å\023@\224SP@Ï\232\016\bÈTP@`UP@\000\000\000\0004TP@\001\200û`UP@`UP@"...
j = 30
b3len = 0
dtmf = 30 '\036'
dtmflen = 1079005888
rxavg = 0
txavg = 0
8<-----------------------------8<-------------------------------8<------------------------------
Thomas Andrews
2005-Apr-07 02:22 UTC
[Asterisk-Users] capi segfault when incoming call is answered
On Thu, Apr 07, 2005 at 10:15:09AM +0200, Thomas Andrews wrote:> I have a Fritz! card set up to use capi, however when incoming calls to > the card are answered, asterisk segfaults.Just for the record, my capi.conf looks like this: [general] nationalprefix=0 internationalprefix=00 rxgain=0.8 txgain=0.8 [interfaces] msn=1842 incomingmsn=* controller=1 softdtmf=1 accountcodecontext=isdn-test devices=2 And the relevant bit in extensions.conf looks like this: [isdn-test] exten => s,1,Dial(Zap/7) Many thanks, Thomas
Craig Guy
2005-Apr-07 04:58 UTC
[Asterisk-Users] capi segfault when incoming call is answered
Try disabling early B3 disconnect. I had similar symptoms with a fritz! card with early B3 enabled. Craig ----- Original Message ----- From: "Thomas Andrews" <tandrews@grok.co.za> To: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-users@lists.digium.com> Sent: Thursday, April 07, 2005 5:22 PM Subject: Re: [Asterisk-Users] capi segfault when incoming call is answered> On Thu, Apr 07, 2005 at 10:15:09AM +0200, Thomas Andrews wrote: > > > I have a Fritz! card set up to use capi, however when incoming calls to > > the card are answered, asterisk segfaults. > > Just for the record, my capi.conf looks like this: > > [general] > nationalprefix=0 > internationalprefix=00 > rxgain=0.8 > txgain=0.8 > [interfaces] > msn=1842 > incomingmsn=* > controller=1 > softdtmf=1 > accountcode> context=isdn-test > devices=2 > > And the relevant bit in extensions.conf looks like this: > > [isdn-test] > exten => s,1,Dial(Zap/7) > > Many thanks, > Thomas > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Jason Williams
2005-Apr-20 05:28 UTC
[Asterisk-Users] capi segfault when incoming call is answered
On 4/7/05, Thomas Andrews <tandrews@grok.co.za> wrote:> On Thu, Apr 07, 2005 at 10:15:09AM +0200, Thomas Andrews wrote: > > > I have a Fritz! card set up to use capi, however when incoming calls to > > the card are answered, asterisk segfaults. >Have you tried a make clean then make install in the chan_capi source directory make sure the header files are built correctly. Jason