Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Mar 19, 2024 3:05 am
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: v.1.9.4 mysql error, sip username=s
PostPosted: Tue Jul 05, 2011 4:52 pm 
Offline

Joined: Sun Nov 07, 2010 10:00 pm
Posts: 253
Hello people,
I'm running v.1.9.4, and I just detect that several of my users are being modified there sip username to "s", instead of the cardnumber... when I try to edit that sip username, in a2billing gui -customers - voip setting, just after couple of minutes, it's being modified again to s...

I went into mysql to change that value, just after saving the changes in mysql, it work, but couple of minutes later it's being modified again...

Dose that a script error into mysql&a2billing, or what's happen there, cause users who have this alteration get errors, and cannot follow placing calls, as there user name is being "s", instead of there card number...

Even, when I make sipshow peers, i see the peer registred as name/username= 285654667/s

Dose any of you are having such as strange issue?? I have 3 servers, under v.1.9.4, and I'm having the same in all of them...

Regards,


Top
 Profile  
 
 Post subject: Re: v.1.9.4 mysql error, sip username=s
PostPosted: Wed Jul 06, 2011 5:26 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

For interest, which Asterisk version.

Are you using realtime?

Has the customer made a call, or will it just change by itself?

Joe


Top
 Profile  
 
 Post subject: Re: v.1.9.4 mysql error, sip username=s
PostPosted: Wed Jul 06, 2011 7:44 am 
Offline

Joined: Sun Nov 07, 2010 10:00 pm
Posts: 253
Thanks Joe for your prompt,

Quote:
For interest, which Asterisk version.

I'm using asterisk 1.8.4.4& a2billing 1.9.4

Quote:
Are you using realtime?


Yes sure, I'm using realtime, for that reason it's using the DB.

Quote:
Has the customer made a call, or will it just change by itself?


I guess it's changing when the customer try to register, NOT when it's try to make a call, cause only registered customers are being modified... I removed my cronjobs in the system, but no way, it's the same, in both servers, sip user when try to register it's being modified to "s" in the database, then the user it's registered, as Name/username= 764570/s, then it cann't place calls...in cli, when the user try to call, i see this:

Quote:
[Jul 5 10:44:40] WARNING[4271]: channel.c:5635 ast_channel_make_compatible_helper: No path to translate from SIP/TrunkC-00000029 to SIP/27567-00000028
-- AGI Script Executing Application: (DIAL) Options: (SIP/TrunkD/00656476688,60,LIW(13560000:60000:30000))
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Called TrunkD/00656476688
[Jul 5 10:44:40] WARNING[4271]: channel.c:5635 ast_channel_make_compatible_helper: No path to translate from SIP/TrunkD-0000002a to SIP/27567-00000028
-- <SIP/27567-00000028>AGI Script a2billing.php completed, returning -1


The other question, when I edit the customer voip account, and change it's host to static, from dynamic, the username is not being altered any more, I understand with that the sip user is being registered just with the IP, before the invite for username, so it's being modified exactly in the registrar time...
Thanks in advance,


Top
 Profile  
 
 Post subject: Re: v.1.9.4 mysql error, sip username=s
PostPosted: Wed Jul 06, 2011 3:52 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

Well A2Billing does not come into play at all, unless a call is made, and a2billing.php launched, therefore the issue must be something to do with the behaviour of asterisk realtime.

Joe


Top
 Profile  
 
 Post subject: Re: v.1.9.4 mysql error, sip username=s
PostPosted: Wed Jul 06, 2011 4:47 pm 
Offline

Joined: Sun Nov 07, 2010 10:00 pm
Posts: 253
jroper wrote:
Hi

Well A2Billing does not come into play at all, unless a call is made, and a2billing.php launched, therefore the issue must be something to do with the behaviour of asterisk realtime.

Joe


Thanks Joe,
I still turning in this hours and hours, just to discover when it's happening, but i can say surely now, it's being altered when customer is passing a call...
Asterisk, in theory don't have even privileges to alter the DB data, I have been created another user, for asterisk realtime, who don't have privileges to modify, only use... to discard if it's asterisk, but as i see, it's not asterisk... the unique user who have privileges to modify is the a2billing DB user...


Last edited by ubunter on Wed Jul 06, 2011 4:57 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: v.1.9.4 mysql error, sip username=s
PostPosted: Wed Jul 06, 2011 4:49 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
What user are you using in res_mysql?

Joe


Top
 Profile  
 
 Post subject: Re: v.1.9.4 mysql error, sip username=s
PostPosted: Wed Jul 06, 2011 5:07 pm 
Offline

Joined: Sun Nov 07, 2010 10:00 pm
Posts: 253
jroper wrote:
What user are you using in res_mysql?

Joe


To discard Asterisk intervention, or to know who's exactly modifying the DB, I have been created 2 users, for the a2billing DB one with all privileges, declared in a2billing.conf, and other for asterisk declared in res_mysql without editing, alter, neither drop privileges... so if the DB follow being altered, it's mean, the alteration come from a2billing user, not from Asterisk user...
Or I'm mistaking?


But it seem to be a cron, in cronjobs i have the following:

Quote:
0 12 * * * php /usr/src/Star2Billing/Cronjobs/a2billing_archive_data_cront.php
0 10 21 * * php /usr/src/Star2Billing/Cronjobs/a2billing_autorefill.php
0 * * * * php /usr/src/Star2Billing/Cronjobs/a2billing_alarm.php
20 0 * * * php /usr/src/Star2Billing/Cronjobs/a2billing_batch_process.php
0 10 21 * * php /usr/src/Star2Billing/Cronjobs/a2billing_autorefill.php
0 0 * * * php /usr/src/Star2Billing/Cronjobs/a2billing_bill_diduse.php
20 0 * * * php /usr/src/Star2Billing/Cronjobs/a2billing_batch_process.php
0 6 * * * php /usr/src/Star2Billing/Cronjobs/a2billing_check_account.php
0 0 * * * php /usr/src/Star2Billing/Cronjobs/a2billing_bill_diduse.php
0 6 * * * php /usr/src/Star2Billing/Cronjobs/a2billing_batch_billing.php
0 6 * * * php /usr/src/Star2Billing/Cronjobs/a2billing_check_account.php
1 * * * * php /usr/src/Star2Billing/Cronjobs/a2billing_notify_account.php
0 6 * * * php /usr/src/Star2Billing/Cronjobs/a2billing_batch_billing.php
0 6 1 * * php /usr/src/Star2Billing/Cronjobs/a2billing_subscription_fee.php
1 * * * * php /usr/src/Star2Billing/Cronjobs/a2billing_notify_account.php
0 1 * * * php /usr/src/Star2Billing/Cronjobs/currencies_update_yahoo.php
0 6 1 * * php /usr/src/Star2Billing/Cronjobs/a2billing_subscription_fee.php
0 1 * * * php /usr/src/Star2Billing/Cronjobs/currencies_update_yahoo.php


I also try to deactivate the a2billing_notify_account.php, and the a2billing_alarm.php... but it still the same, so it's not the cron...


Top
 Profile  
 
 Post subject: Re: v.1.9.4 mysql error, sip username=s
PostPosted: Wed Jul 06, 2011 11:15 pm 
Offline

Joined: Mon Jan 08, 2007 6:56 pm
Posts: 345
This might be your issue. It is set in the sip.conf general section.

Quote:
rtupdate=yes ; Send registry updates to database using realtime? (yes|no)
; If set to yes, when a SIP UA registers successfully, the ip address,
; the origination port, the registration period, and the username of
; the UA will be set to database via realtime.
; If not present, defaults to 'yes'. Note: realtime peers will
; probably not function across reloads in the way that you expect, if
; you turn this option off.


It's better to let opensips handle registrations.


Top
 Profile  
 
 Post subject: Re: v.1.9.4 mysql error, sip username=s
PostPosted: Wed Jul 13, 2011 7:04 pm 
Offline

Joined: Sun Nov 07, 2010 10:00 pm
Posts: 253
It's not working, and it's didn't worked, i tried to figure out this issue in several installation, but no way...

Just downgrade to v.1.9.3 it's work... I guess there's a bug in v.1.9.4 in multiaccess users it's modifing the db with that manner, and causing this error...

Solution, just downgrade, by removing the v.1.9.4 files and replace them by v.1.9.3...

Regards,


Top
 Profile  
 
 Post subject: Re: v.1.9.4 mysql error, sip username=s
PostPosted: Wed Jul 13, 2011 7:46 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

If you look at the commits at https://github.com/Star2Billing/a2billing/ for release 1.9.4, you will see there is nothing that would affect realtime, I don't think the issue is here.

Joe


Top
 Profile  
 
 Post subject: Re: v.1.9.4 mysql error, sip username=s
PostPosted: Thu Jul 14, 2011 2:53 am 
Offline

Joined: Mon Jan 08, 2007 6:56 pm
Posts: 345
It is too late now, but did you turn off realtime db update with
Code:
rtupdate=no
? That is what I was inferring.


Top
 Profile  
 
 Post subject: Re: v.1.9.4 mysql error, sip username=s
PostPosted: Tue May 17, 2016 8:16 am 
Offline

Joined: Sun Nov 07, 2010 10:00 pm
Posts: 253
Hello,
This behaviour I know it since I have started using a2billing, since about 6 years now... into several versions, now I'm under 2.0.1...

No idea, it's giving in some users, not in all, specially when the front users are running freepbx, usernames are altered in my DB to "s" as described...

Vulcan, but I'm not sure about your suggestion, turning rtupdate to off will alter the peers retriving, so incoming calls will not work, as asterisk will not be able to retrive the peer... this may work if not using incoming calls, or if the peer is under static IP, but within dynamic IP, and having to handle incoming calls, will not work...

Joe, it's a bug, hope that the someday you try to figure it our...

Regards,


Top
 Profile  
 
 Post subject: Re: v.1.9.4 mysql error, sip username=s
PostPosted: Fri Jun 03, 2016 8:27 am 
Offline

Joined: Sun Nov 07, 2010 10:00 pm
Posts: 253
jroper wrote:
What user are you using in res_mysql?

Joe


in res_config_mysql.conf I have

Code:
[general]
dbhost = 127.0.0.1
dbname = a2Billing
dbuser = pass2Billing
dbpass = xxxxx
dbport = 3306
dbsock = /var/lib/mysql/mysql.sock
dbcharset = utf8
;requirements=warn


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 
Voice Broadcast System


All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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