Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 4:52 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 88 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject:
PostPosted: Wed Dec 24, 2008 9:44 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
What would happen if I pointed my SIP client directly at the IP address of the asterisk server, could they register and make calls directly?

assuming that the customer is registering with 12345@my-openser-server, could you not bring in the call from openser on a SIP trunk to asterisk, then just before passing the call into A2Billing, strip out the 12345, and do set cdr(accountcode) = 12345.

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 24, 2008 9:54 am 
Offline

Joined: Mon Dec 22, 2008 10:45 am
Posts: 25
in my config, the client can't directly connect to the asterisk. it have to auth in openser.
openser will forward the call to asterisk(load balancing)

with comment the secret line in the sip.conf, I don't need to do set(accountcode)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 24, 2008 10:14 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
If you were to introduce a second or more asterisk server for load balancing, and therefore use Asterisk realtime, rather than syncing the sip config files, then this could be a solution in those circumstances.

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 25, 2008 5:43 pm 
Offline

Joined: Mon Oct 01, 2007 10:44 pm
Posts: 230
Location: Bovey, Devon, UK
jroper wrote:
Quote:
registrar is done by openser, and dispatch to the A2Billing(s).
I had just a problem with the asterisk. I had to comment the secret line in the SIP.conf ...


Hi

I may have not understood this correctly, but what is to stop someone registering a SIP connection directly to your asterisk server, as there is no secret to authenticate them?

Joe


You don't expose asterisk's sip interface to the outside world, it's that simple really.

Regards
P.S. I would really like to see some examples of the openser config files from those that have this working if that's possible. There aren't any complete ones on the internet.


That said, we're still at the issue of the secrets in sip_additional. If someone could point me in the direction of the appropriate module, I'll write an option to remove the writing of the secret. Yes one could use realtime, but I don't like it.

Added after 13 minutes:

This is painful to read. You guys have been struggling with views/database connectivity, and yet http://forum.asterisk2billing.org/viewtopic.php?t=3123 would have shown you exactly how to do this. Can we merge these 2 threads to stop everyone re-inventing the wheel?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 26, 2008 2:11 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
middletn wrote:
Can we merge these 2 threads to stop everyone re-inventing the wheel?
Sorry, no. Or at least I can't find a way to merge threads on the version of phpBB running here.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 29, 2008 6:44 pm 
Offline

Joined: Mon Oct 01, 2007 10:44 pm
Posts: 230
Location: Bovey, Devon, UK
Well, spend 24 hours on this, and now have calls from sip device to PSTN fine. However, I haven;t found out a clean way to send calls from asterisk to sip device via openser. I can do the following

exten => 71552,1,Dial(SIP/192.168.1.105/71552)
(192.168.1.105 is address of openser)

And that works fine. But if I am calling multiple devices it's going to look very messy.

Is there a way of telling asterisk that sip/71552 is located on the openser machine?

regards


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 29, 2008 6:53 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Can you do it via an A2Billing trunk?

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 29, 2008 6:54 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
I believe that if the sip_friend db table is the same as the asterisk realtime db table and is the same one that will be used by openser, it may make it possible to automatically dial sip/71552 without any IP. I have never tried that though.

Cheers


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 29, 2008 8:35 pm 
Offline

Joined: Mon Oct 01, 2007 10:44 pm
Posts: 230
Location: Bovey, Devon, UK
well it needs to be db related for sure. Case in point, if you have multiple ser servers, you need to know which one it's registered with.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 29, 2008 9:11 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
To pad out my earlier comment, you could set up DID, bring calls into Asterisk as DID (Dummy or Real), then set the destination either as a voip destination for no charge, or pass them out via a trunk for charging. sip/%dialingnumber%@192.168.1.105

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 29, 2008 9:16 pm 
Offline

Joined: Mon Oct 01, 2007 10:44 pm
Posts: 230
Location: Bovey, Devon, UK
But what happens if they're on a different server? And more importantly, what about the fact that I might need to ring multiple phones for a give inbound number

Anyway, the answer was quite simple. I've now created a view of a view.

Quote:
CREATE VIEW mya2billing.sipusers
AS
SELECT
username as name,
'friend' as type,
NULL as secret,
domain as host,
CONCAT(rpid, ' ','<',username,'>') as callerid,
'default' as context,
username as mailbox,
'yes' as nat,
'no' as qualify,
username as fromuser,
NULL as authuser,
domain as fromdomain,
NULL as insecure,
'no' as canreinvite,
NULL as disallow,
NULL as allow,
NULL as restrictcid,
domain as defaultip,
domain as ipaddr,
'5060' as port,
NULL as regseconds
from openser.subscriber;


This can now be referenced by asterisk realtime which means that any changes via A2B update realtime AND Openser. :)

BTW, this also gets around the issue of the passwords with OPenser and asterisk, but allows A2B to popoluate the password for Openser registration!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2009 11:48 pm 
Offline

Joined: Thu May 15, 2008 1:29 pm
Posts: 70
Location: Miami
If I may ask; Where the database view have to be created? On the a2b server or on the opensips server?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 31, 2009 3:31 pm 
Offline

Joined: Thu May 15, 2008 1:29 pm
Posts: 70
Location: Miami
Also, I am not familiar creating views. Where can I find more detailed info about creating the database view? Is just copy and paste this commands or there is some specific values from my config?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 04, 2009 3:53 pm 
Offline

Joined: Thu May 15, 2008 1:29 pm
Posts: 70
Location: Miami
I managed to create the view, but when I point opensips to the new database I get this errors. Any hint will be appreciated


Feb 4 10:44:58 sipproxy /usr/local/sbin/opensips[7492]: ERROR:db_mysql:db_mysql_submit_query: driver error on query: Table 'mya2billing.version' doesn't exist
Feb 4 10:44:58 sipproxy /usr/local/sbin/opensips[7492]: ERROR:core:db_do_query: error while submitting query
Feb 4 10:44:58 sipproxy /usr/local/sbin/opensips[7492]: ERROR:core:db_table_version: error in db_query
Feb 4 10:44:58 sipproxy /usr/local/sbin/opensips[7492]: ERROR:core:db_check_table_version: querying version for table trusted
Feb 4 10:44:58 sipproxy /usr/local/sbin/opensips[7492]: ERROR:permissions:init_trusted: error during table version check.
Feb 4 10:44:58 sipproxy /usr/local/sbin/opensips[7492]: ERROR:permissions:mod_init: failed to initialize the allow_trusted function
Feb 4 10:44:58 sipproxy /usr/local/sbin/opensips[7492]: ERROR:core:init_mod: failed to initialize module permissions
Feb 4 10:44:58 sipproxy /usr/local/sbin/opensips[7492]: ERROR:core:main: error while initializing modules


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 17, 2009 2:39 pm 
Offline

Joined: Mon Dec 22, 2008 10:45 am
Posts: 25
I have another problem:

I can do a call through the openser to the A2B.
the asterisk execute the agi, but the phone hangup itself!

know you why?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 88 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Hosted Voice Broadcast


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