Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Mar 29, 2024 9:32 am
Auto Dialer Software


All times are UTC




Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Callback issues with Asterisk 11.6 Command Not Permitted
PostPosted: Thu Jun 19, 2014 2:06 am 
Offline

Joined: Fri Jan 18, 2008 9:54 pm
Posts: 135
I can understand what you are going through as i remember how the callback can be a pain in the (everywhere).
Luckily, I am not using it right now.

I would recommend that :

1) increase the Log and Verbosity level in A2B to see if you get more tips (focus on the daemon log)
2) increase the log level of asterisk log and check the /var/log/asterisk/messages for lines related to 'manager'

If the daemon is trying to connect to asterisk you should at least see a line like this :

Quote:
== Parsing '/etc/asterisk/manager.conf': Found


Then followed by connection status (either succeeded or failed)

Hope you would nail it this time.


Top
 Profile  
 
 Post subject: Re: Callback issues with Asterisk 11.6 Command Not Permitted
PostPosted: Thu Jun 19, 2014 9:59 am 
Offline

Joined: Sun Nov 07, 2010 10:00 pm
Posts: 253
Thanks for your patient and help, Swift...

I haven't use it, also, as I said, but it seem to be very interesting feature, and could be used to develop, really much services... so, for this, I want to set it up...

But, now, I have clean the a2b-callback-daemon.log file, and then, turn verbosity into 4, in the agi-conf, and put asterisk in 20, then restart the deamon, in asterisk console I don't see anything printed, absolutly nothing... in the log file, i have just got the same lines:

Quote:
"2014-06-19 09:49:38,093 - root - MainThread - INFO - waiting..."
"2014-06-19 09:49:41,704 - root - MainThread - INFO - stopped"
"2014-06-19 09:49:42,977 - callbackLogger - MainThread - INFO - info message"
"2014-06-19 09:49:42,977 - callbackLogger - MainThread - WARNING - warn message"
"2014-06-19 09:49:42,978 - callbackLogger - MainThread - ERROR - error message"
"2014-06-19 09:49:42,978 - callbackLogger - MainThread - CRITICAL - critical message"
"2014-06-19 09:49:45,010 - root - MainThread - INFO - ------ Starting Callback Daemon ------
"
"2014-06-19 09:49:45,011 - root - MainThread - INFO - waiting..."
"2014-06-19 09:49:45,123 - root - MainThread - INFO - [<callback_daemon.database.CallBack_Spool object at 0x2645810>, <callback_daemon.datab$
"2014-06-19 09:49:52,023 - root - MainThread - INFO - try_originate : SIP/mycarrier/ZZZZ#XXXXXXXXXX : 1000 : a2billing-callback"
"2014-06-19 09:49:52,764 - root - MainThread - INFO - try_originate : SIP/mycarrier/ZZZZ#XXXXXXXXXX : XXXXXXX : a2billing-callback"
"2014-06-19 09:49:53,400 - root - MainThread - INFO - try_originate : SIP/mycarrier/ZZZZ#XXXXXXXXXX : 1000 : a2billing-callback"
"2014-06-19 09:49:54,141 - root - MainThread - INFO - try_originate : SIP/mycarrier/ZZZZ#XXXXXXXXXX : 1000 : a2billing-callback"
"2014-06-19 09:49:54,778 - root - MainThread - INFO - try_originate : SIP/mycarrier/ZZZZ#XXXXXXXXXX : 1000 : a2billing-callback"
"2014-06-19 09:49:55,518 - root - MainThread - INFO - try_originate : SIP/mycarrier/ZZZZ#XXXXXXXXXX : 1000 : a2billing-callback"
"2014-06-19 09:49:56,154 - root - MainThread - INFO - try_originate : SIP/mycarrier/ZZZZ#XXXXXXXXXX : 1000 : a2billing-callback"
"2014-06-19 09:49:56,902 - root - MainThread - INFO - try_originate : SIP/mycarrier/ZZZZ#XXXXXXXXXX : 1000 : a2billing-callback"
"2014-06-19 09:49:57,539 - root - MainThread - INFO - try_originate : SIP/mycarrier/ZZZZ#XXXXXXXXXX : 1000 : a2billing-callback"
"2014-06-19 09:49:58,280 - root - MainThread - INFO - try_originate : SIP/mycarrier/ZZZZ#XXXXXXXXXX : 1000 : a2billing-callback"
"2014-06-19 09:49:58,916 - root - MainThread - INFO - try_originate : SIP/mycarrier/ZZZZ#XXXXXXXXXX : 1000 : a2billing-callback"
"2014-06-19 09:49:59,657 - root - MainThread - INFO - try_originate : SIP/mycarrier/ZZZZ#XXXXXXXXXX : 1000 : a2billing-callback"
"2014-06-19 09:50:00,293 - root - MainThread - INFO - try_originate : SIP/mycarrier/ZZZZ#XXXXXXXXXX : 1000 : a2billing-callback"
"2014-06-19 09:50:01,034 - root - MainThread - INFO - try_originate : SIP/mycarrier/ZZZZ#XXXXXXXXXX : 1000 : a2billing-callback"
"2014-06-19 09:50:01,670 - root - MainThread - INFO - try_originate : SIP/mycarrier/8664#XXXXXXXXXX : 1000 : a2billing-callback"
"2014-06-19 09:50:02,411 - root - MainThread - INFO - try_originate : SIP/mycarrier/8664#XXXXXXXXXX : 1000 : a2billing-callback"
"2014-06-19 09:50:03,788 - root - MainThread - INFO - try_originate : SIP/mycarrier/4667#XXXXXXXXXX : 1000 : a2billing-callback"
"2014-06-19 09:50:04,424 - root - MainThread - INFO - try_originate : SIP/mycarrier/4667#XXXXXXXXXX : 1000 : a2billing-callback"
"2014-06-19 09:50:09,641 - root - MainThread - INFO - waiting..."
"2014-06-19 09:50:14,753 - root - MainThread - INFO - waiting..."
"2014-06-19 09:50:19,865 - root - MainThread - INFO - waiting..."


