(gdb) bt
#0 0x000000322d8079ec in pthread_mutex_lock () from /lib64/tls/libpthread.so.0
#1 0x000000000041c0fe in ast_mutex_lock (pmutex=0x98) at include/asterisk/lock.h:592
#2 0x000000000041e406 in detach_spies (chan=0x1cb3dc0) at channel.c:1084
#3 0x000000000041efb0 in ast_hangup (chan=0x1cb3dc0) at channel.c:1276
#4 0x0000002a964bf82e in chan_hangup (cx=0x1934980, obj=0x17ac020, argc=0, argv=0x1942910, rval=0x407138f0)
at res_js.c:1018
#5 0x0000002a9650a6a2 in js_Invoke (cx=0x1934980, argc=0, flags=0) at jsinterp.c:1280
#6 0x0000002a9651bcf8 in js_Interpret (cx=0x1934980, result=0x40714220) at jsinterp.c:3372
#7 0x0000002a9650b2be in js_Execute (cx=0x1934980, chain=0x17a9d00, script=0x1958eb0, down=0x0, flags=0, result=0x407148a0)
at jsinterp.c:1509
#8 0x0000002a964d24c0 in JS_ExecuteScript (cx=0x1934980, obj=0x17a9d00, script=0x1958eb0, rval=0x407148a0) at jsapi.c:3553
#9 0x0000002a964be7f0 in eval_some_js (code=0x40714580 "TeleAuto.js", cx=0x1934980, obj=0x17a9d00, rval=0x407148a0)
at res_js.c:410
#10 0x0000002a964c1de7 in js_exec (chan=0x1933cf0, data=0x40718b90) at res_js.c:1954
#11 0x0000000000444cf1 in pbx_exec (c=0x1933cf0, app=0x6a1f20, data=0x40718b90, newstack=1) at pbx.c:544
#12 0x0000000000448d41 in pbx_extension_helper (c=0x1933cf0, con=0x0, context=0x1933ec8 "from-pstn",
exten=0x1933fbc "5034167460", priority=1, label=0x0, callerid=0x18f7950 "5032419756", action=1) at pbx.c:1687
#13 0x000000000044a2e5 in ast_spawn_extension (c=0x1933cf0, context=0x1933ec8 "from-pstn", exten=0x1933fbc "5034167460",
priority=1, callerid=0x18f7950 "5032419756") at pbx.c:2220
#14 0x000000000044a809 in __ast_pbx_run (c=0x1933cf0) at pbx.c:2286
#15 0x000000000044b643 in pbx_thread (data=0x1933cf0) at pbx.c:2507
#16 0x000000322d8060aa in start_thread () from /lib64/tls/libpthread.so.0
#17 0x000000322cfc5b43 in clone () from /lib64/tls/libc.so.6
#18 0x0000000000000000 in ?? ()
(gdb) print *chan