asterisk2billing.org
http://forum.asterisk2billing.org/

openser+a2b
http://forum.asterisk2billing.org/viewtopic.php?f=15&t=2456
Page 5 of 6

Author:  jroper [ Wed Dec 24, 2008 9:44 am ]
Post subject: 

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

Author:  fcois93 [ Wed Dec 24, 2008 9:54 am ]
Post subject: 

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)

Author:  jroper [ Wed Dec 24, 2008 10:14 am ]
Post subject: 

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

Author:  middletn [ Thu Dec 25, 2008 5:43 pm ]
Post subject: 

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?

Author:  stavros [ Fri Dec 26, 2008 2:11 pm ]
Post subject: 

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.

Author:  middletn [ Mon Dec 29, 2008 6:44 pm ]
Post subject: 

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

Author:  jroper [ Mon Dec 29, 2008 6:53 pm ]
Post subject: 

Can you do it via an A2Billing trunk?

Joe

Author:  asiby [ Mon Dec 29, 2008 6:54 pm ]
Post subject: 

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

Author:  middletn [ Mon Dec 29, 2008 8:35 pm ]
Post subject: 

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.

Author:  jroper [ Mon Dec 29, 2008 9:11 pm ]
Post subject: 

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

Author:  middletn [ Mon Dec 29, 2008 9:16 pm ]
Post subject: 

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!

Author:  gonzogg [ Fri Jan 30, 2009 11:48 pm ]
Post subject: 

If I may ask; Where the database view have to be created? On the a2b server or on the opensips server?

Author:  gonzogg [ Sat Jan 31, 2009 3:31 pm ]
Post subject: 

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?

Author:  gonzogg [ Wed Feb 04, 2009 3:53 pm ]
Post subject: 

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

Author:  fcois93 [ Tue Feb 17, 2009 2:39 pm ]
Post subject: 

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?

Page 5 of 6 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/