I think I'm going to request for consultency from jroper, to solve this, if it's really an issue, bug, or missconfiguration, which we're not really being able to identify...

Regards,


Top
 Profile  
 
 Post subject: Re: Callback issues with Asterisk 11.6 Command Not Permitted
PostPosted: Fri Jun 20, 2014 4:13 am 
Offline

Joined: Fri Jan 18, 2008 9:54 pm
Posts: 135
Sorry for not being able to solve it.

It is good to consult Jroper especially that my experience goes up to Asterisk 1.8 and A2B 1.8.1

Make sure to keep me posted !


Top
 Profile  
 
 Post subject: Re: Callback issues with Asterisk 11.6 Command Not Permitted
PostPosted: Tue Jul 08, 2014 4:26 am 
Offline

Joined: Fri Jan 18, 2008 9:54 pm
Posts: 135
Hello ubunter,

Any luck with this one ?
I am interested to know how it ended !


Top
 Profile  
 
 Post subject: Re: Callback issues with Asterisk 11.6 Command Not Permitted
PostPosted: Sat Jul 19, 2014 10:11 am 
Offline

Joined: Sun Nov 07, 2010 10:00 pm
Posts: 253
Hi Swift,
Sorry for delaying in come back, but because there's no any advance...
I have talked to the a2b. team, first, they suggest to use Ubuntu, instead of Centos, where I don't understand the issue here, and also, they want to create another fresh environment to look into my installation...

