<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I get from backtrace:<div class=""><br class=""></div><div class=""><div class="">Thread 168 (Thread 0x7fb5122be700 (LWP 1411)):</div><div class="">#0  0x00007fb57e0cdf0d in poll () from /lib64/libc.so.6</div><div class="">#1  0x00000000004b245c in ast_waitfor_nandfds (c=0x7fb554081db8, n=1, fds=0x7fb554081e50, nfds=1, exception=0x0, outfd=0x7fb5122b6c50, ms=0x7fb5122b6c54) at channel.c:3170</div><div class="">#2  0x0000000000484b87 in bridge_channel_wait (bridge_channel=0x7fb554081d80) at bridge_channel.c:2602</div><div class="">#3  0x00000000004853b1 in bridge_channel_internal_join (bridge_channel=0x7fb554081d80) at bridge_channel.c:2768</div><div class="">#4  0x000000000046b949 in ast_bridge_join (bridge=0x7fb554080590, chan=0x7fb560285300, swap=0x0, features=0x7fb5122b6dc0, tech_args=0x0, flags=(AST_BRIDGE_JOIN_PASS_REFERENCE | AST_BRIDGE_JOIN_INHIBIT_JOIN_COLP)) at bridge.c:1713</div><div class="">#5  0x000000000050a610 in ast_bridge_call_with_flags (chan=0x7fb560285300, peer=0x7fb554045c90, config=0x7fb5122b7e90, flags=0) at features.c:671</div><div class="">#6  0x000000000050a6e2 in ast_bridge_call (chan=0x7fb560285300, peer=0x7fb554045c90, config=0x7fb5122b7e90) at features.c:710</div><div class="">#7  0x00007fb535b8b4b7 in dial_exec_full (chan=0x7fb560285300, data=0x7fb5122b85d0 "SIP/CC-MOVEL-TDM-FT/33105587988477247,60,L(764234560:61000:30000)", peerflags=0x7fb5122bb290, continue_exec=0x0) at app_mbilling.c:2752</div><div class="">#8  0x00007fb535b90a5c in mbilling_exec (chan=0x7fb560285300, data=0x652b69 "") at app_mbilling.c:3959</div><div class="">#9  0x0000000000582bb1 in pbx_exec (c=0x7fb560285300, app=0x7fb57001f950, data=0x7fb5122bb4f0 "") at pbx_app.c:494</div><div class="">#10 0x000000000056ff34 in pbx_extension_helper (c=0x7fb560285300, con=0x0, context=0x7fb560285cb8 "billing", exten=0x7fb560285d08 "087988477247", priority=1, label=0x0, callerid=0x7fb56019b080 "4330152780", action=E_SPAWN, found=0x7fb5122bdba4, combined_find_spawn=1) at pbx.c:2886</div><div class="">#11 0x00000000005735ad in ast_spawn_extension (c=0x7fb560285300, context=0x7fb560285cb8 "billing", exten=0x7fb560285d08 "087988477247", priority=1, callerid=0x7fb56019b080 "4330152780", found=0x7fb5122bdba4, combined_find_spawn=1) at pbx.c:4111</div><div class="">#12 0x0000000000574288 in __ast_pbx_run (c=0x7fb560285300, args=0x0) at pbx.c:4288</div><div class="">#13 0x0000000000575a58 in pbx_thread (data=0x7fb560285300) at pbx.c:4610</div><div class="">#14 0x00000000005f9ba9 in dummy_start (data=0x7fb5604b20a0) at utils.c:1239</div><div class="">#15 0x00007fb57edfae25 in start_thread () from /lib64/libpthread.so.0</div><div class="">#16 0x00007fb57e0d8bad in clone () from /lib64/libc.so.6</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">My code:</div><div class=""><br class=""></div><div class="">line 2752:  res = ast_bridge_call(chan, peer, &config);</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">                                </span>memset(&peerflags, 0, sizeof(peerflags));<span class="Apple-tab-span" style="white-space:pre">               </span></div><div class=""><span class="Apple-tab-span" style="white-space:pre">                          </span>snprintf(dialcommand, sizeof(dialcommand), "SIP/%s/%s%s",trunkcode,trunkdestination,dialparams);<span class="Apple-tab-span" style="white-space: pre;">                </span></div><div class=""><span class="Apple-tab-span" style="white-space:pre">                          </span>ast_channel_data_set(chan, dialcommand);</div><div class="">line 3959:   dial_exec_full(chan, dialcommand, &peerflags, NULL);</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Have any method to use function from another app? for example, the function dial_exec_full. I rewrite all function inside my app. Exist any method to use from app_dial.c?</div><div class=""><br class=""></div><div class="">Best regards</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On 12 Sep 2018, at 20:10, <a href="mailto:info@magnussolution.com" class="">info@magnussolution.com</a> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">thanks for you help.<div class=""><br class=""></div><div class=""><br class=""></div><div class="">I try use backtrace. But I no a expert. </div><div class=""><br class=""></div><div class="">I using cents 7 64x</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">gdb -se "asterisk" -ex "bt full" -ex "thread apply all bt" --batch -c core.13414 > /tmp/backtrace.txt</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0); min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">warning: exec file is newer than core file.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Missing separate debuginfo for /usr/lib64/libmyodbc5.so</span></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">[Thread debugging using libthread_db enabled]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Using host libthread_db library "/lib64/libthread_db.so.1".</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Missing separate debuginfo for /usr/lib64/libmyodbc5.so</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Core was generated by `asterisk -vvvvvvvg'.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Program terminated with signal 11, Segmentation fault.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">#0  ast_odbc_release_obj (obj=0x0) at res_odbc.c:712</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">712<span class="Apple-tab-span" style="white-space:pre">         </span>struct odbc_class *class = obj->parent;</span></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">to use ODBC on centos7 and mariaDB 10 I install it</div><div class=""><br class=""></div><div class=""><div class=""><div class="">yum -y remove mysql-connector-odbc</div><div class="">yum -y localinstall --nogpgcheck <a href="http://dev.mysql.com/get/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.11-1.el7.x86_64.rpm" class="">http://dev.mysql.com/get/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.11-1.el7.x86_64.rpm</a></div><div class="">ln -s /usr/lib64/libmyodbc5w.so  /usr/lib64/libmyodbc5.so </div><div class=""><br class=""></div><div class=""><br class=""></div></div></div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 12 Sep 2018, at 19:28, Alex Villací­s Lasso <<a href="mailto:a_villacis@palosanto.com" class="">a_villacis@palosanto.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">El 12/9/18 a las 14:33, <a href="mailto:info@magnussolution.com" class="">info@magnussolution.com</a> escribió:<br class=""><blockquote type="cite" class="">that’s correct. I wrote a ael context with func_odbc and this work very well.<br class=""><br class="">But, using my app_mbilling.c work more faster than ael and func_odbc.<br class=""><br class="">example:<br class="">agi 15 CPS<br class="">ael-func_odbc 30 CPS<br class="">native application 50 CPS<br class=""></blockquote><br class="">Have you tried yet FastAGI? Ordinary AGI is slowed down by the spawning of an entire process per call. FastAGI just requires a daemon that listens to requests on a TCP/IP port. This is way less invasive than writing a whole new Asterisk application in C. Any bottlenecks would now be located in the FastAGI server and could be tuned without touching the Asterisk core.<br class=""><br class="">As an aside, just a wild guess, but I think the crashes could be due to one or more race conditions, and the proper locking required to solve them would slow down your C application to the ael-func_odbc level.<br class=""><br class=""><br class="">-- <br class="">_____________________________________________________________________<br class="">-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com/" class="">http://www.api-digital.com</a> --<br class=""><br class="">Astricon is coming up October 9-11!  Signup is available at: <a href="https://www.asterisk.org/community/astricon-user-conference" class="">https://www.asterisk.org/community/astricon-user-conference</a><br class=""><br class="">asterisk-dev mailing list<br class="">To UNSUBSCRIBE or update options visit:<br class="">  <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" class="">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></div></div></blockquote></div><br class=""></div></div>-- <br class="">_____________________________________________________________________<br class="">-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" class="">http://www.api-digital.com</a> --<br class=""><br class="">Astricon is coming up October 9-11!  Signup is available at: <a href="https://www.asterisk.org/community/astricon-user-conference" class="">https://www.asterisk.org/community/astricon-user-conference</a><br class=""><br class="">asterisk-dev mailing list<br class="">To UNSUBSCRIBE or update options visit:<br class="">   <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" class="">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></div></blockquote></div><br class=""></div></body></html>