On Wed, May 7, 2008 at 10:30 AM, Henning Westerholt
<henning.westerholt(a)1und1.de> wrote:
> On Wednesday 07 May 2008, Bård Aase wrote:
> > I am trying to switch from SER to OpenSER, and I'm using mysql for
> > data storage. Asterisk's sip_buddies table is supposed to contain
> > authentication data.
> > The configuration is set up, the openser database is appearantly set
> > up and working, but when I try to authenticate against
> > asterisk.sip_buddies i get the following errors:
> >
> > May 6 12:36:58 [25672] ERROR:auth_db:auth_fixup: invalid table
> > version (use openser_mysql.sh reinstall)
> > [..]
>
> >
> > The version tables in asterisk and openser is as follows:
> > SELECT * FROM asterisk.`version`
> > 5
> > SELECT * FROM openser.`version`
> > 6
> >
> > What is the differences between database version 5 and 6?
> >
> > Since the asterisk database is shared between multiple asterisks and
> > SER instances, its not trivial to upgrade the tables if that would
> > have implications on asterisk and/or ser
>
> Hi Bård,
>
> OpenSER checks on startup during the fixup process of the config script that
> the table version is correct. This version data is read from the
> openser.version table. The auth_db module uses normally the 'subscriber'
> table, thus its expect the table version entry under the same name.
>
> from trunk: select table_version from version where table_name='subscriber';
> -> 6
>
> If the asterisk.sip_buddies table has the correct format (compare against a
> fresh DB setup with your OpenSER version), then it should be sufficient to
> add a entry with the correct version number (check in auth_db
> source, 'VERSION') in the version table, or just remove the check from the
> source code. To get the differences you could also just setup a fresh
> installation of the DB, and use the usual tools to show the table
format. For
> more information you should provide the OpenSER version you use, and the
> table format of the table you authenticate against.
Thanks, I will check this out now, I'm using OpenSER 1.3.1 and the
sip_buddies table looks like this:
+--------------------+------------------+------+-----+-------------------------+-------+
| Field | Type | Null | Key | Default
| Extra |
+--------------------+------------------+------+-----+-------------------------+-------+
| name | varchar(80) | | PRI |
| |
| accountcode | varchar(20) | YES | | NULL
| |
| secret | varchar(80) | YES | | NULL
| |
| type | varchar(6) | | | friend
| |
| username | varchar(80) | | |
| |
| amaflags | varchar(7) | YES | | DEFAULT
| |
| callgroup | varchar(10) | YES | | NULL
| |
| callerid | varchar(80) | YES | | NULL
| |
| canreinvite | varchar(3) | YES | | yes
| |
| context | varchar(80) | YES | | NULL
| |
| defaultip | varchar(15) | YES | | NULL
| |
| dtmfmode | varchar(7) | YES | | NULL
| |
| fromuser | varchar(80) | YES | | NULL
| |
| fromdomain | varchar(80) | YES | | NULL
| |
| host | varchar(31) | | | dynamic
| |
| incominglimit | int(2) | YES | | NULL
| |
| outgoinglimit | int(2) | YES | | NULL
| |
| insecure | varchar(4) | YES | | NULL
| |
| language | varchar(2) | YES | | NULL
| |
| mailbox | varchar(50) | YES | | NULL
| |
| md5secret | varchar(80) | YES | | NULL
| |
| nat | varchar(8) | | | yes
| |
| permit | varchar(95) | YES | | NULL
| |
| deny | varchar(95) | YES | | NULL
| |
| mask | varchar(95) | YES | | NULL
| |
| pickupgroup | varchar(10) | YES | | NULL
| |
| port | varchar(5) | | |
| |
| qualify | varchar(8) | YES | | NULL
| |
| mobilenumber | varchar(16) | | |
| |
| restrictcid | char(1) | YES | | NULL
| |
| rtptimeout | varchar(3) | YES | | NULL
| |
| rtpholdtimeout | varchar(3) | YES | | NULL
| |
| allow | varchar(100) | YES | |
g729;ilbc;gsm;ulaw;alaw | |
| disallow | varchar(100) | YES | | all
| |
| musiconhold | varchar(100) | YES | | NULL
| |
| regseconds | int(11) | | | 0
| |
| ipaddr | varchar(15) | | MUL |
| |
| cancallforward | varchar(3) | YES | | yes
| |
| fullcontact | varchar(80) | YES | | NULL
| |
| domain | varchar(128) | YES | | UNDISCLOSED
| |
| ha1b | varchar(128) | YES | |
| |
| rpid | varchar(255) | YES | |
| |
| trustrpid | enum('YES','NO') | | | NO
| |
+--------------------+------------------+------+-----+-------------------------+-------+
The openser.cfg configuration for auth_db:
loadmodule "auth_db.so"
# -- auth_db params --
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "user_column", "name")
modparam("auth_db", "domain_column", "domain")
modparam("auth_db", "password_column", "secret")
modparam("auth_db", "password_column_2", "ha1b")
modparam("auth_db", "use_domain", 0)
modparam("auth_db", "db_url",
"mysql://UNDISCLOSED:UNDISCLOSED@UNDISCLOSED/asterisk")
All the fields referred to here exists in the asterisk.sip_buddies
table, so my guess now is that this is just a matter of disabling the
version check, or bumping the version number.
--
Bård Aase
gTalk/Jabber: elzapp(a)elzapp.com MSN: msn(a)elzapp.com
http://blog.elzapp.com
On Tuesday 06 May 2008, Julian Yap wrote:
> Private memory is default. Should I increase this? Is there a
> recommended rule of thumb?
>
> Shared memory is set for 128Mb. There were memory errors at 32Mb but
> none since this was increased to 128Mb.
>
> Using the setting 'children = 8'.
(moved to user list)
Hi Julien,
you only need to increase this if you use some modules that needs to load a
big dataset on startup (e.g. carrierroute), and if you get allocation errors
for the private memory.
If you run with 128 MB shared memory, then the server should not use more then
this memory, i.e. the depletion of memory you observed is not caused from
OpenSER.
The ammount of memory that is used from the server is:
((actual number of children) x private memory) + shared memory
Perhaps you can adapt your "monitoring" to log the actual biggest memory
consumer on the system?
Cheers,
Henning
I am trying to switch from SER to OpenSER, and I'm using mysql for
data storage. Asterisk's sip_buddies table is supposed to contain
authentication data.
The configuration is set up, the openser database is appearantly set
up and working, but when I try to authenticate against
asterisk.sip_buddies i get the following errors:
May 6 12:36:58 [25672] ERROR:auth_db:auth_fixup: invalid table
version (use openser_mysql.sh reinstall)
May 6 12:36:58 [25672] ERROR:core:fix_actions: fixing failed
(code=-1) at cfg line 399
May 6 12:36:58 [25672] CRITICAL:core:fix_expr: fix_actions error
May 6 12:36:58 [25672] ERROR:core:main: failed to fix configuration
with err code -1
The version tables in asterisk and openser is as follows:
SELECT * FROM asterisk.`version`
5
SELECT * FROM openser.`version`
6
What is the differences between database version 5 and 6?
Since the asterisk database is shared between multiple asterisks and
SER instances, its not trivial to upgrade the tables if that would
have implications on asterisk and/or ser
Thanks in advance.
--
Bård Aase
gTalk/Jabber: elzapp(a)elzapp.com MSN: msn(a)elzapp.com
http://blog.elzapp.com
Hi,
I am running openser v1.3.1 and I cannot get the RLS module to work properly
when handling a contact list already retrieved from database. Some errors
related with the pua module appear in the log when the server seems to be
trying to generate the subscribe requests for each of the contacts in the
list (see attached, lines 60 to 62).
Apr 10 13:02:23 comm ./openser[20184]: ERROR:pua:subs_build_hdr: getting
event from list
Apr 10 13:02:23 comm ./openser[20184]: ERROR:pua:send_subscribe: while
building extra headers
Apr 10 13:02:23 comm ./openser[20184]: ERROR:rls:process_list_and_exec:
infunction given as a parameter
Those requests are never sent. What could this be due to?
Thanks!
Pablo
Hi everybody,
I have some problems to get presence information exchanged between SIP users
and xmpp ones. SIP clients (X-Lite) depend on an openser server v1.3.1, with
all necessary modules working within it, and xmpp clients (Psi) rely on an
xmpp server (ejabberd) which is in the same machine.
The link between both sip and xmpp servers is established when openser
starts, and the exchange of instant messages between sip and xmpp users
works fine. So does presence too, as long as there are only sip users or
only xmpp users involved, but it does not work between the two worlds in
any direction. Moreover, I do not see any packet being exchanged between the
sip and the xmpp servers when a user from one domain subscribe to one from
the other, or when they change their status.
I dont know what the problem can be. No errors appear in the log and I
thought adding xmpp presence to openser would be straightforward once the IM
was already working.
Openser config file and part of the log file (the subscription to an xmpp
user) are attached. Hope someone can give me some clue.
Thanks in advance!
Paul
Hi all,
I find a solution to replace in my From the string "anonymous" by "92".
So, I do the following :
subst('/^(From|f): (.*) <sip:(.*)@(.*)>;/\1: \"Anonymous\" <sip:92@
\4>;/g');
The result is :
From: "Anonymous" <sip:anonymous@From: "Anonymous"
<sip:92@0172292965@domain.tld>;tag=21910a7967574581o0.
I try a lot of pattern, but it doesn't run.
Thanks for your support.
Regards,
Adrien
Hi All,
I'm facing a strange issue:
I've installed SER and MySQL on two machines, SER(200K users in subscriber
table) is running with 6GB and MySQL with 5GB of memory but in just 2 days
MySQL is using almost 5GB of memory and my SER response is getting very slow
some time number of transaction waiting will be 1300+ :(
any solution to this will be really helpful.
thanks in advance.
arun
I have openser-1.3.1-notls installed although am unable to start
openser. Any suggestions/ideas regarding the below error? Any existing
docs/links would be great.
Thanks
///
Mar 20 08:59:14 [18124] WARNING:core:fix_socket_list: could not rev.
resolve 10.138.86.56
Mar 20 08:59:14 [18124] WARNING:core:fix_socket_list: could not rev.
resolve 10.138.87.100
Mar 20 08:59:14 [18124] WARNING:core:fix_socket_list: could not rev.
resolve 10.37.129.2
Mar 20 08:59:14 [18124] WARNING:core:fix_socket_list: could not rev.
resolve 10.211.55.2
Mar 20 08:59:14 [18124] WARNING:core:fix_socket_list: could not rev.
resolve 10.138.86.56
Mar 20 08:59:14 [18124] WARNING:core:fix_socket_list: could not rev.
resolve 10.138.87.100
Mar 20 08:59:14 [18124] WARNING:core:fix_socket_list: could not rev.
resolve 10.37.129.2
Mar 20 08:59:14 [18124] WARNING:core:fix_socket_list: could not rev.
resolve 10.211.55.2
Listening on
udp: 127.0.0.1 [127.0.0.1]:5060
udp: 10.138.86.56 [10.138.86.56]:5060
udp: 10.138.87.100 [10.138.87.100]:5060
udp: 10.37.129.2 [10.37.129.2]:5060
udp: 10.211.55.2 [10.211.55.2]:5060
tcp: 127.0.0.1 [127.0.0.1]:5060
tcp: 10.138.86.56 [10.138.86.56]:5060
tcp: 10.138.87.100 [10.138.87.100]:5060
tcp: 10.37.129.2 [10.37.129.2]:5060
tcp: 10.211.55.2 [10.211.55.2]:5060
Aliases:
tcp: my.machine.name:5060
udp: my.machine.name:5060
Mar 20 08:59:14 [18124] WARNING:core:main: no fork mode and more than
one listen address found(will use only the first one)
Mar 20 08:59:14 [18124] INFO:core:init_tcp: using kqueue as the TCP io
watch method (auto detected)
Mar 20 08:59:14 [18124] NOTICE:core:main: version: openser 1.3.1-notls
(i386/darwin)
Mar 20 08:59:14 [18124] INFO:core:main: using 32 Mb shared memory
Mar 20 08:59:14 [18124] INFO:core:main: using 1 Mb private memory per
process
Mar 20 08:59:14 [18124] INFO:sl:mod_init: Initializing StateLess engine
Mar 20 08:59:14 [18124] INFO:tm:mod_init: TM - initializing...
Mar 20 08:59:14 [18124] CRITICAL:tm:uac_init: null socket list
Mar 20 08:59:14 [18124] ERROR:tm:mod_init: uac_init failed
Mar 20 08:59:14 [18124] ERROR:core:init_mod: failed to initialize module tm
Mar 20 08:59:14 [18124] ERROR:core:main: error while initializing modules
hi,
I am using SER 0.9.6 along with free radius 2.0.3 and radius client
0.5.6, I need to authenticate a user by using the digest attributes, the
problem is that the radius client did not any send the following attributes
to the radius server:
Digest-User-name, Digest-Realm, Digest-Method, Digest-Uri, Digest-Nonce and
Digest-Response.
Please tell me how do I send these attributes so that i can get the values
to the radius server,
here is the output of the SER when running in debug mode:
0(5069) WARNING: fix_socket_list: could not rev. resolve 192.168.1.227
0(5069) WARNING: fix_socket_list: could not rev. resolve 192.168.1.227
Listening on
udp: 192.168.1.227 [192.168.1.227]:5060
tcp: 192.168.1.227 [192.168.1.227]:5060
Aliases:
0(5069) fm_malloc_init: F_OPTIMIZE=16384, /ROUNDTO=2048
0(5069) fm_malloc_init: F_HASH_SIZE=2067, fm_block size=16548
0(5069) fm_malloc_init(0xb5f3e000, 33554432), start=0xb5f3e000
0(5069) shm_mem_init: success
0(0) core dump limits set to 4294967295
0(0) DEBUG: init_mod: sl_module
stateless - initializing
0(0) DEBUG: register_fifo_cmd: new command (sl_stats) registered
0(0) unixsock_register_cmd: New command (sl_stats) registered
0(0) DEBUG: MD5 calculated: 79977158fb94a9d13bb3c426277eb749
0(0) DEBUG: init_mod: tm
[root@localhost ser]# 0(0) TM - (size of cell=2776, sip_msg=760)
initializing...
0(0) Call-ID initialization: '6f7e7ee5'
0(0) DEBUG: register_fifo_cmd: new command (t_uac_dlg) registered
0(0) DEBUG: register_fifo_cmd: new command (t_uac_cancel) registered
0(0) DEBUG: register_fifo_cmd: new command (t_hash) registered
0(0) DEBUG: register_fifo_cmd: new command (t_reply) registered
0(0) unixsock_register_cmd: New command (t_uac_dlg) registered
0(0) unixsock_register_cmd: New command (t_uac_cancel) registered
0(0) unixsock_register_cmd: New command (t_hash) registered
0(0) unixsock_register_cmd: New command (t_reply) registered
0(0) DEBUG: lock_initialize: lock initialization started
0(0) DEBUG: register_fifo_cmd: new command (t_stats) registered
0(0) unixsock_register_cmd: New command (t_stats) registered
0(0) DEBUG: MD5 calculated: 5fee62c0d1ead6c68c47a98572cd20ab
0(0) DEBUG: MD5 calculated: 716032d4c0061ac55304d86f005be6a0
0(0) DEBUG: init_mod: rr
0(0) rr - initializing
0(0) DEBUG: init_mod: maxfwd
0(0) Maxfwd module- initializing
0(0) DEBUG: init_mod: usrloc
0(0) usrloc - initializing
0(0) DEBUG: register_fifo_cmd: new command (ul_stats) registered
0(0) DEBUG: register_fifo_cmd: new command (ul_rm) registered
0(0) DEBUG: register_fifo_cmd: new command (ul_rm_contact) registered
0(0) DEBUG: register_fifo_cmd: new command (ul_dump) registered
0(0) DEBUG: register_fifo_cmd: new command (ul_flush) registered
0(0) DEBUG: register_fifo_cmd: new command (ul_add) registered
0(0) DEBUG: register_fifo_cmd: new command (ul_show_contact) registered
0(0) unixsock_register_cmd: New command (ul_stats) registered
0(0) unixsock_register_cmd: New command (ul_rm) registered
0(0) unixsock_register_cmd: New command (ul_rm_contact) registered
0(0) unixsock_register_cmd: New command (ul_dump) registered
0(0) unixsock_register_cmd: New command (ul_flush) registered
0(0) unixsock_register_cmd: New command (ul_add) registered
0(0) unixsock_register_cmd: New command (ul_show_contact) registered
0(0) find_mod_export: found <db_use_table> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
0(0) find_mod_export: found <db_init> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
0(0) find_mod_export: found <db_close> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
0(0) find_mod_export: found <db_query> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
0(0) find_mod_export: found <db_raw_query> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
0(0) find_mod_export: found <db_free_result> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
0(0) find_mod_export: found <db_insert> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
0(0) find_mod_export: found <db_delete> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
0(0) find_mod_export: found <db_update> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
0(0) DEBUG: init_mod: registrar
0(0) registrar - initializing
0(0) find_export: found <sl_send_reply> in module sl_module
[/usr/local/lib/ser/modules/sl.so]
0(0) find_export: found <ul_bind_usrloc> in module usrloc
[/usr/local/lib/ser/modules/usrloc.so]
0(0) find_export: found <ul_register_udomain> in module usrloc
[/usr/local/lib/ser/modules/usrloc.so]
0(0) find_export: found <ul_get_all_ucontacts> in module usrloc
[/usr/local/lib/ser/modules/usrloc.so]
0(0) find_export: found <ul_insert_urecord> in module usrloc
[/usr/local/lib/ser/modules/usrloc.so]
0(0) find_export: found <ul_delete_urecord> in module usrloc
[/usr/local/lib/ser/modules/usrloc.so]
0(0) find_export: found <ul_get_urecord> in module usrloc
[/usr/local/lib/ser/modules/usrloc.so]
0(0) find_export: found <ul_lock_udomain> in module usrloc
[/usr/local/lib/ser/modules/usrloc.so]
0(0) find_export: found <ul_unlock_udomain> in module usrloc
[/usr/local/lib/ser/modules/usrloc.so]
0(0) find_export: found <ul_release_urecord> in module usrloc
[/usr/local/lib/ser/modules/usrloc.so]
0(0) find_export: found <ul_insert_ucontact> in module usrloc
[/usr/local/lib/ser/modules/usrloc.so]
0(0) find_export: found <ul_delete_ucontact> in module usrloc
[/usr/local/lib/ser/modules/usrloc.so]
0(0) find_export: found <ul_get_ucontact> in module usrloc
[/usr/local/lib/ser/modules/usrloc.so]
0(0) find_export: found <ul_update_ucontact> in module usrloc
[/usr/local/lib/ser/modules/usrloc.so]
0(0) find_export: found <ul_register_watcher> in module usrloc
[/usr/local/lib/ser/modules/usrloc.so]
0(0) find_export: found <ul_unregister_watcher> in module usrloc
[/usr/local/lib/ser/modules/usrloc.so]
0(0) find_export: found <ul_register_ulcb> in module usrloc
[/usr/local/lib/ser/modules/usrloc.so]
0(0) DEBUG: init_mod: textops
textops - initializing
0(0) DEBUG: init_mod: xlog
0(0) XLOG: initializing ...
0(0) DEBUG: init_mod: auth
0(0) auth module - initializing
0(0) find_export: found <sl_send_reply> in module sl_module
[/usr/local/lib/ser/modules/sl.so]
0(0) DEBUG: init_mod: auth_db
0(0) auth_db module - initializing
0(0) find_mod_export: found <db_use_table> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
0(0) find_mod_export: found <db_init> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
0(0) find_mod_export: found <db_close> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
0(0) find_mod_export: found <db_query> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
0(0) find_mod_export: found <db_raw_query> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
0(0) find_mod_export: found <db_free_result> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
0(0) find_mod_export: found <db_insert> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
0(0) find_mod_export: found <db_delete> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
0(0) find_mod_export: found <db_update> in module mysql
[/usr/local/lib/ser/modules/mysql.so]
0(0) find_export: found <pre_auth> in module auth
[/usr/local/lib/ser/modules/auth.so]
0(0) find_export: found <post_auth> in module auth
[/usr/local/lib/ser/modules/auth.so]
0(0) find_export: found <sl_send_reply> in module sl_module
[/usr/local/lib/ser/modules/sl.so]
0(0) DEBUG: init_mod: auth_radius
0(0) auth_radius - Initializing
0(0) auth_radius: No `Cisco' vendor in Radius dictionary
0(0) find_export: found <pre_auth> in module auth
[/usr/local/lib/ser/modules/auth.so]
0(0) find_export: found <post_auth> in module auth
[/usr/local/lib/ser/modules/auth.so]
0(0) ERROR: auth_radius: can't get code for the Digest-Response attribute
0(0) init_mod(): Error while initializing module auth_radius
ERROR: error while initializing modules
0(0) XLOG: destroy module ...
0(0) DEBUG: tm_shutdown : start
0(0) DEBUG: unlink_timer_lists : emptying DELETE list
0(0) DEBUG: tm_shutdown : emptying hash table
0(0) DEBUG: tm_shutdown : releasing timers
0(0) DEBUG: tm_shutdown : removing semaphores
0(0) DEBUG: tm_shutdown : destroying tmcb lists
0(0) DEBUG: tm_shutdown : done
0(5073) shm_mem_destroy
0(5073) destroying the shared memory lock
Thanks and Regards,
Elangbam Johnson
Hola, sólo era para comentar la existencia de un draft que desconocía y que
reúne toda la información posible sobre SIP y NAT:
http://tools.ietf.org/html/draft-ietf-sipping-nat-scenarios
Ala, me lo guardo y cuando alguien pregunte algo sobre "oigo pero no me oyen"
se lo enchufo XD
--
Iñaki Baz Castillo