I have tried, and contacted several developers, no one want to go through, as callback deamon is awfull and no want have it in service... ;(

Also, I have to say, it's true, as I have tried to go further and spend some hours more... First the Deamon itself is crashing and stopped several times in the OS alone, then, it's causing DB load and problems, no idea why, I had to truncate the callback table several times, as when the table is become loaded with pending calls, the whole DB is being heavy....

About the Crash, i found this log:
Quote:
File "/usr/lib/python2.6/site-packages/SQLAlchemy-0.9.6-py2.6.egg/sqlalchemy/engine/base.py", line 947, in _execute_context
context)
File "/usr/lib/python2.6/site-packages/SQLAlchemy-0.9.6-py2.6.egg/sqlalchemy/engine/default.py", line 435, in do_execute
cursor.execute(statement, parameters)
File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute
self.errorhandler(self, exc, value)
File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (OperationalError) (2006, 'MySQL server has gone away') 'SELECT cc_callback_spool.id AS cc_callback_spool_id, cc_callback_spool.uniqueid AS cc_callback_spool_uniqueid, cc_callback_spool.entry_time AS cc_callback_spool_entry_time, cc_callback_spool.status AS cc_callback_spool_status, cc_callback_spool.server_ip AS cc_callback_spool_server_ip, cc_callback_spool.num_attempt AS cc_callback_spool_num_attempt, cc_callback_spool.last_attempt_time AS cc_callback_spool_last_attempt_time, cc_callback_spool.manager_result AS cc_callback_spool_manager_result, cc_callback_spool.agi_result AS cc_callback_spool_agi_result, cc_callback_spool.callback_time AS cc_callback_spool_callback_time, cc_callback_spool.channel AS cc_callback_spool_channel, cc_callback_spool.exten AS cc_callback_spool_exten, cc_callback_spool.context AS cc_callback_spool_context, cc_callback_spool.priority AS cc_callback_spool_priority, cc_callback_spool.application AS cc_callback_spool_application, cc_callback_spool.data AS cc_callback_spool_data, cc_callback_spool.timeout AS cc_callback_spool_timeout, cc_callback_spool.callerid AS cc_callback_spool_callerid, cc_callback_spool.variable AS cc_callback_spool_variable, cc_callback_spool.account AS cc_callback_spool_account, cc_callback_spool.async AS cc_callback_spool_async, cc_callback_spool.actionid AS cc_callback_spool_actionid, cc_callback_spool.id_server AS cc_callback_spool_id_server, cc_callback_spool.id_server_group AS cc_callback_spool_id_server_group \nFROM cc_callback_spool \nWHERE cc_callback_spool.status = %s AND cc_callback_spool.entry_time > %s AND (cc_callback_spool.callback_time IS NULL OR cc_callback_spool.callback_time < %s)' ('PENDING', datetime.datetime(2013, 4, 10, 21, 21, 52, 810643), datetime.datetime(2014, 7, 18, 9, 21, 52, 810745))
"2014-07-18 09:21:52,815 - root - MainThread - INFO - stopped"



So, no any advance ...

Regards,


Top
 Profile  
 
 Post subject: Re: Callback issues with Asterisk 11.6 Command Not Permitted
PostPosted: Mon Jul 21, 2014 7:39 am 
Offline

Joined: Fri Jan 18, 2008 9:54 pm
Posts: 135
Hello Ubunter,

More than 3 years back I had a nasty issue with the Callback Daemon, but i totally forgot how I did solve it.
However, what I remember is that after fixing it, it started to work for short time 10-15 min then it crashes ..
So, I arranged my favorite friend (crond) to restart it every 10 minutes.

Anyway ..

Now, as I was going through your log,, memories started coming back to me (but not all)
The error log you supplied is not from the Daemon .. it is from Python itself. !

The problem as I remember was with the Python that comes with Centos ..
You might need to uninstall it and install another version that does not cause issues with the Daemon .

Most of the systems that I worked with were based on Centos ,, And eventually the Daemon would work ..

I recommend you go through some of the posts related to Centos and python .. here are few :

http://forum.asterisk2billing.org/viewtopic.php?f=33&t=7810&p=31343&hilit=callback+centos+python&sid=bdb8de4fcf9fdef2777bf21726e31fbc&sid=9b437994135e7635d1d28d2eb00615dd#p31343

http://forum.asterisk2billing.org/viewtopic.php?f=33&t=7711&start=0

http://forum.asterisk2billing.org/viewtopic.php?f=33&t=7810&hilit=callback+centos+python&sid=9b437994135e7635d1d28d2eb00615dd


