Hello,
I used Kamailio+rtpproxy to record a session and rtpproxy outputs the
following files
long_file_name.a.rtp, long_file_name.a.rtcp, long_file_name.o.rtp,
long_file_name.o.rtcp
http://www.rtpproxy.org/wiki/RTPproxy/FAQ
From the Rtpproxy FAQ above, i tried to extract the audio using
rtpbreak and sox.
rtpbreak -W -r long_file_name.a.rtp
rtpbreak -W -r long_file_name.o.rtp
The above commands generate rtp.0.0.raw, rtp.1.0.raw.
Then when i run sox using
sox --combine merge -r 8k -A rtp.0.0.raw -r 8k -A rtp.1.0.raw -t wavpcm
-s out.wav i get the following errors :
sox: invalid option -- -
sox: -c must be given a number
Is there a switch/anything else that i am missing ?
Thanks in advance,
Regards,
Vikram.
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
Hi,
my kamailio server is receiving from some customers 3 identical INVITEs when
call is initiated (separated by 200ms). Those 3 INVITEs are making a big
problem with call_control:
WARNING: call_control [call_control.c:1156]: dialog to trace controlled call
was not created. discarding callcontrol.
That is why, the prepaid limit is not working at all in this case. This way
the user can hack the prepaid protection of the account. Otherwise the
call_control is fuilly functional.
Anybody experienced the similar problem? If so, how to resolve it?
Thanks,
Mino Haluz
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!
I am Using Solaris 10 and GCC 4.2, i do have libconfuse
everything goes fine until this error comes up.
carrierroute.c:54: error: 'MODULE_INTERFACE_VER' undeclared here (not in a function)
carrierroute.c:87: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cmds'
carrierroute.c:132: error: variable 'exports' has initializer but incomplete type
carrierroute.c:133: warning: excess elements in struct initializer
carrierroute.c:133: warning: (near initialization for 'exports')
carrierroute.c:134: warning: excess elements in struct initializer
carrierroute.c:134: warning: (near initialization for 'exports')
carrierroute.c:135: error: 'cmds' undeclared here (not in a function)
carrierroute.c:135: warning: excess elements in struct initializer
carrierroute.c:135: warning: (near initialization for 'exports')
carrierroute.c:136: warning: excess elements in struct initializer
carrierroute.c:136: warning: (near initialization for 'exports')
carrierroute.c:137: warning: excess elements in struct initializer
carrierroute.c:137: warning: (near initialization for 'exports')
carrierroute.c:138: warning: excess elements in struct initializer
carrierroute.c:138: warning: (near initialization for 'exports')
carrierroute.c:139: warning: excess elements in struct initializer
carrierroute.c:139: warning: (near initialization for 'exports')
carrierroute.c:140: warning: excess elements in struct initializer
carrierroute.c:140: warning: (near initialization for 'exports')
carrierroute.c:141: warning: excess elements in struct initializer
carrierroute.c:141: warning: (near initialization for 'exports')
carrierroute.c:142: warning: excess elements in struct initializer
carrierroute.c:142: warning: (near initialization for 'exports')
carrierroute.c:143: warning: excess elements in struct initializer
carrierroute.c:143: warning: (near initialization for 'exports')
carrierroute.c:145: warning: excess elements in struct initializer
carrierroute.c:145: warning: (near initialization for 'exports')
carrierroute.c: In function 'mod_init':
carrierroute.c:161: error: invalid use of undefined type 'struct module_exports'
make[1]: *** [carrierroute.o] Error 1
make: *** [modules] Error 1
Hello all,
I’m using two Kamailio Presence Servers that are also XCAP Servers for the
presence and resources management and the Kamailio Dispatcher in order to
balance the SIP requestes coming from SIP Client.
Then I’m trying to configure a HTTP load–balancer for the xcap/http
traffic.
I’m testing both Apache and INginx HTTP proxy but I’m facing with a problem
related with the Xcap authentication:
when a client sends the first xcap request to the http load-balancer, it
forwards the request to one of the configured Xcap Server that replies with
the 401 response in order to let the client authenticates. So, the client
sends the second request with the Digest authentication to the http
load-balancer. But, sometimes, the http load-balancer forwards the
authenticate request to the second Xcap Server that is not able to
authenticate the request. Then the client receive the “Unauthorized”
response…
Could you please give us some hints about this problem?
Thanks in advance,
laura
Hi,
did anyone run into similar problems or have successfully set up IMC module
with mysql? Can you please share your know-how on the subject?
Besides issue described below, I also had several other issues, but I think
they all might be related to the fact that my rooms and members are only
stored in cache, but not in the database. To repeat, this is really strange
behavior because all other modules that I'm using write to the database
without a problem.
Best regards
Ozren
On Mon, May 30, 2011 at 6:28 PM, Ozren Lapcevic <ozren.lapcevic(a)gmail.com>wrote:
> Hi all,
>
> I'm trying to configure IMC module and get it to work properly but I've run
> into problems with saving IMC module data to mysql database.
>
> I'm using following code provided in IMC module documentation:
>
> modparam("imc", "db_url", DBURL)
>
> ## route block ###
> if(is_method("MESSAGE") && (uri=~ "sip:chat-[0-9]+@") || (uri=~
> "sip:chat-manager@")) {
> xlog("L_INFO", "going to imc: F [$fu] T [$tu] B [$rb]\n");
>
> if(imc_manager())
> sl_send_reply("200", "ok - imc_manager()");
> else
> sl_send_reply("500", "command error");
> exit;
> }
>
> I am creating chat room with following message sent to chat-manager(a)abc.hr:
> "#create chat-111"
>
> DEBUG log returns following:
> May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]:
> INFO: <script>: going to imc: F [sip:oz@abc.hr] T [sip:chat-manager@abc.hr]
> B [#create chat-111]
> May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]:
> DEBUG: imc [imc.c:525]: found command
> May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]:
> DEBUG: imc [imc_cmd.c:146]: command: [create]
> May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]:
> DEBUG: imc [imc_cmd.c:151]: parameter 0=[chat-111]
> May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]:
> DEBUG: imc [imc_cmd.c:171]: new room [chat-111]
> May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]:
> DEBUG: imc [imc_cmd.c:186]: added room uri= sip:chat-111@abc.hr
> May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]:
> DEBUG: imc [imc_mng.c:322]: [uri]= sip:oz@abc.hr
> May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]:
> DEBUG: imc [imc_mng.c:326]: [user]= oz
> May 30 18:01:23 ser-test /usr/local/kamailio-ozren/sbin/kamailio[13225]:
> DEBUG: imc [imc_cmd.c:196]: added the owner as the first member [
> sip:oz@abc.hr]
>
> "./kamctl fifo imc_list_rooms" returns following:
> ROOM:: URI=sip:chat-111@abc.hr MEMBERS=0 OWNER=sip:oz@abc.hr
>
> "./kamctl fifo imc_list_members sip:chat-111@abc.hr" returns following:
> ROOM:: sip:chat-111@abc.hr NR_OF_MEMBERS=1
> MEMBER:: sip:oz@abc.hr
>
> However, that data is not persisted/saved in the imc_rooms and imc_members
> tables in the database. Any clues what might be the problem here?
>
> Any help is greatly appreciated.
>
> Best regards,
> Ozren Lapcevic
>
> PS
> I'm runing Kamailio 3.1.4 with default cfg file with enabled mysql,
> multidomain, usrlocdb, auth and NAT. I can register clients, establish
> calls, send IMs, etc. imc_rooms and imc_members tables were created when
> kamailio was installed. I've also checked imc-create.sql script and tables
> are correctly created.
>
> The same DBURL used for imc is also used for auth_db, domain and usrloc
> modules and I haven't experienced any problems with those modules and
> database connection/persistence. domain, location, version and subscriber
> tables are correctly populated.
>
> I'm not getting any errors from imc_manager(), it returns 200 OK. I can't
> trace any errors in DEBUG related to problems with mysql database.
>
In 3.1.1 this worked just fine. In 3.1.3 it is giving me an error. I
am unsure what to check at this point for why it would be failing. I am
doing a kamailio -c to validate the config and not actually launching
the program but I do not think that should cause this.
modparam("app_lua", "register", "sqlops")
sqlops.so is loaded.
if I remove that modparam line the config validates, however the lua
script would fail because it uses sqlops.
modules.lst is the same for building.
While I do not think that it is lua specific, both are using
liblua5.1.0, one is Ubuntu 11.04 natty (where it fails) and the other is
Debian wheezy (where its working).
0(18226) WARNING: <core>
[sr_module.c:578]: /usr/local/kamailio/lib64/kamailio/modules/app_lua.so: exports dlflags interface is deprecated and it will notbe supported in newer versions; consider using mod_register() instead
0(18226) : <core> [cfg.y:3412]: parse error in config file kamailio.cfg,
line 262, column 41: Can't set module parameter
As a side note the "notbe supported ..." line is missing a space between
not and be and a newline at the end.
--
Trixter aka Bret McDanel
website: http://www.0xdecafbad.com
pgp key: http://bit.ly/9XYK4b