[asterisk-users] ODBC and SQLIte3
termo termosel
fermito51 at hotmail.com
Sun Feb 17 07:31:55 CST 2013
Hi, I have add this options into Sip.conf but the CLI continues telling the same message: ubuntu*CLI> sip show peers
Name/username Host Dyn Forcerport ACL Port Status Description Realtime
0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline]
I have two users in my slite3.db. but Asterisk doesn't show me. It is how asterisk can't access into this database. When I go to call, Asterisk tells me that extension xxx is not found in phones context. Thanks,Jordi Date: Sun, 17 Feb 2013 13:00:44 +0100
From: yves030 at gmx.de
To: asterisk-users at lists.digium.com
Subject: Re: [asterisk-users] ODBC and SQLIte3
hi,
if you use realtime peers, and you want to see their states, you
have to look in the database...
if you want to see their states via cli, you have to set
rtcachefriends=yes in your sip.conf...
there are other settings that you might be interested in... :
rtcachefriends=yes
; Cache realtime friends by adding them to the internal list
; just like friends added
from the config file only on a
; as-needed basis? (yes|no)
rtsavesysname=yes ; Save systemname in realtime
database at registration
; Default= no
rtupdate=yes ; Send registry updates to
database using realtime? (yes|no)
; If set to yes, when a SIP
UA registers successfully, the ip address,
; the origination port, the
registration period, and the username of
; the UA will be set to
database via realtime.
; If not present, defaults
to 'yes'. Note: realtime peers will
; probably not function
across reloads in the way that you expect, if
; you turn this option off.
rtautoclear=yes ; Auto-Expire friends created
on the fly on the same schedule
; as if it had just
registered? (yes|no|<seconds>)
; If set to yes, when the
registration expires, the friend will
; vanish from the
configuration until requested again. If set
; to an integer, friends
expire within this number of seconds
; instead of the
registration interval.
ignoreregexpire=yes ; Enabling this setting has
two functions:
;
; For non-realtime peers,
when their registration expires, the
; information will _not_ be
removed from memory or the Asterisk database
; if you attempt to place a
call to the peer, the existing information
; will be used in spite of
it having expired
;
; For realtime peers, when
the peer is retrieved from realtime storage,
; the registration
information will be used regardless of whether
; it has expired or not; if
it expires while the realtime peer
; is still in memory (due to
caching or other reasons), the
; information will not be
removed from realtime storage
regards,
yves
Am 17.02.2013 12:51, schrieb termo termosel:
Hi,
I had configured Asterisk to use default database located in
/var/lib/asterisk/sqlite3dir/sqlite3.db. When I put odbc show in
Asterisk's cli, It returns me that I have conected but when I
put "sip show peers",Asterisk doesn't found any peer or user.
ubuntu*CLI> odbc show
ODBC DSN Settings
-----------------
Name: asterisk
DSN: asterisk-connector
Last connection attempt: 1970-01-01 01:00:00
Pooled: No
Connected: Yes
ubuntu*CLI> sip show peers
Name/username
Host Dyn Forcerport ACL
Port Status Description Realtime
0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0
online, 0 offline]
This mi configuration,
/etc/odbci.ini
[asterisk-connector]
Description = SQLite3 database
Driver = SQLite3
Database = /var/lib/asterisk/sqlite3dir/sqlite3.db
/etc/odbcinst.ini
[SQLite3]
Description= SQLite3 ODBC Driver
Driver=/usr/local/lib/libsqlite3odbc.so
Setup=/usr/local/lib/libsqlite3odbc.so
Threading=2
/etc/asterisk/extconfig.conf
[settings]
sipusers => odbc,asterisk,sip_buddies
sippeers => odbc,asterisk,sip_buddies
sipregs => odbc,asterisk,sip_buddies
/etc/asterisk/func_odbc.conf
[SQL]
dsn=asterisk
readsql=${ARG1}
/etc/asterisk/modules.conf
autoload=yes
;preload => res_odbc.so
;preload => res_config_odbc.so
noload => pbx_gtkconsole.so
;load => pbx_gtkconsole.so
noload => pbx_kdeconsole.so
noload => app_intercom.so
noload => chan_modem.so
noload => chan_modem_aopen.so
noload => chan_modem_bestdata.so
noload => chan_modem_i4l.so
noload => chan_capi.so
load => res_musiconhold.so
noload => chan_alsa.so
;noload => chan_oss.so
noload => cdr_sqlite.so
noload => app_directory_odbc.so
;noload => res_config_odbc.so
;noload => res_config_pgsql.so
/etc/asterisk/res_odbc.conf
[asterisk]
enabled => yes
dsn => asterisk-connector
pre-connect => yes
Can someone help me?
Thanks,
Jordi
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130217/0d32b231/attachment-0001.htm>
More information about the asterisk-users
mailing list