P.S : Do not blame them for suggesting Ubunto .. your name implies it .. !

Hope this would help .. keep me posted


Top
 Profile  
 
 Post subject: Re: Callback issues with Asterisk 11.6 Command Not Permitted
PostPosted: Mon Jul 21, 2014 11:16 am 
Offline

Joined: Sun Nov 07, 2010 10:00 pm
Posts: 253
Hi Swift,
Thank you for your kind prompt. I Have reviewed this threads, but, must of them are about installation, and not really sure if they may concern my case, as I have the:
Quote:
# service a2b-callback-daemon status
a2b_callback_daemon (pid 1222) is running...


So, service is running, it's true that several times, I have checked it, and I found it stopped, and no log reported... strange... but, now it's running, and in the log it's showing as waiting...

Now...
In this thread: viewtopic.php?f=33&t=7810&p=31343&hilit=callback+centos+python&sid=9b437994135e7635d1d28d2eb00615dd#p31343, sergior1, is suggesting to make some changes:
in /usr/bin/a2b_callback_daemon I had:
Quote:
#!/usr/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'callback-daemon==1.0.prod-r1528','console_scripts','a2b_callback_daemon'
__requires__ = 'callback-daemon==1.0.prod-r1528'
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
sys.exit(
load_entry_point('callback-daemon==1.0.prod-r1528', 'console_scripts', 'a2b_callback_daemon')()
)


I have renamed that file, and replace it by the a2b_callback_daemon.py. But after this change, I can restart the daemon, any more, neither with changing the daemon to python, not having it as is, I get:
Quote:
# service a2b-callback-daemon restart
Stopping a2b-callback-daemon: [ OK ]
a2b_callback_daemon is stopped
Traceback (most recent call last):
File "/usr/bin/a2b_callback_daemon", line 22, in <module>
import daemon
ImportError: No module named daemon
Starting a2b-callback-daemon: [FAILED]


Otherwise, when I remove that file, and put back my old /usr/bin/a2b_callback_daemon, and restart, deamon, as is restarting properly, and running:
Quote:
# service a2b-callback-daemon restart
Stopping a2b-callback-daemon: [FAILED]
a2b_callback_daemon is stopped
Starting a2b-callback-daemon: [ OK ]


Then, regarding the python version, as I had it installed, and working, I can't say it's version issue, as it was working, anyway, my current python is: python-2.6.6-52.el6.x86_64...


So, as daemon installation, i have it installed, and running, but, no calls are being handled... as we sow, and according to the log, it's showing as waiting, but when call arrive, it's not handling that....

About Ubuntu, it's true, I'm ubunter, since i have got divorced with widnwos for desktop... but for servers, I feel really much more comfortable to run Centos, then Ubuntu... ;)

Even, as discussed with the team, they assure to have it running with Python version in Ubuntu 12.04 is 2.7.3, but, I have tried to install Ubuntu in a testing server, with python 2.8, i have got huge of installation issues... I wasn't comfortable to follow, and just abandon...

But, as i insist, DAEMON, for me, under Centos, it's running, no issue in the daemon itself, but not doing calls, as it should be...

I'd be really glad to pay and have it as an enterprise module, then have all this time wasting, but no one, of my known developers want to carry this task... ;(

Regards,


Top
 Profile  
 
 Post subject: Re: Callback issues with Asterisk 11.6 Command Not Permitted
PostPosted: Thu Jul 24, 2014 4:00 am 
Offline

Joined: Fri Jan 18, 2008 9:54 pm
Posts: 135
Hello Ubunter,

I can understand your frustration, but this is the life of 'Debugging' .. you spend hours and days digging then finally you find that the solution is to knock 3 times on the upper left corner of the engine.

I am ready to help you as much as i can. The only thing is that it has been so long for me and I am not as swift as i used to be.

I need to try something .. Can you plz send me a .gzip(ed) copy of your Daemon code .. I mean the contents of the a2billing/CallBack.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Predictive Dialer


All times are UTC


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group