Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Mar 29, 2024 8:57 am
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: REALTIME + A2B
PostPosted: Mon Mar 05, 2007 5:07 pm 
Offline

Joined: Fri Apr 28, 2006 5:11 am
Posts: 426
Anyone did try that?
I really need this feature. i want create new SIP customers in MySQL, not in additional_sip.conf


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 05, 2007 5:17 pm 
Offline

Joined: Thu Aug 10, 2006 10:47 pm
Posts: 145
Location: LA,CA,USA
Hello,

We do actually have this implemented, however my company has decided against sharing the way we have implemented our system.

I can however give references as to where you can learn more about doing this.

http://www.voip-info.org/wiki/view/Aste ... ysql+peers


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 05, 2007 6:10 pm 
Offline

Joined: Fri Apr 28, 2006 5:11 am
Posts: 426
Thanks! :)
So, no any changes needed in A2B? :?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 05, 2007 6:53 pm 
Offline

Joined: Thu Aug 10, 2006 10:47 pm
Posts: 145
Location: LA,CA,USA
Depends on how complex you want to get with it, but a basic setup requires no changes with A2B


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 06, 2007 12:19 am 
Offline

Joined: Wed Dec 13, 2006 9:06 pm
Posts: 94
Here is my solution to realtime + A2B. It just pulls from my A2B database in mysql.

-Chris

This is in my res_mysql.conf

Code:
[general]
dbhost = 127.0.0.1
dbname = mya2billing
dbuser = a2billinguser
dbpass = a2billing
;dbport = 3306
;dbsock = /tmp/mysql.sock


And this is in my extconfig.conf under the Realtime configuration engine heading.

Code:
sipusers => mysql,mya2billing,cc_sip_buddies
sippeers => mysql,mya2billing,cc_sip_buddies


Added after 2 hours 38 minutes:

updated info up there ^^^^^^^^^ 8)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 06, 2007 9:08 am 
Offline

Joined: Fri Apr 28, 2006 5:11 am
Posts: 426
thanks JustMe, now more clear for me on this question..


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 10, 2007 10:57 pm 
Offline

Joined: Fri Apr 28, 2006 5:11 am
Posts: 426
hey, JustMe,

Code:
sipusers => mysql,mya2billing,cc_sip_buddies
sippeers => mysql,mya2billing,cc_sip_buddies

may be this should be like:
additional_a2billing_sip.conf => mysql,mya2billing,cc_sip_buddies
:?:
i little confuse with that.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 11, 2007 12:45 am 
Offline
User avatar

Joined: Sun Apr 02, 2006 5:29 am
Posts: 97
;<family name> => <driver>,<database name>[,table_name]
sipusers => mysql,mya2billing,cc_sip_buddies
sippeers => mysql,mya2billing,cc_sip_buddies

it has to be as above, because you are telling Asterisk to get/store registation for SIPUSERS to user mysql driver and the database is called is mya2billing and the table is cc_sip_buddies..

you have to do for both SIPUSERS and SIPPEERS..

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 11, 2007 3:04 am 
Offline

Joined: Fri Apr 28, 2006 5:11 am
Posts: 426
any extra tables need to insert in?
Quote:
*CLI> realtime mysql status
[Apr 10 20:03:46] ERROR[5429]: res_config_mysql.c:628 mysql_reconnect: MySQL RealTime: Failed to connect database server mya2billing on localhost (err 2002). Check debug for more info.
*CLI>


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 11, 2007 5:32 am 
Offline

Joined: Wed Dec 13, 2006 9:06 pm
Posts: 94
I'll take a look in the morning... :-)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 11, 2007 7:21 am 
Offline

Joined: Fri Apr 28, 2006 5:11 am
Posts: 426
Quote:
CLI> realtime mysql status
Connected to mya2billing@localhost, port 3306 with username a2billinguser for 4 seconds.
*CLI>

It's strange, but this error was on few testing machines. now i did just remove the lines login/pass/etc.. in the res_mysql.conf and type it again. and got it working. it's a miracle! :bow: :lol:
Anyway, thanks all, for help! :)

Added after 21 minutes:

still strange...

when i create new customer in a2b, then i do:
*CLI> sip show peers
and it's not show the new customer.. why?

Added after 36 minutes:

FIXED :D
sip.conf => rtcachefriends=yes

Added after 15 minutes:

Nop, not help... i finded what a2b still writing new customers to additional_a2billing_sip.conf file. why? so sip-realtime as mechanism not work now..
any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 11, 2007 8:00 am 
Offline

Joined: Thu Oct 19, 2006 9:56 am
Posts: 300
Location: Athens, Greece
Correct me if I'm wrong:

when you manage to get SQL realtime binding, that doesn't automatically mean that the traditional mechanism of a2b is disabled. The php scripts still do as planned, generate the text file. In that case, I would suggest that you just remove the 'include' line from sip.conf.

I've noticed that * does handle double entries in configs. That is, you may have the realtime peer *and* the text config at the same time. I guess the latter entries override the first, which might mean that settings in additional_sip.conf would override the realtime ones.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 11, 2007 3:00 pm 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
This is wonderful subject matter :D

Very glad to see everyone working on it ... as we grow larger and have more records or even carrier classes and users and voicemail boxes .... this changes from a neat way to do things to a MANDATORY way to do things.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 11, 2007 8:49 pm 
Offline

Joined: Fri Apr 28, 2006 5:11 am
Posts: 426
xrg, well, i agree with you. but how i can make it working? ;)
when i read documentations from source code of *, it have example like this:
Code:
additional_a2billing_sip.conf => mysql,mya2billing,cc_some_table

i understand this example, but i not see how i can implement it in my case. i think this is what i need and it should work without a2b code changes..
i hope.

so, any ideas else?

Added after 1 minutes:

krzykat, you won't want to join in the club? :wink:

Added after 2 hours 57 minutes:

Ok guys.. after i smoke some weeds and think too much, i finaly got this thing: we cant integrate Asterisk Realtime to A2B without any changes in a2b files! its just not possible.. so, anyone.. can make a patch for that, PLEASE?

Added after 3 minutes:

All we need it's only switch a2b route to read\write from additional_*.conf file to SQL cc_sip_buddies table. this is possible to release the patch?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 11, 2007 9:58 pm 
Offline

Joined: Thu Oct 19, 2006 9:56 am
Posts: 300
Location: Athens, Greece
anest wrote:
xrg, well, i agree with you. but how i can make it working? ;)
when i read documentations from source code of *, it have example like this:
Code:
additional_a2billing_sip.conf => mysql,mya2billing,cc_some_table


That is not *realtime* . It is just storing the conf in a database, and would require reloads.

Quote:
All we need it's only switch a2b route to read\write from additional_*.conf file to SQL cc_sip_buddies table. this is possible to release the patch?


No, cc_sip_buddies is already filled with data. You would just need to make it compatible with the realtime definitions. I personally would even write a view in postgres to implement that sip_users/sip_peers table.
Changing the a2b is trivial: you just /ignore/ the additional*.conf files! Perhaps you could also hide them from the UI.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 7 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