Hello Stefan,
On 3/14/11 11:03 AM, Stefan Tiedje wrote:
> Thanks for the answer.
> Maybe I have some older versions of the OPENSER-MIB and the other
> related MIB's since I could not find the counter you pointed at. I'm
> using a MIB browser for reading the MIB's.
> Is the suggested counter "expired dialogs" added in a specific release
> of Kamailio? Which? We use Kamailio 3.0.2.
I used Kamailio and recommend using it sine it has the latest commits
for stability.
However, what I wrote before is pretty much not related to the version.
There is a counter that tracks the processed dialogs, but seems it is
not exported by default through snmpstats module. The statistics counter
is named "processed_dialogs", implemented by dialog module.
You can dump all internal statistics through kamctl or via xmlrpc
command, but probably to export it through snmpstats you may need to
extend the mibs and the code of the module.
I just grepped the sources of snmpstats module to see what dialog
statistics it is exporting:
$ grep -n _dialogs modules_k/snmpstats/* | grep get_statistic
modules_k/snmpstats/alarm_checks.c:83: num_dialogs =
get_statistic("active_dialogs");
modules_k/snmpstats/snmpObjects.c:404: int result =
get_statistic("active_dialogs");
modules_k/snmpstats/snmpObjects.c:424:
get_statistic("active_dialogs") -
modules_k/snmpstats/snmpObjects.c:425:
get_statistic("early_dialogs");
modules_k/snmpstats/snmpObjects.c:443: int result =
get_statistic("early_dialogs");
modules_k/snmpstats/snmpObjects.c:459: int result =
get_statistic("failed_dialogs");
modules_k/snmpstats/snmpObjects.c:508: int num_dialogs =
get_statistic("active_dialogs");
Perhaps when the snmpstats was developed the dialog module didn't export
the statistics counter of "processed_dialogs" and then it was not updated.
Now, what I tried to say is that if the "processed_dialogs" counter is
not available through snmpstats (and it is not now after grepping the
sources) you can get its value from another application through "kamctl
get_statistics all" or XMLRPC command for all of the existing kamailio
releases. Upcoming one we will look to implement the export through
snmpstats as well. If you have time to do it and send us a patch, we
will gladly commit it to source tree in our GIT repository.
Cheers,
Daniel
> Do you have the MIB name for the "expired dialogs" counter. I will
> look for that in my version of OPENSER MIBS.
> Important, do you have a link to where MIB files can be downloaded for
> Kamailio 3.0.2?
> Below follows an excerp from one of the MIB's. Is it old, I don't know?
>
> -- ***********************************************************************
>
> -- OPENSER-MIB: OPENSER MIB
>
> --
>
> -- Date of Creation: Januay 2006
>
> --
>
> -- This MIB provides information related to the OpenSER SIP Router.
>
> --
>
> -- Copyright (c) The Internet Society (2006)
>
> -- Ammendments (c) Soma Networks, Inc. (2006)
>
> --
>
> -- All rights reserved.
>
> -- *****************************************************************
>
> /Stefan
>
> ------------------------------------------------------------------------
> *From:* Daniel-Constantin Mierla [mailto:miconda@gmail.com]
> *Sent:* den 14 mars 2011 10:16
> *To:* Stefan Tiedje
> *Cc:* sr-users(a)lists.sip-router.org
> *Subject:* Re: [SR-Users] OPENSER MIB
>
> Hello,
>
> On 3/14/11 9:42 AM, Stefan Tiedje wrote:
>> Hi,
>> In the Kamailio OPENSER-MIB there is the counter
>> "openserTotalNumFailedDialogSetups". This is a Counter32.
>> The description is:
>> "The total number of calls that failed with an error. The
>> following codes define a failed call:"
>> *Question:*
>>
>> * I'm looking for the corresponding counter to
>> "openserTotalNumFailedDialogSetups" who counts successful
>> Dialog setups of Counter32 type. Does it exist?
>> * If not, does it exist a work around?
>> * Where in the code can the new suggested counter be added?
>> * Something else????
>>
>
> the dialog module counts the number of processed dialogs, see:
> http://kamailio.org/docs/modules/stable/modules_k/dialog.html#id2966360
>
> There is no counter currently inside dialog module exporting exactly
> the number of successfully setup dialogs, it should not be hard to do
> it, though. Using the above and the number of failed and expired
> dialogs, you can actually get the number of successful dialogs.
>
> Dialog module being the one that tracks SIP dialogs, therefore being
> able to count them, now I don't know if snmpstats module exports all
> the counters from dialog module. I setup snmpstats just few weeks ago
> and works perfect on Ubuntu/Debian servers, but I had no need to check
> dialog module counters.
>
> Note that you can get the list of all internal statistics via kamctl:
> - kamctl fifo get_statistics all
>
> Or via XMLRPC if you need them remotely in another application.
>
> Another option is to define your statistics with statistics module.
> Knowing that in SIP a successful call dialog means 200ok reply to an
> INVITE transaction, you can count it in the onreply_route[abc] that
> you arm for relayed transactions with t_on_reply("abc").
>
> Hope these help you,
> Daniel
>
>> Suggestion for the new counter is a name like:
>> "openserTotalNumSucceededDialogSetups". It has a counter32.
>> Description: "The total number of calls that succeeded"
>> I know that there are the counters openserCurNumDialogs,
>> openserCurNumDialogsInProgress and openserCurNumDialogsInSetup but
>> these are of Gauge type who only reflects the current situation.
>> These Gauge counters can't be used together with a Counter32 counter.
>> That don't mix. The calculation done for the counter
>> "openserCurNumDialogsInProgress" should be used where every new
>> dialog setup is added to the new suggested counter. A counter of 32
>> should cover a great deal of connections. These counters are usually
>> read, if used, every 15 minutes or 1 hour.
>> *Rationale:*
>> The reason for the new counter is that a calculation between
>> succeeded and failed dialog setups can be done and be used for SLA
>> agreements. Without this, its hard to make any customer versus
>> provider agreements.
>> /Stefan
>> PS. Ask if anything is unclear and I need an answer rapidly.
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users(a)lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla
> http://www.asipto.com
--
Daniel-Constantin Mierla
http://www.asipto.com
Hello,
Is there anything special that needs to be done for float comparison?
For example:
if([5.5 >= 4.3]) ....
or
if(5.5 > 4.3) ....
The conditional does not seem to be coming back as true like it should?
This is simply an example... the precision in the actual case is different
(longer decimal places).
Thank you for all and any help in advance!
On 18 April 2011 15:47, Henning Westerholt <henning.westerholt(a)1und1.de> wrote:
> On Monday 18 April 2011, Roman Yeryomin wrote:
>> coredump? easy :)
>> you can pick core file itself here (it's pretty heavy to send to the list):
>> http://83.99.159.113/core.kamailio.20110418-1331
>>
>> What do you mean by backtrace? log output or strace output?
>
> Hi Roman,
>
> he refers to a gdb backtrace, "gdb bt". More informations e.g. here:
> http://www.kamailio.org/dokuwiki/doku.php/troubleshooting:corefiles
>
ok, here is the backtrace:
# gdb kamailio core
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /lib/tls/i686/cmov/libresolv.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libresolv.so.2
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/local/lib/kamailio/modules_k/mi_fifo.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules_k/mi_fifo.so
Reading symbols from /usr/local/lib/kamailio/libkmi.so.1...done.
Loaded symbols for /usr/local/lib/kamailio/libkmi.so.1
Reading symbols from /usr/local/lib/kamailio/modules_k/kex.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules_k/kex.so
Reading symbols from /usr/local/lib/kamailio/libkcore.so.1...done.
Loaded symbols for /usr/local/lib/kamailio/libkcore.so.1
Reading symbols from /usr/local/lib/kamailio/modules/tm.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules/tm.so
Reading symbols from /usr/local/lib/kamailio/modules_k/tmx.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules_k/tmx.so
Reading symbols from /usr/local/lib/kamailio/modules/sl.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules/sl.so
Reading symbols from /usr/local/lib/kamailio/modules_k/rr.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules_k/rr.so
Reading symbols from /usr/local/lib/kamailio/modules_k/pv.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules_k/pv.so
Reading symbols from /usr/local/lib/kamailio/modules_k/maxfwd.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules_k/maxfwd.so
Reading symbols from /usr/local/lib/kamailio/modules_k/usrloc.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules_k/usrloc.so
Reading symbols from /usr/local/lib/kamailio/libsrdb1.so.1...done.
Loaded symbols for /usr/local/lib/kamailio/libsrdb1.so.1
Reading symbols from /usr/local/lib/kamailio/modules_k/registrar.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules_k/registrar.so
Reading symbols from /usr/local/lib/kamailio/modules_k/textops.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules_k/textops.so
Reading symbols from /usr/local/lib/kamailio/modules_k/siputils.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules_k/siputils.so
Reading symbols from /usr/local/lib/kamailio/modules_k/xlog.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules_k/xlog.so
Reading symbols from /usr/local/lib/kamailio/modules/sanity.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules/sanity.so
Reading symbols from /usr/local/lib/kamailio/modules/ctl.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules/ctl.so
Reading symbols from /usr/local/lib/kamailio/modules/mi_rpc.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules/mi_rpc.so
Reading symbols from /usr/local/lib/kamailio/modules_k/acc.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules_k/acc.so
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...done.
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /usr/local/lib/kamailio/modules_k/perl.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules_k/perl.so
Reading symbols from /usr/lib/libperl.so.5.8...done.
Loaded symbols for /usr/lib/libperl.so.5.8
Reading symbols from /lib/tls/i686/cmov/libm.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /lib/tls/i686/cmov/libcrypt.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/libcrypt.so.1
Reading symbols from /usr/local/lib/kamailio/modules_k/perlvdb.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules_k/perlvdb.so
Reading symbols from /usr/local/lib/kamailio/modules/auth.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules/auth.so
Reading symbols from /usr/local/lib/kamailio/modules_k/auth_db.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules_k/auth_db.so
Reading symbols from /usr/local/lib/kamailio/modules/app_lua.so...done.
Loaded symbols for /usr/local/lib/kamailio/modules/app_lua.so
Reading symbols from /usr/lib/liblua5.1.so.0...done.
Loaded symbols for /usr/lib/liblua5.1.so.0
Reading symbols from /lib/tls/i686/cmov/libnss_files.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_files.so.2
Reading symbols from /lib/tls/i686/cmov/libnss_dns.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_dns.so.2
Core was generated by `kamailio -dddd'.
Program terminated with signal 11, Segmentation fault.
[New process 13773]
#0 0xb7228e3a in parseurl (url=0xb7213230 "T�0\b#") at perlvdbfunc.c:60
60 if (strlen(cn) > 0)
If I understand this correctly error refers to row 60 in perlvdbfunc.c
strlen expects const char* instead of char* ?
Regards,
Roman
I have set up kamailio 3.1.2 on an install of Debian Squeeze, using the default config but with the following defines enabled:
WITH_MYSQLWITH_AUTHWITH_USRLOCDBWITH_NAT
Everything works as expected when starting Kamailio from a terminal, e.g.service kamailio start
But after a reboot, the service fails to start and all SIP requests are dropped with a ICMP port unreachable error.
The following is an extract of /var/log/syslog when this problem occurs. It looks like Kamailio is failing to access the mysql socket, as the mysql service has not yet started?
Apr 12 10:08:31 SIPServer /usr/sbin/kamailio[1347]: ERROR: db_mysql [km_my_con.c:109]: driver error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)Apr 12 10:08:31 SIPServer /usr/sbin/kamailio[1347]: ERROR: <core> [db.c:289]: could not add connection to the poolApr 12 10:08:31 SIPServer /usr/sbin/kamailio[1347]: ERROR: usrloc [dlist.c:486]: failed to open database connectionApr 12 10:08:31 SIPServer /usr/sbin/kamailio[1347]: ERROR: registrar [reg_mod.c:396]: failed to register domainApr 12 10:08:31 SIPServer /usr/sbin/kamailio[1347]: ERROR: <core> [route.c:1161]: fixing failed (code=-1) at cfg:/etc/kamailio/kamailio.cfg:569Apr 12 10:08:31 SIPServer /usr/sbin/kamailio[1347]: ERROR: <core> [route.c:1161]: fixing failed (code=-1) at cfg:/etc/kamailio/kamailio.cfg:572Apr 12 10:08:31 SIPServer /usr/sbin/kamailio[1347]: ERROR: <core> [route.c:1161]: fixing failed (code=-1) at cfg:/etc/kamailio/kamailio.cfg:574Apr 12
10:08:34 SIPServer mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysqlApr 12 10:08:34 SIPServer mysqld: 110412 10:08:34 [Note] Plugin 'FEDERATED' is disabled.Apr 12 10:08:36 SIPServer mysqld: 110412 10:08:36 InnoDB: Started; log sequence number 0 44233Apr 12 10:08:36 SIPServer mysqld: 110412 10:08:36 [Note] Event Scheduler: Loaded 0 eventsApr 12 10:08:36 SIPServer mysqld: 110412 10:08:36 [Note] /usr/sbin/mysqld: ready for connections.Apr 12 10:08:36 SIPServer mysqld: Version: '5.1.49-3' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Debian)
Both the Kamailio and mysql services start with priority 18 on run levels 2345. I tried adjusting the Kamailio service to priority 19, but the problem still occurs.
I am relatively new to Kamailio and mysql as well as Linux / Debian administration, so I'm not really sure how to solve this problem. Any ideas would be greatly appreciated.
Regards,Rick Aldred
We are happy to announce the availability of the
SIP Express Media Server version 1.4.0.
SEMS is a high performance media and application server
for SIP based VoIP networks.
This release features a powerful Session Border Controller (SBC)
module. From completely transparent B2BUA to customized URI/From/To,
strictly filtered (messages, headers, codecs) with RTP anchoring,
Session Timer enforcement, prepaid and call timer, the SBC facilitates
interconnect and core routing in a simple and secure way.
Thanks to the new multihoming support, SEMS can now be employed
at the border of the networks. This addition also allows to
overcome the bottleneck of one NIC - giving the possibility to
fully exploit SEMS' great performance.
In the app development area, the DSM language has matured to
become a viable candidate also for implementing complex
application logic, thanks to language constructs like for, if
and functions.
SEMS can be downloaded in source from its ftp site at:
ftp.iptel.org/pub/sems/1.4/1.4.0/
Packages for debian/ubuntu should appear shortly on the OBS page:
https://build.opensuse.org/project/show?project=home:team-sems
Contributors to this release:
Stefan Sayer, Raphael Coeffic, Bogdan Pintea, Matthew Williams,
Peter Lemenkov, Anton Zagorskiy, Robert Szokovacs, Jon Bonilla,
Thomas Gelf, Erik Dekkers, Tobias Lindgren, David J
Many thanks to the companies sponsoring SEMS development, especially
FRAFOS GmbH and TelTech Systems Inc.
"E stands for Express."
* Apologies if you receive multiple copies of this message. *
I want kamailio to authenticate itself to a host if it is sent a 401, just as that host is expected to authenticate if kamailio sends it one. I am not finding much in the online probably because I am not searching for the right terms. Does anyone have any experience in this?
Thanks!
-Eric
I would like to use dbtext to store a list of whitelisted gateways, but each time I load it I get a core segmentation fault.
Any ideas? Here is my gateways db file:
key_name(str) key_type(int) value_type(int) key_value(str)
gwip:1:0:a
gwip:1:0:b
gwip:1:0:c
gwcount:0:1:3
And in my config:
modparam("htable","htable","gateways=>size=4;dbtable=gateways;")
modparam("htable","db_url","text:///usr/local/etc/kamailio")
while( $var(i) < $sht(gateways=>gwcount) ){
if( $sht(gateways=>gwip[$var(i)]) == $si ){
setflag(gateway);
xlog("ISFROMGW: request from IP $si matches $sht(gateways=>gwip[$var(i)]) ...\n");
}
}
Do you see anything wrong with this setup?
-Eric
i have a main office and a branch office.
the main office and the branch office connected via vpn connection the
branch office is natted to the main office.
so i want to put on the gateway machine a SIP proxy server to nat the
sip connection and also to proxy all the connections to SIP uses of the
office.
means i have one asterisk machine on the main site and other SIP
providers that in a case i want to use i can use them also without
connecting to the main office.
i dont need asterisk on the branch office.
the gateway server is ubuntu 10.04 amd64
what i should use Kamailio or the openser on the ubuntu repos?
for now the Kamailio is installed.(not working).
another feature i want to add is to be able to make calls between SIP
phones using this server such as berni(a)mydomain.com
from outside the office and vise verse... to dial people at
bob(a)otherdomain.com
hope for little help
Eliezer