It looks like Asterisk 1.4.5 and the addons package is having issues.
My Asterisk 1.4.5 is crashing as soon as the first call terminates. I have asterisk-addons-1.4.1 loaded.
The error message I’m getting is:
asterisk: symbol lookup error: /usr/lib/asterisk/modules/cdr_addon_mysql.so: undefined symbol: dont_use_localtime_r_use_ast_localtime_instead
I should have mentioned that my box was also a Ubuntu 7.04 x86 platform. I have an Ubuntu 6.06 box and had no problems with 1.4.5 and the addons package.
My short term solution was to downgrade back to 1.4.4.
I too am having the crash just after a disconnect (looks like prior to spawning a connection). Using Mandriva 2007.0 with 2.6.21 kernel, asterisk-1.4.5 and asterisk-addons-1.4.1.
I am running Fedora 6 with asterisk-1.4.5 : Same problem
asterisk: symbol lookup error: /usr/lib/asterisk/modules/cdr_addon_mysql.so: undefined symbol: dont_use_localtime_r_use_ast_localtime_instead
At first I noticed a crash when accessing some GUI pages.
Then I noticed a crash after accessing voice mail.
I’ll have to remove asterisk cdr_addon_mysql.so to stablize the system
Added this to modules.conf
noload => cdr_addon_mysql.so
I think asterisk-addons-1.4.1 asterisk-1.4.5 or needs an update
same problem for me, with CentOS 5. My application uses mysql in the dialplan and just by removing the cdr_addon_mysql.so, it quit crashing on me. It was crashing on hangup for every call.
I did a little hack as a workaround (likely this is not the proper way to do it; I am not at-all familiar with the asterisk code). But, my CDRs are still being logged to MySQL using this hack.
asterisk-addons-1.4.1/cdr_addon_mysql.c (around line 132)
Change:
localtime_r(&cdr->start.tv_sec, &tm);
To:
ast_localtime(&cdr->start.tv_sec, &tm, NULL);
‘make’ then ‘make install’ then restart asterisk
So far, no crash, but only running on the hack for one day…
I see that addons-1.4.2 is now available. Hopefully Priam’s patch was incorporated into the latest rev. Thanks, Priam, for finding the fix! I’ll mark this thread as “RESOLVED” as soon as I test the latest addons with 1.4.5.
I finally had some down time and upgraded to 1.4.5 again, this time using the 1.4.2 version of addons. Looks like that did the trick - no more crashes. I went ahead and marked the thread as resolved.
Hi afried, Thanks for this post. I got my Asterisk 1.4.5 resolved too with the new addon-1.4.2 on my new FC7 Box.
I am planning to deploy Asterisk on an Ubuntu server 7.04. I have once tried and got some difficulties with the file system and thus Asterisk couldn’t compile and so also zaptel. Can you please give me a work around on how you got Asterisk installed on your Ubuntu Server or any link that could help.