Hi,
I have a sip registrar.(kamailio server installed in one server)
I want to use the siremis 2.0 to collect management information from the
sip registrar.
Can you guide me how to make the connection between the sip registrar and
the siremis so that the stats can be collected?
Thanks
Hello,
I have partly fixed this, I was using an incorrect xml format and missing usage of pua module. It took a little more than debugging to find this out.
Now I have run into this new issue.
I have implemented a presence + rls + xcap server:
When client subscribes for RLS, kamailio Notifies with resourcelist for the client. The pua within the server does backend subscribtions.
These backend subscribtions are responded with 202 Accepted replies.
When the resources in the contact list change their presence information the pua generates NOTIFIY with subscription state: pending.
Rls module does not reply back.
Kamailio does not return from the following command.
if(is_method("NOTIFY"))
{
xlog("handle notify");
rls_handle_notify();
xlog("notify was handled");
exit;
};
Thank you for looking into this.
Regards
Gnani
From: Gnaneshwar Gatla
Sent: Thursday, April 19, 2012 4:53 PM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List
Cc: Cody Herzog
Subject: How does RLS work with kamailio.
Hello,
I'm trying to implement RLS with integrated XCAP server. I have successfully run the Kamailio instance with the following snippet.
Since I had no RLS clients available, I have tried to test this with SIPp. The attached pcap trace is the result.
Test:
1. Send an XCAP signal over http to Kamailio.
2. Register and subscribe Kamailio.
The test does store the xml received over http in the xcap table in the database. But rls module does not store the data neither in rls_presentity or rls_watcher.
When I sent the Subscribe with sipp, the server throws error that subscription was not found in the database.
I would like to know if I'm doing something wrong to implement this service. Is there any brief tutorial on how to implement this?
Kamailio.cfg snippet:
##Presence
modparam("presence", "server_address", PRESENCE_IP)
modparam("presence", "clean_period", 65)
modparam("presence", "db_update_period", 60)
modparam("presence", "max_expires", 75)
modparam("presence", "fallback2db", 1)
modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "force_active", 0)
modparam("presence_xml", "integrated_xcap_server", 1)
##rls modparams
modparam("rls", "db_url", DBURL)
modparam("rls", "waitn_time", 10)
modparam("rls", "integrated_xcap_server", 1)
modparam("rls", "max_notify_body_length", 32000)
modparam("rls", "to_presence_code", 10)
modparam("rls", "server_address", RLS_URI)
modparam("rls", "outbound_proxy", PUA_OUTBOUND_PROXY)
modparam("rls", "xcap_root", XCAP_ROOT)
##XCAP modparams
modparam("xcap_server", "db_url", DBURL)
modparam("xcap_client", "db_url", DBURL)
modparam("xcap_client", "query_period", 50)
route[PRESENCE]
{
if(!is_method("PUBLISH|SUBSCRIBE"))
return;
#!ifdef WITH_PRESENCE
if (!t_newtran())
{
sl_reply_error();
exit;
};
if(is_method("PUBLISH"))
{
handle_publish();
t_release();
}
else
if( is_method("SUBSCRIBE"))
{
$var(ret_code)= rls_handle_subscribe();
xlog("Subscribe: $var(ret_code)");
if($var(ret_code)== 10)
handle_subscribe();
t_release();
}
exit;
#!endif
# if presence enabled, this part will not be executed
if (is_method("PUBLISH") || $rU==$null)
{
sl_send_reply("404", "Not here");
exit;
}
return;
}
In the [xhttp:request]:
switch($rm) {
case "PUT":
xcaps_put("$var(uri)", "$hu", "$rb");
if($xcapuri(u=>auid)=~"pres-rules")
{
xlog("===== xhttp put: refreshing watchers for $var(uri)\n");
pres_update_watchers("$var(uri)", "presence");
pres_refresh_watchers("$var(uri)", "presence", 1);
}
else if ($xcapuri(u=>auid)=~"resource-lists"
|| $xcapuri(u=>auid)=~"rls-services")
{
xlog("==== xhttp put: refreshing rls watchers $var(uri)\n");
rls_update_subs("$var(uri)", "presence");
}
exit;
break;
Gnaneshwar Gatla | InTouch Health | Software Developer
6330 Hollister Ave. Goleta CA, 93117 | P: 805.562.8686 ext: 199
Oppsie.. forgot to attach the document.
Gnaneshwar Gatla | InTouch Health | Software Developer
6330 Hollister Ave. Goleta CA, 93117 | P: 805.562.8686 ext: 199
From: Gnaneshwar Gatla
Sent: Thursday, April 26, 2012 2:14 PM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List
Subject: kamailio Crashes with rls module
Hello,
I'm experimenting the usage of rls module with Kamailio. I have been able to successfully update xcap documents on Kamailio XCAP server.
I have tried to use SIPp to get a NOTIFY for subscribing a rls-service list.
Kamailio does get the xml from the xcap table and tries to parse it and crashes. I'm not sure if this is because the format of the XML, I derived the xml format from the RFC 4662 and 4826.
I have attached the Kamailio log. I need help with this.
Any help is appreciated, thank you very much.
Gnaneshwar Gatla | InTouch Health | Software Developer
6330 Hollister Ave. Goleta CA, 93117 | P: 805.562.8686 ext: 199
Hello everyone,
I'm doing some TLS performance testing on Kamailio 3.2.1. Here's my setup:
kamailio -V
version: kamailio 3.2.1 (x86_64/linux) 31c991
flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS,
USE_RAW_SOCKS, USE_STUN, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK,
SHM_MEM, SHM_MMAP, PKG_MALLOC, DBG_QM_MALLOC, USE_FUTEX,
FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 4MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 31c991
compiled on 19:38:03 Dec 20 2011 with gcc 4.4.6
uname -a
Linux null.null.com 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22
GMT 2011 x86_64 x86_64 x86_64 GNU/Linux
CentOS 6.2 on a Dell PowerEdge R610 with 24 Intel X5650 Cores at
2.67GHz and 12GB of RAM (I could use more).
Kamailio is the default config with a few changes:
- WITH_TLS defined
- TLS is using self-generated CAs/certs (essentially openvpn easy-rsa)
with 1024 bit key size
- TLS is *not* configured to verify client OR server certs by default
- I'm using TLS v1 (SSL 3.1)
- TLS cipher suites are set to any (although my simulated UAs only
offer AES 256+SHA)
- Various changes to Kamailio children (up to 256 at times) and memory
sizes (up to 2048mb and even 4096mb at times)
- One DNS based alias added
- Maximum TCP connections increased to 65000
- Kamailio is configured to only listen on tested IP (UDP, TCP, TLS
sockets active)
- Syslog has been configured to log local0 (Kamailio) asynchronously
My test rig/call generator is an Ixia Xcellon-Ultra NP load module
with IXLoad. My call scenario does the following:
- Registers two simulated user agents (100000, 200000) to Kamailio with TLS
- Places call from 100000 to 200000 via Kamailio with TLS
- Increments both user agents by 1 and continues as quickly (cps) as I
like up to a channel limit (also configurable)
- The Ixia generates a valid SDP but no RTP is generated (although
that's certainly possible at these call levels)
Two 1 gig ports on the Ixia are connected to the Broadcom NICs on
the Dell R610 via a Cisco Catalyst 4948 switch. One port on the Ixia
emulates the 100000 agents (A leg) and the other emulates the 200000
agents (B leg). Of course I can provide more information if needed.
Here are some test numbers:
With TLS at 20cps, 120 sec calls, up to a total of 2470 calls (4940
registrations) life is good. Very good - call setup time averages
23ms, the cps rate holds indefinitely, and not a single call or
registration fails over long term tests.
UDP and TCP numbers are excellent (bordering ridiculous) - usually
around 500cps with practically no reasonable upper limit on
simultaneous calls. This doesn't need any further discussion :).
The TLS numbers start falling apart pretty quickly after 20cps,
however. If I change the TLS test to 40cps, 120 sec calls, up to a
total of 4940 calls (9,880 registrations) Kamailio starts to
(seriously) struggle. The rate starts fluctuating all over the place,
call setup time averages jump to 8000ms (or more) and things just
generally get ugly. Interestingly enough all of the user agents are
able to register, the logs look fine (to my eye at this log level) and
the system (CPU, network, etc) doesn't appear to be under stress at
all.
I have a few questions:
1) Is there something obviously wrong or stupid I'm doing here?
2) Why are the TLS tests so much worse than TCP and UDP? Am I
missing something here?
Thanks (in advance) for any advice anyone might be able to offer!
--
Kristian Kielhofner
On 05/16/2012 03:02 PM, Charles Chance wrote:
>>>
>>> Currently testing devel version and experiencing the following when
>>> using pua_dialoginfo:
>>>
>>> -------------------------------------
>>>
>>> Program terminated with signal 11, Segmentation fault.
>>>
>>> #0 core_hash (t=0xb3d7e330, type=1024, ps=0xbfcc31c8) at
>>> ../../hashes.h:279
>>>
>>> 279 v=(*p<<24)+(p[1]<<16)+(p[2]<<8)+p[3];
>>>
>>>
Hello,
Don't know if this is related, but the statement above hides a nasty
bug: p[1] is a char (as for the description), so is signed, shifting to
the left 16 bits is ok, as an integral promotion takes place. The
problem is that if p[1] is negative (-1 is 0xff), then the integral
promotion is signed as well and is complementary of 2 (or whatever the
implementation considers), and the shift will return another value as
expected.
For example :
#include <stdio.h>
int main(){
char b = 0xff;
unsigned h = (b<<16);
printf("%x\n", h);
return 0;
}
will print ffff0000 instead of ff0000 as expected. Haven't calculated
the implication of this related to the bug. An fix would be to cast p[1]
to (unsigned char)
Cheers,
Marius
--
Zbihlei Marius
Head of
Linux Development Services Romania
1&1 Internet Development srl Tel KA: 754-9152
Str Mircea Eliade 18 Tel RO: +40-31-223-9152
Sect 1, Bucuresti mailto: marius.zbihlei(a)1and1.ro
71295, Romania
Hello,
hmm, hentity is null even a check for its value is done above ...
Is this reproducible or happens from time to time? What are the values
you set for $avp(s:puburis_caller) and $avp(s:puburis_callee)?
Can you try without parameters:
modparam("pua_dialoginfo", "use_pubruri_avps", 1)
modparam("pua_dialoginfo", "pubruri_caller_avp", "$avp(s:puburis_caller)")
modparam("pua_dialoginfo", "pubruri_callee_avp", "$avp(s:puburis_callee)")
These were added by a recent contribution, I want to see if they are the
reason.
Cheers,
Daniel
On 5/16/12 12:00 AM, Charles Chance wrote:
>
> Hi Daniel,
>
> I tried to check that already, but it's not there:
>
> (gdb) frame 1
>
> #1 publ_cback_func (t=0xb3d7e330, type=1024, ps=0xbfcc31c8)
>
> at send_publish.c:246
>
> 246 hash_code= core_hash(hentity->pres_uri, NULL, HASH_SIZE);
>
> (gdb) p *hentity
>
> Cannot access memory at address 0x0
>
> Config parameters are:
>
> modparam("pua", "db_url", "mysql://user:pass@xx.xx.xx.xxx/dbname")
>
> modparam("pua", "db_table", "kam_pua")
>
> modparam("pua_dialoginfo", "caller_confirmed", 1)
>
> modparam("pua_dialoginfo", "include_localremote", 0)
>
> modparam("pua_dialoginfo", "override_lifetime", 300)
>
> modparam("pua_dialoginfo", "use_pubruri_avps", 1)
>
> modparam("pua_dialoginfo", "pubruri_caller_avp", "$avp(s:puburis_caller)")
>
> modparam("pua_dialoginfo", "pubruri_callee_avp", "$avp(s:puburis_callee)")
>
> Cheers,
>
> Charles
>
> ------------------------------------------------------------------------
>
> *From:*Daniel-Constantin Mierla [mailto:miconda@gmail.com]
> *Sent:* 15 May 2012 21:58
> *To:* Charles Chance
> *Cc:* 'SIP Router - Kamailio (OpenSER) and SIP Express Router (SER)
> -Users Mailing List'
> *Subject:* Re: FW: (Devel) Segmentation fault using pua_dialoginfo
>
> Hello,
>
> interesting that the output of bt shows inline core_hash function
> prototype with same parameters as publ_cback_func, not being able to
> spot eventual wrong parameter values.
>
> Anyhow, in the gdb, can you do the commands:
>
> frame 1
> p *hentity
>
> and send the output? Let's see the value of the pub uri for which
> hashing function crashes.
>
> What are the parameters for pua and pua_dialog info you set in the
> config file?
>
> Cheers,
> Daniel
>
> On 5/15/12 11:53 AM, Charles Chance wrote:
>
>> Hi Daniel,
>>
>> As per your previous reply (sorry, I deleted it accidentally), please
>> find attached output of 'bt full' as requested.
>>
>> Best regards and thanks again,
>>
>> Charles
>>
>> ------------------------------------------------------------------------
>>
>> *From:*Charles Chance [mailto:charles.chance@sipcentric.com]
>> *Sent:* 13 May 2012 11:21
>> *To:* 'SIP Router - Kamailio (OpenSER) and SIP Express Router (SER)
>> -Users Mailing List'
>> *Subject:* (Devel) Segmentation fault using pua_dialoginfo
>>
>> Hi,
>>
>> Currently testing devel version and experiencing the following when
>> using pua_dialoginfo:
>>
>> -------------------------------------
>>
>> Program terminated with signal 11, Segmentation fault.
>>
>> #0 core_hash (t=0xb3d7e330, type=1024, ps=0xbfcc31c8) at
>> ../../hashes.h:279
>>
>> 279 v=(*p<<24)+(p[1]<<16)+(p[2]<<8)+p[3];
>>
>> (gdb) bt
>>
>> #0 core_hash (t=0xb3d7e330, type=1024, ps=0xbfcc31c8) at
>> ../../hashes.h:279
>>
>> #1 publ_cback_func (t=0xb3d7e330, type=1024, ps=0xbfcc31c8) at
>> send_publish.c:246
>>
>> #2 0x002861d6 in run_trans_callbacks_internal (cb_lst=0xb3d7e370,
>> type=1024, trans=0xb3d7e330, params=0xbfcc31c8) at t_hooks.c:290
>>
>> #3 0x002864d6 in run_trans_callbacks (type=1024, trans=0x200,
>> req=0x0, rpl=0xb7bea008, code=200) at t_hooks.c:317
>>
>> #4 0x002afb28 in local_reply (t=0xb3d7e330, p_msg=0xb7bea008,
>> branch=0, msg_status=200, cancel_data=0xbfcc345c) at t_reply.c:2001
>>
>> #5 0x002b2b45 in reply_received (p_msg=0xb7bea008) at t_reply.c:2350
>>
>> #6 0x0809d5f4 in forward_reply (msg=0xb7bea008) at forward.c:790
>>
>> #7 0x080e11a9 in receive_msg (
>>
>> buf=0x82c4fa0 "SIP/2.0 200 OK\r\nVia: SIP/2.0/UDP
>> xx.xx.xx.xxx;branch=z9hG4bKc13b.25313b6.0\r\nTo:
>> sip:000094@xx.xx.xx.xxx;tag=03373b1b433b65504ea28bd3d9e6db76.d7f2\r\nFrom
>> <sip:000094@xx.xx.xx.xxx;tag=03373b1b433b65504ea28bd3d9e6db76.d7f2%5Cr%5CnFrom>:
>> sip:000094@xx.xx.xx.xxx;tag=4cc17c2c75cb82fa"..., len=393,
>> rcv_info=0xbfcc3648) at receive.c:270
>>
>> #8 0x0817801b in udp_rcv_loop () at udp_server.c:544
>>
>> #9 0x080b0426 in main_loop () at main.c:1633
>>
>> #10 0x080b3d02 in main (argc=11, argv=0xbfcc3924) at main.c:2546
>>
>> (gdb) up
>>
>> #1 publ_cback_func (t=0xb3d7e330, type=1024, ps=0xbfcc31c8) at
>> send_publish.c:246
>>
>> 246 hash_code= core_hash(hentity->pres_uri, NULL, HASH_SIZE);
>>
>> (gdb) p hentity->pres_uri
>>
>> Cannot access memory at address 0x8
>>
>> (gdb) p *hentity
>>
>> Cannot access memory at address 0x0
>>
>> -------------------------------------
>>
>> Your time is greatly appreciated...
>>
>> Charles
>>
>
>
> --
> Daniel-Constantin Mierla -http://www.asipto.com
> http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> -http://www.linkedin.com/in/miconda
>
> ------------------------------------------------------------------------
>
> No virus found in this message.
> Checked by AVG - www.avg.com <http://www.avg.com>
> Version: 2012.0.2171 / Virus Database: 2425/5000 - Release Date: 05/15/12
>
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Hi,
can the db_cluster module be used to all DB connections?
if today i set for example "modparam("dialplan", db_url", DBURL)" i will be
able to use "modparam("dialplan", db_url", CLUSTER)" ?
still, on the #!define DBURL "mysql://.........." i can not use clustering
right?
BR,
Uri
Just in case anyone comes up with same issue - post solving the
directory/file ownership and repeating the import of db files - Siremis
came up as it should
Sorry for noise.
-----Original Message-----
From: Magnus
Sent: Tuesday, May 15, 2012 4:35 PM
To: sr-users(a)lists.sip-router.org
Subject: RE: Siremis install fail at last page of web install
"can't open cmp file to write "
in the httpd error log I get two lines
" mkdir(): No such file or directory in
/var/www/html/siremis-3.2.0/openbiz/bin/Resource.php on line 408"
and next line of
"fopen(/var/www/html/siremis-3.2.0/siremis/files/cache/metadata/CB3F6C48_log
Service.cmp): failed to open stream"
Hello all,
I have an issue with final stage of installing siremis - at the last screen
of the install I get an error in browser of "can't open cmp file to write"
in the httpd log I get two lines " mkdir(): No such file or directory in
/var/www/html/siremis-3.2.0/openbiz/bin/Resource.php on line 408"
and next line of
"fopen(/var/www/html/siremis-3.2.0/siremis/files/cache/metadata/CB3F6C48_log
Service.cmp): failed to open stream"
I have down a chown on the siremis dir to make the web process the owner,
and this allowed me to get to the last page of the install, all shows as
successful expect instead of a login page I get the error.
The server platform is centos if makes any difference.
Thanks
Magnus