Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 9:32 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Deleted VoIP accounts cannot be recreated and work properly
PostPosted: Wed Oct 16, 2013 8:06 pm 
Offline

Joined: Sun Jul 18, 2010 2:58 am
Posts: 56
Location: Atlanta, GA
Hello Everyone,
I'm not sure what I am missing here so a little point in the right direction would be appreciated.

We are using A2B 2.0.5 with Asterisk 1.8.15.0 and a few days ago, our database server failed. When the database came back online, there was corruption in the cc_sip_buddies table. When we repaired the corruption, we noticed that several VoIP accounts were missing.

We can create NEW accounts for these customers, but ideally, we want to recreate the old account numbers with new passwords. Unfortunately, during the new VoIP account creation process, we change the name, regexten, and username to the old account number problems happen. The customer is able to register, but when they attempt to make a call they get:

Code:
[2013-10-16 15:07:58] VERBOSE[29272] res_agi.c:  a2billing.php,1: file:a2billing.php - line:131 - uniqueid: - [INFO : A2Billing - v2.0.5]
[2013-10-16 15:07:58] VERBOSE[29272] res_agi.c:  a2billing.php,1: file:Class.A2Billing.php - line:712 - uniqueid:atlanta-1381950476.2326 -  get_agi_request_parameter = 6133662039 ; SIP/XXXXXXXXX-0000087c ; atlanta-1381950476.2326 ; XXXXXXXXX ; XXXXXXX0288
[2013-10-16 15:07:58] VERBOSE[29272] res_agi.c:  a2billing.php,1: file:a2billing.php - line:169 - uniqueid:atlanta-1381950476.2326 - [NO ANSWER CALL]
[2013-10-16 15:07:58] VERBOSE[29272] res_agi.c:  a2billing.php,1: file:Class.A2Billing.php - line:2862 - uniqueid:atlanta-1381950476.2326 -  - Account code ::> 856021197
[2013-10-16 15:07:58] VERBOSE[29272] res_agi.c:  a2billing.php,1: file:Class.A2Billing.php - line:2879 - uniqueid:atlanta-1381950476.2326 -  - Retrieve account info SQL ::> SELECT credit, tariff, activated, inuse, simultaccess, typepaid, creditlimit, language, removeinterprefix,  redial, enableexpire, UNIX_TIMESTAMP(expirationdate), expiredays, nbused, UNIX_TIMESTAMP(firstusedate),  UNIX_TIMESTAMP(cc_card.creationdate), cc_card.currency, cc_card.lastname, cc_card.firstname, cc_card.email,  cc_card.uipass, cc_card.id_campaign, cc_card.id, useralias, status, voicemail_permitted, voicemail_activated,  cc_card.restriction, cc_country.countryprefix  FROM cc_card  LEFT JOIN cc_tariffgroup ON tariff = cc_tariffgroup.id  LEFT JOIN cc_country ON cc_card.country = cc_country.countrycode  WHERE username = 'XXXXXXXXX'
[2013-10-16 15:07:58] VERBOSE[29272] res_agi.c:  a2billing.php,1: file:Class.A2Billing.php - line:2883 - uniqueid:atlanta-1381950476.2326 - PREPAID-AUTH-FAIL
[2013-10-16 15:07:58] VERBOSE[29272] res_agi.c:  a2billing.php,1: file:a2billing.php - line:181 - uniqueid:atlanta-1381950476.2326 - [TRY : callingcard_ivr_authenticate]
[2013-10-16 15:07:58] VERBOSE[29272] res_agi.c:  a2billing.php,1: file:a2billing.php - line:613 - uniqueid:atlanta-1381950476.2326 - [NO AUTH (CN:XXXXXXXXX, cia_res:-1, CREDIT:)]
[2013-10-16 15:07:58] VERBOSE[29272] res_agi.c:     -- <SIP/XXXXXXXXX-0000087c>AGI Script a2billing.php completed, returning 4
[2013-10-16 15:07:58] VERBOSE[29272] pbx.c:   == Spawn extension (a2billing, XXXXXXX0288, 3) exited non-zero on 'SIP/XXXXXXXXX-0000087c'


Can anyone shed light on what could cause the PREPAID-AUTH-FAIL in this scenario? Is there another table we need to look at? MySQL gave us a clean bill of health on the database.
Thanks for the thoughts.
Perry


