Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 3:29 pm
Auto Dialer Software


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Asterisk ODBC works, but I can't get SIP Realtime working
PostPosted: Thu Jul 28, 2016 11:04 pm 
Offline

Joined: Thu Jun 05, 2008 5:35 pm
Posts: 37
Hi Everyone.

I'm trying to get Asterisk Realtime to work for SIP users, using the A2Billing cc_sip_buddies table in MySQL, using the ODBC connector (ODBC seems to be the only way to go with versions of Asterisk newer than 11, and we're going with 13.1).

So far, I've gotten Asterisk to recognise the ODBC configuration and I can see this:

Code:
template25*CLI> odbc show all

ODBC DSN Settings
-----------------

  Name:   asterisk
  DSN:    asterisk-connector
    Last connection attempt: 1969-12-31 16:00:00
  Pooled: No
  Connected: Yes


but reloading the SIP driver doesn't show me any of the SIP peers in MySQL, just the ones in the flat files.

This is my configuration so far:

odbc.ini:
Code:
[asterisk-connector]
#Driver       = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Driver  = MySQL
Description  = MyODBC 3.51 Driver DSN
SERVER       = 127.0.0.1
PORT         =
USER         = a2billinguser
Password     = Pdj2sjhah#
Database     = mya2billing2
OPTION       = 3
SOCKET       = /var/run/mysqld/mysqld.sock
Port = 3306


odbcinst.ini:
Code:
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
FileUsage = 1


res_odbc.conf:
Code:
[asterisk]
enabled => yes
dsn => asterisk-connector
pre-connect => yes


extconfig.conf:
Code:
[settings]
sippeers => odbc,asterisk,cc_sip_buddies
sipusers => odbc,asterisk,cc_sip_buddies


Hopefully I'm not missing anything.


Top
 Profile  
 
 Post subject: Re: Asterisk ODBC works, but I can't get SIP Realtime working
PostPosted: Thu Jul 28, 2016 11:41 pm 
Offline

Joined: Thu Jun 05, 2008 5:35 pm
Posts: 37
FYI, I can further demonstrate that ODBC is working within asterisk by executing the following from the Asterisk CLI:

Code:
template25*CLI> odbc read ODBC_SQL "select context from cc_sip_buddies limit 5" exec
context               suspended
----------            ----------
context               edmonton
----------            ----------
context               suspended
----------            ----------
context               suspended
----------            ----------
context               vancouver
Returned 5 rows.  Query executed on handle 0 [asterisk]


Top
 Profile  
 
 Post subject: Re: Asterisk ODBC works, but I can't get SIP Realtime working
PostPosted: Fri Aug 26, 2016 2:57 pm 
Offline

Joined: Mon Jan 08, 2007 6:56 pm
Posts: 345
If ODBC config is ok you can still call them. To be able to see them use "rtcachefriends=yes" in sip.conf then "sip show peers" from cli.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 
VoIP Billing solution


All times are UTC


Who is online

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