SIP to H323 call crashes Asterisk-1.4.16/1.4.16.2/1.4.17

Recently I patched Asterisk 1.4.16/1.4.16.2/1.4.17 using www.b2bua.org codec negotiation patch. I tried on all versions.

After that when I make call from SIP endpoint to H323 network using chan_h323 driver Asterisk automatically crash.

I don’t know what problem happen with Asterisk.

Below is backtrace:

[New Thread -1243251792 (LWP 6599)]
– Executing [00197699014447@default:1] Dial(“SIP/1100008-081ce190”, "H323/0

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1243251792 (LWP 6599)]
0xb7f12024 in pthread_mutex_lock () from /lib/tls/i686/cmov/libpthread.so.0
(gdb)
(gdb) set disassembly-flavor intel
(gdb) disassemble $eip $eip+20
Dump of assembler code from 0xb7f12024 to 0xb7f12038:
0xb7f12024 <pthread_mutex_lock+36>: mov ecx,DWORD PTR [esi+12]
0xb7f12027 <pthread_mutex_lock+39>: cmp ecx,0x2
0xb7f1202a <pthread_mutex_lock+42>: je 0xb7f12070 <pthread_mutex_lock+11 2>
0xb7f1202c <pthread_mutex_lock+44>: cmp ecx,0x3
0xb7f1202f <pthread_mutex_lock+47>: je 0xb7f12080 <pthread_mutex_lock+12 8>
0xb7f12031 <pthread_mutex_lock+49>: cmp ecx,0x1
0xb7f12034 <pthread_mutex_lock+52>: je 0xb7f120f0 <pthread_mutex_lock+24 0>
End of assembler dump.
(gdb) info registers
eax 0x0 0
ecx 0x0 0
edx 0x2174 8564
ebx 0xb7f19ff4 -1208901644
esp 0xb5e51f38 0xb5e51f38
ebp 0xb5e51f58 0xb5e51f58
esi 0x2174 8564
edi 0x19c7 6599
eip 0xb7f12024 0xb7f12024 <pthread_mutex_lock+36>
eflags 0x210292 [ AF SF IF RF ID ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
(gdb) bt
#0 0xb7f12024 in pthread_mutex_lock () from /lib/tls/i686/cmov/libpthread.so.0
#1 0x080d824d in ast_rtp_make_compatible (dest=0x823f5e8, src=0x81a2bc8, media= 1)
at /usr/src/asterisk-1.4.17/include/asterisk/lock.h:701
#2 0xb60eb498 in dial_exec_full (chan=0x81a2bc8, data=, pe erflags=0xb5e52f54, continue_exec=0x0)
at app_dial.c:1202
#3 0xb60f03e2 in dial_exec (chan=0x81a2bc8, data=0xb5e54fc8) at app_dial.c:1755
#4 0x080c984a in pbx_extension_helper (c=0x81a2bc8, con=0x0, context=0x81a2d48 “default”, exten=0x81a2d98 “00197699014447”,
priority=1, label=0x0, callerid=0x81d5318 “1100008”, action=E_SPAWN) at pbx. c:532
#5 0x080cc32a in __ast_pbx_run (c=0x81a2bc8) at pbx.c:2306
#6 0x080cd3ee in pbx_thread (data=0x81a2bc8) at pbx.c:2623
#7 0x080faee0 in dummy_start (data=0x81d5338) at utils.c:852
#8 0xb7f10240 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#9 0xb72e449e in clone () from /lib/tls/i686/cmov/libc.so.6
(gdb) l
2556 quit_handler(0, 0, 1, 0);
2557 }
2558 read(sig_alert_pipe[0], &a, sizeof(a));
2559 }
2560
2561 return NULL;
2562 }
2563
2564 int main(int argc, char *argv[])
2565 {
(gdb) q
The program is running. Exit anyway? (y or n) y
pbx:/home/balgaa#

I found that when dial from analog phone connected to FXS of TDM400, Asterisk never crash.

But there also interesting thing happen, i can hear ringing tone on analog phone. If I call from my H323 phone to same number there voice response saying “Your called person mobile phone is off”.

It show I can’t hear real ringing tone from H323 equipment.

I found that when dial from analog phone connected to FXS of TDM400, Asterisk never crash.

But there also interesting thing happen, i can hear ringing tone on analog phone. If I call from my H323 phone to same number there voice response saying “Your called person mobile phone is off”.

It show I can’t hear real ringing tone from H323 equipment.