[SR-Users] Plz help: MSILO on TLS + cert based client auth enabled server

2014-06-24 Thread Marc M .
Hi,
 
I have a SIP server with TLS + client certificate based authentication.
The server is listening for SIP(UDP) on port 5060, and for SIPS(TLS) on port 
5061)
The client certificate based authentication is enforced on port 5061. 
I would like to fire up MSILO and face now a strange problem:
 
At each REGISTER, the stored messages get dumped.
Dumped messages get sent to the clients from senders logged in over port 
5060(UDP) as SIP:xx...@xx.xx.xx.xx
 
however
 
Dumped messages are NOT sent to clients from senders logged in on port 
5061(TLS) as SIPS:x...@xx.xx.xx.xx
 
It looks like the messages get dumped so M-dump() is working, but they will 
never enter the route.
I would assume TLS is stopping the dumped messages to entering the route logic.
 
I would either 
1. somehow force m_dump() to pipe the messages over SIP(and not SIPS), or 
2. disable client auth for messages recieved from local ip
 
 
Can you help me how to proceed? What would be the correct approach?
Can you help me with either 1 or 2.
 
 You help is greatly appreciated!!!
 
Marc
  ___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Trigger m_dump() with REGISTER

2014-06-18 Thread Marc M .
Hi,
 
I have a basic MSILO setup up and running.
For the moment every time the client sends a REGISTER, m_dump() is called.
 
I would like to achieve the following:
 
The clients are registering with either 200 or 300 sec expiration time.
I would like to dump the messages only when the client is registering for 300 
secs. 
Only a REGISTER with an expiration time of 300 should trigger  m_dump().
Can you help me with this?
 
Any help or idea is appreciated.
 
thanks
 
Marc
 
  ___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] MSILO - dumped messages get duplicated

2014-06-18 Thread Marc M .
Hi,
 
Can anybody help me with these duplicate messages?
I guess the first message should be removed from the db, since it got a reply 
202.
Despite that, it end up again in the db.
Can you help me what I am doing wrong?
 
Many thanks
Marc
 
From: proy...@hotmail.com
To: sr-users@lists.sip-router.org
Date: Tue, 3 Jun 2014 21:38:32 +
Subject: [SR-Users] MSILO - dumped messages get duplicated




Hi,

I have a Kamailio 3.2 setup up and running. 
Recently I configured msilo for offline message store. Essentialy the setup 
runs fine. 

Messages to users without location info getting stored.
In case the user has location info, but cannot be reached, I made 
failover_route, so the messages getting stored in this case too.
Messages getting dumped at the next REGISTER.

However, I have a group of new mobile clients, with unstable connection.
It happens many times that they send a REGISTER, but the connection brakes 
afterwards.

It this case the message is getting dumped, but since it cannot be delivered, 
it runs on the failover_route which stores the message again.
However, the previous message is not removed from the db, so the same message 
is now twice in the db.
Next time the message either gets delivered in double, or in case of a new 
failure, it gets stored 2x2= four times.

I need to avoid this duplicates but still make sure the message get delivered 
sooner or later.
Any help is highly appreciated.

Here is my routing table:

thanks
Marc

### Routing Logic 


# Main SIP request routing logic
# - processing of any incoming SIP request starts with this route
route {

# per request initial checks
route(REQINIT);

# NAT detection
route(NAT);

# handle requests within SIP dialogs
route(WITHINDLG);

### only initial requests (no To tag)

# CANCEL processing
if (is_method(CANCEL))
{
if (t_check_trans())
t_relay();
exit;
}

if (is_method(MESSAGE))
{
 log(1,WE 
HAVE A NEW MESSAGE\n);
 route(MSILO_MESSAGE);
}

t_check_trans();

# authentication
route(AUTH);

# record routing for dialog forming requests (in case they are routed)
# - remove preloaded route headers
remove_hf(Route);
if (is_method(INVITE|SUBSCRIBE))
record_route();

# account only INVITEs
if (is_method(INVITE))
{
setflag(FLT_ACC); # do accounting
}

# dispatch requests to foreign domains
route(SIPOUT);

### requests for my local domains

# handle presence related requests
route(PRESENCE);

# handle registrations
route(REGISTRAR);

if ($rU==$null)
{
# request with no Username in RURI
sl_send_reply(484,Address Incomplete);
exit;
}

# dispatch destinations to PSTN
route(PSTN);

# user location service
route(LOCATION);

route(RELAY);
}