Top
 Profile  
 
 Post subject: Re: Deleted VoIP accounts cannot be recreated and work properly
PostPosted: Thu Oct 17, 2013 9:47 am 
Offline

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

Rather then looking at the agi-conf output, it may be better to inspect the SIP registration process, also ensure that the A2Billing account number is inserted into the accountcode field.

Joe


Top
 Profile  
 
 Post subject: Re: Deleted VoIP accounts cannot be recreated and work properly
PostPosted: Fri Oct 18, 2013 11:41 am 
Offline

Joined: Sun Jul 18, 2010 2:58 am
Posts: 56
Location: Atlanta, GA
Thanks Joe -

After looking a little harder, here's what we know.
The SIP Registration works fine so I know it's not a SIP issue as the call attempts to process. We wouldn't get this far if the SIP account wouldn't register. But if you look at the tail end of the SQL query, you will notice the account number it is querying. The VoIP account number and not the billing account number. Albeit that these could be the same. In this case, they're not.
And sadly (smartly), I obscured the account information (Whoops, I missed one) so unfortunately you would never see the difference.

HOWEVER - I may be off base in that. Should the query be hitting the VoIP account number or the billing account? It seems to me that it should be hitting the billing account number given all of the fields that are in the query.

So in a nut shell -

What I am seeing is that if I create a new VoIP account, by default, the new SIP account is inserted in to the accountcode field on the screen. But when I choose an a2billing account to associate this account to, that field changes to the proper a2billing account.
If I leave everything else alone, all is good and the account works. However, if I am trying to enter a very specific account number, something doesn't get completely updated as it should because SIP logins work for the account but billing lookups give the auth fail message.

Now - If I do this in a two step process by creating a new account and accepting the changes, followed up with an account modification to change the account number and password, it works just like it should. So there is something that doesn't like the account number being changed upon the account creation. But all is OK on an account modification.
Does that make sense?
Thanks again Joe,

Perry


Top
 Profile  
 
 Post subject: Re: Deleted VoIP accounts cannot be recreated and work properly
PostPosted: Fri Oct 18, 2013 11:44 am 
Offline

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

The accountcode field in SIP settings is used to match to the A2Billing account number.

Joe


Top
 Profile  
 
 Post subject: Re: Deleted VoIP accounts cannot be recreated and work properly
PostPosted: Fri Oct 18, 2013 11:50 am 
Offline

Joined: Sun Jul 18, 2010 2:58 am
Posts: 56
Location: Atlanta, GA
Thanks - So username would be the SIP account so I was off base...

The steps to replicate this would be to create a new SIP account and assign an account code to it. While in the new account creation screen, change the username and name and accept changes. The VoIP account should not work properly from the billing side.

Next -
Create another account and assign an account code to it. Accept the changes.
Test a call to see that it works.
Modify the username and name and accept changes.
Test another call and the expected result is that it should work.

I am using 2.0.5 so I am not sure if someone has addressed this in the later release but it's worth a look I guess.

Thanks Joe,

Perry


Top
 Profile  
 
 Post subject: Re: Deleted VoIP accounts cannot be recreated and work properly
PostPosted: Fri Oct 18, 2013 12:26 pm 
Offline

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

You can create any SIP account with any credentials you like, either via the A2Billing interface, or manually in sip.conf, all that you need to do is ensure that the context is set to a2billing, or whichever context you are using for VoIP calls, and the accountcode is the same as the a2b account number.

Joe


Top
 Profile  
 
 Post subject: Re: Deleted VoIP accounts cannot be recreated and work properly
PostPosted: Fri Oct 18, 2013 12:48 pm 
Offline

Joined: Sun Jul 18, 2010 2:58 am
Posts: 56
Location: Atlanta, GA
I agree... We have over 1000 accounts set up and have had no problems in doing so...
But in this instance, when we had a database issue, we discovered that modifying the username upon creation somehow doesn't work. However, modification of a VoIP account, which has already been created, works fine.

I am sorry - I forgot to mention that we are using Realtime with the database, web, and multiple Asterisk servers in separate data centers so we don't really do much with the .CONF files.

We can get by with the workaround of creating a new account and then modifying it as we have all but cleared up the initial data issue. I was just bringing to light a reproducible issue.

Thanks - Perry


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


All times are UTC


Who is online

Users browsing this forum: No registered users and 18 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group