route[RELAY] {
#!ifdef WITH_NAT
if (check_route_param(nat=yes)) {
setbflag(FLB_NATB);
}
if (isflagset(FLT_NATS) || isbflagset(FLB_NATB)) {
route(RTPPROXY);
}
#!endif


/* example how to enable some additional event routes */
if (is_method(INVITE)) {
#t_on_branch(BRANCH_ONE);
t_on_reply(REPLY_ONE);
t_on_failure(FAIL_ONE);
}

if (!t_relay()) {
sl_reply_error();
}
exit;
}

##storing offline messages
route[MSILO_MESSAGE]{
if (lookup(location)){
t_on_failure(FAIL_MESSAGE);
t_relay();
xlog(L_NOTICE,-MI: ($mi), MB: 
($mb)\n);
}else{
xlog(L_NOTICE,--MESSAGE PROCESSING: location 
not found, storing offline message ID: ($ru)\n);
m_store($ru);
sl_send_reply(202, ACCEPTED);

xlog(L_NOTICE,--MESSAGE PROCESSING: location 
not found, stored offline message ID: ($ru)\n);
};
exit;
};

failure_route[FAIL_MESSAGE]{

xlog(L_NOTICE,--MESSAGE PROCESSING: user cannot be 
reached, storing offline message ID: ($ou)\n);
m_store($ou);
t_reply(202, ACCEPTED);
xlog(L_NOTICE,--MESSAGE PROCESSING: user cannot be 
reached, stored offline message ID: ($ou)\n);
exit;
}




# Per SIP request initial checks
route[REQINIT] {
#!ifdef WITH_ANTIFLOOD
# flood dection from same IP and traffic ban for a while
# be sure you exclude checking trusted peers, such as pstn gateways
# - local host excluded (e.g., loop to self)
if(src_ip!=myself)
{

Re: [SR-Users] MSILO - dumped messages get duplicated

2014-06-18 Thread Marc M .
Hi Daniel!
 
I applied now the source ip check and it is working!
 
Thanks a lot!
 
regards
 
Marc
 
From: proy...@hotmail.com
To: sr-users@lists.sip-router.org
Date: Tue, 3 Jun 2014 21:38:32 +
Subject: [SR-Users] MSILO - dumped messages get duplicated




Hi,

I have a Kamailio 3.2 setup up and running. 
Recently I configured msilo for offline message store. Essentialy the setup 
runs fine. 

Messages to users without location info getting stored.
In case the user has location info, but cannot be reached, I made 
failover_route, so the messages getting stored in this case too.
Messages getting dumped at the next REGISTER.

However, I have a group of new mobile clients, with unstable connection.
It happens many times that they send a REGISTER, but the connection brakes 
afterwards.

It this case the message is getting dumped, but since it cannot be delivered, 
it runs on the failover_route which stores the message again.
However, the previous message is not removed from the db, so the same message 
is now twice in the db.
Next time the message either gets delivered in double, or in case of a new 
failure, it gets stored 2x2= four times.

I need to avoid this duplicates but still make sure the message get delivered 
sooner or later.
Any help is highly appreciated.

Here is my routing table:

thanks
Marc



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users   
  ___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] MSILO - dumped messages get duplicated

2014-06-03 Thread Marc M .
Hi,

I have a Kamailio 3.2 setup up and running. 
Recently I configured msilo for offline message store. Essentialy the setup 
runs fine. 

Messages to users without location info getting stored.
In case the user has location info, but cannot be reached, I made 
failover_route, so the messages getting stored in this case too.
Messages getting dumped at the next REGISTER.

However, I have a group of new mobile clients, with unstable connection.
It happens many times that they send a REGISTER, but the connection brakes 
afterwards.

It this case the message is getting dumped, but since it cannot be delivered, 
it runs on the failover_route which stores the message again.
However, the previous message is not removed from the db, so the same message 
is now twice in the db.
Next time the message either gets delivered in double, or in case of a new 
failure, it gets stored 2x2= four times.

I need to avoid this duplicates but still make sure the message get delivered 
sooner or later.
Any help is highly appreciated.

Here is my routing table:

thanks
Marc

### Routing Logic 


# Main SIP request routing logic
# - processing of any incoming SIP request starts with this route
route {

# per request initial checks
route(REQINIT);

# NAT detection
route(NAT);

# handle requests within SIP dialogs
route(WITHINDLG);

### only initial requests (no To tag)

# CANCEL processing
if (is_method(CANCEL))
{
if (t_check_trans())
t_relay();
exit;
}

if (is_method(MESSAGE))
{
 log(1,WE 
HAVE A NEW MESSAGE\n);
 route(MSILO_MESSAGE);
}

t_check_trans();

# authentication
route(AUTH);

# record routing for dialog forming requests (in case they are routed)
# - remove preloaded route headers
remove_hf(Route);
if (is_method(INVITE|SUBSCRIBE))
record_route();

# account only INVITEs
if (is_method(INVITE))
{
setflag(FLT_ACC); # do accounting
}

# dispatch requests to foreign domains
route(SIPOUT);

### requests for my local domains

# handle presence related requests
route(PRESENCE);

# handle registrations
route(REGISTRAR);

if ($rU==$null)
{
# request with no Username in RURI
sl_send_reply(484,Address Incomplete);
exit;
}

# dispatch destinations to PSTN
route(PSTN);

# user location service
route(LOCATION);

route(RELAY);
}


route[RELAY] {
#!ifdef WITH_NAT
if (check_route_param(nat=yes)) {
setbflag(FLB_NATB);
}
if (isflagset(FLT_NATS) || isbflagset(FLB_NATB)) {
route(RTPPROXY);
}
#!endif


/* example how to enable some additional event routes */
if (is_method(INVITE)) {
#t_on_branch(BRANCH_ONE);
t_on_reply(REPLY_ONE);
t_on_failure(FAIL_ONE);
}

if (!t_relay()) {
sl_reply_error();
}
exit;
}

##storing offline messages
route[MSILO_MESSAGE]{
if (lookup(location)){
t_on_failure(FAIL_MESSAGE);
t_relay();
xlog(L_NOTICE,-MI: ($mi), MB: 
($mb)\n);
}else{
xlog(L_NOTICE,--MESSAGE PROCESSING: location 
not found, storing offline message ID: ($ru)\n);
m_store($ru);
sl_send_reply(202, ACCEPTED);

xlog(L_NOTICE,--MESSAGE PROCESSING: location 
not found, stored offline message ID: ($ru)\n);
};
exit;
};

failure_route[FAIL_MESSAGE]{

xlog(L_NOTICE,--MESSAGE PROCESSING: user cannot be 
reached, storing offline message ID: ($ou)\n);
m_store($ou);
t_reply(202, ACCEPTED);
xlog(L_NOTICE,--MESSAGE PROCESSING: user cannot be 
reached, stored offline message ID: ($ou)\n);
exit;
}




# Per SIP request initial checks
route[REQINIT] {
#!ifdef WITH_ANTIFLOOD
# flood dection from same IP and traffic ban for a while
# be sure you exclude checking trusted peers, such as pstn gateways
# - local host excluded (e.g., loop to self)
if(src_ip!=myself)
{
if($sht(ipban=$si)!=$null)
{
# ip is already blocked
xdbg(request from blocked IP - $rm from $fu 
(IP:$si:$sp)\n);
exit;
}
if (!pike_check_req())
{
xlog(L_ALERT,ALERT: pike blocking $rm from $fu 
(IP:$si:$sp)\n);

[SR-Users] MSILO: remove Offline message prefix

2013-11-12 Thread Marc M .
Hi!
I have an up and running msilo config with kamailio 4.0.4.
However, all the queued messages are delivered with a prefix [Offline message 
- (date)(time)].
Non queued messages are delivered unchanged.  
Is there a way I can remove this prefix, so also queued messages get delivered 
unchanged?
Please advise!
Any help is appreciated!
Thanks you,
Marc
  ___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Limit the nr. of transaction retries

2013-11-03 Thread Marc M .
Hi!
 
I Have a questions concerning t_realy() and failure route.
 
If the t_realy() is not successful, it makes 12 re-tries before failure route 
is called. 
Can you help me, how can I lower the number of retries before move to failure 
route?
 
My goal is to make 3 re-tries and then call failure route.
(I gues it is  a tm param?)
 
Thansk you for your help in advance!
 
regards
Marc
 
  ___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Msilo: remove messages from db immediately after successful delivery

2013-11-03 Thread Marc M .
Hi!
 
I have a running msilo config. However, messages remain in the db after after 
successful delivery, and get removed at the next clean period.
Unfortunatelly, this makes support cases dificult, as we do not see from the db 
which messages are delivered and which are not.
 
My goal is is either:
 
Remove the message from the db immediately after successful delivery (preferred)
and/or
be able to see the individual message delivery status.
 
Can you help me, how should I proceed?
 
Many thanks in advance!
 
Marc
 
  ___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] TLS: support TLS v1.2 ?

2013-11-03 Thread Marc M .
Hi!
 
I have question concerning TLS module. I would like to enable TLS 1.2 protocol.
As I understand the TLS module is compiled with openssl, which as far as i know 
has TLS 1.2 support since openssl 1.0.1.
 
I am wondering if there is way to enable TLS 1.2 on the TLS module?
 
Many thanks
 
Marc
  ___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users