Re: [SR-Users] Recommended configuration for TCP support

2015-05-08 Thread Mickael Marrache
What would happen in this case? If I understand correctly, the proxy will
always forward the request but the last hop (before the UAS) will forward
the request only if a connection is active?

 

If the last hop doesn't forward the request because no TCP connection
exists, what happens? How the proxy will detect this situation?

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Vitaliy Aleksandrov
Sent: Friday, May 08, 2015 4:06 PM
To: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] Recommended configuration for TCP support

 

Hi, 

I suppose calling set_forward_no_connect() at the LB for a request from the
registrar to a user will lead to the result. LB won't try to make an
outgoing tcp/tls connection to reach a requested destination and will only
forward a request only via existing one.

BR



Thanks for your explanation, the problem is that the actual lookup is done
by a proxy which is located after our load balancer. Therefore, the TCP
connection with the UA should not be visible by the proxy but by the load
balancer.

 

How does that work in such case?

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Vitaliy Aleksandrov
Sent: Wednesday, May 06, 2015 10:34 AM
To: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] Recommended configuration for TCP support

 

set_forward_no_connect() called after lookup() prevents kamailio from making
a new connection to a phone if there is no active connection. 
This is useful when you are trying to call to a UA which kamailio still
keeps registration record for, but TCP/TLS connect to this phone is already
gone (due to timeout, network problem, etc...).

On 05/05/15 14:54, Mickael Marrache wrote:

In general, it happens in our network (as more and more Via headers are
added).

 

Sorry, I didn't understand your last sentence. What do you mean by not
connect if there is no active connection after location lookup?

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Monday, May 04, 2015 11:07 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Recommended configuration for TCP support

 

Hello,

where are typically those issues with truncated SDP? On the phones?

If you use tcp and have phones behind the nat, it is recommended to not
connect if there is no active connection after location lookup -- see core
functions for tcp.

Cheers,
Daniel

On 04/05/15 13:54, Mickael Marrache wrote:

Hi,

 

We sometimes get issues caused by truncated SDP bodies. Therefore, we are
looking at using TCP instead of UDP.

 

What is the recommended configuration when TCP is used?

 

Currently, I only have the following:

 

children=16

listen=udp:ip:5060

listen=tcp:ip:5060

disable_tcp=no

tcp_connection_lifetime=605 (registration expiry is 600)

 

Also, is there a difference with UDP regarding NAT handling?

 

Thanks,

Mickael








___
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







-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda http://twitter.com/#%21/miconda  -
http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com







___
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

 

___
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] db_mongodb get columns error

2015-05-07 Thread Mickael Marrache
Hi,

 

Sorry not to have answered before, I just did a restart and there was no
error.

 

We don't restart often so I can't tell you how often this issue appears but
I will keep an eye on it.

 

It may be a bug in the insert or update code in db_mongodb that misses the
caller_sock column but I'm not sure.

 

Is it possible a dialog is inserted without caller_sock field? Or, is it
possible $unset is used somewhere for the caller_sock?

 

Mickael

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Thursday, May 07, 2015 10:23 AM
To: Kamailio (SER) - Users Mailing List; Mickael Marrache
Subject: Re: [SR-Users] db_mongodb get columns error

 

Hello,

On 27/04/15 23:46, Daniel-Constantin Mierla wrote:

Hello,

On 22/04/15 14:00, Mickael Marrache wrote:

Hi,

 

After restarting Kamailio, I got the following errors during the startup:

 

kamailio[12614]: ERROR: db_mongodb [mongodb_dbase.c:381]:
db_mongodb_get_columns(): field [caller_sock] not found in result iterator

kamailio[12614]: ERROR: db_mongodb [mongodb_dbase.c:739]:
db_mongodb_store_result(): failed to set the columns

kamailio[12614]: ERROR: db_mongodb [mongodb_dbase.c:918]:
db_mongodb_query(): failed to store result

kamailio[12614]: ERROR: db_mongodb [mongodb_dbase.c:927]:
db_mongodb_query(): failed to do the query

kamailio[12614]: ERROR: dialog [dlg_db_handler.c:257]:
select_entire_dialog_table(): Error while querying database

 

What may be causing the issue? I should always have a caller_sock in every
dialog document.

 

the error is thrown when the caller_sock field is not found in the b/json
document returned by mongodb.

Do you get the error every time you restart?

Any update on this? As I am spending some time with testing for 4.3, I would
like to close this issue if there is something to fix.

Cheers,
Daniel



-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
___
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] TCP connection reset by peer

2015-05-07 Thread Mickael Marrache
Hi,

 

I sometimes see the following in the logs:

 

kamailio[14433]: ERROR: core [tcp_read.c:271]: tcp_read_data(): error
reading: Connection reset by peer (104)

kamailio[14433]: ERROR: core [tcp_read.c:1296]: tcp_read_req(): ERROR:
tcp_read_req: error reading

 

It looks like Kamailio tries to read a request from a TCP socket but the
connection has been reset (not properly ended) by the remote peer.

 

Is it an error? Does it prevent Kamailio from working properly? If yes, what
is the solution?

 

Thanks,

Mickael

___
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] Recommended configuration for TCP support

2015-05-07 Thread Mickael Marrache
Thanks for your explanation, the problem is that the actual lookup is done
by a proxy which is located after our load balancer. Therefore, the TCP
connection with the UA should not be visible by the proxy but by the load
balancer.

 

How does that work in such case?

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Vitaliy Aleksandrov
Sent: Wednesday, May 06, 2015 10:34 AM
To: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] Recommended configuration for TCP support

 

set_forward_no_connect() called after lookup() prevents kamailio from making
a new connection to a phone if there is no active connection. 
This is useful when you are trying to call to a UA which kamailio still
keeps registration record for, but TCP/TLS connect to this phone is already
gone (due to timeout, network problem, etc...).

On 05/05/15 14:54, Mickael Marrache wrote:

In general, it happens in our network (as more and more Via headers are
added).

 

Sorry, I didn't understand your last sentence. What do you mean by not
connect if there is no active connection after location lookup?

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Monday, May 04, 2015 11:07 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Recommended configuration for TCP support

 

Hello,

where are typically those issues with truncated SDP? On the phones?

If you use tcp and have phones behind the nat, it is recommended to not
connect if there is no active connection after location lookup -- see core
functions for tcp.

Cheers,
Daniel

On 04/05/15 13:54, Mickael Marrache wrote:

Hi,

 

We sometimes get issues caused by truncated SDP bodies. Therefore, we are
looking at using TCP instead of UDP.

 

What is the recommended configuration when TCP is used?

 

Currently, I only have the following:

 

children=16

listen=udp:ip:5060

listen=tcp:ip:5060

disable_tcp=no

tcp_connection_lifetime=605 (registration expiry is 600)

 

Also, is there a difference with UDP regarding NAT handling?

 

Thanks,

Mickael







___
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






-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda http://twitter.com/#%21/miconda  -
http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com






___
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


Re: [SR-Users] Recommended configuration for TCP support

2015-05-05 Thread Mickael Marrache
In general, it happens in our network (as more and more Via headers are
added).

 

Sorry, I didn't understand your last sentence. What do you mean by not
connect if there is no active connection after location lookup?

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Monday, May 04, 2015 11:07 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Recommended configuration for TCP support

 

Hello,

where are typically those issues with truncated SDP? On the phones?

If you use tcp and have phones behind the nat, it is recommended to not
connect if there is no active connection after location lookup -- see core
functions for tcp.

Cheers,
Daniel

On 04/05/15 13:54, Mickael Marrache wrote:

Hi,

 

We sometimes get issues caused by truncated SDP bodies. Therefore, we are
looking at using TCP instead of UDP.

 

What is the recommended configuration when TCP is used?

 

Currently, I only have the following:

 

children=16

listen=udp:ip:5060

listen=tcp:ip:5060

disable_tcp=no

tcp_connection_lifetime=605 (registration expiry is 600)

 

Also, is there a difference with UDP regarding NAT handling?

 

Thanks,

Mickael






___
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





-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
___
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] Double record routes

2015-05-05 Thread Mickael Marrache
Here, there are 2 interfaces but only the VIP should be used. Also, the INVITE 
exits the same interface it entered (i.e. the VIP) but exits with a different 
source port (because of the TCP connection).

 

I tried disabling double RR, I only see the VIP record route now, however I 
still see the top Via with the non-VIP interface although the INVITE is 
forwarded to the proxy using the VIP interface.

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Alex 
Balashov
Sent: Tuesday, May 05, 2015 3:31 PM
To: Mickael Marrache; sr-users@lists.sip-router.org
Subject: Re: [SR-Users] Double record routes

 

That is normal behaviour if double RR is enabled in the RR module; two 
Record-Routes will be added if Kamailio is multihomed and the invite exits a 
different interface to the one it entered.

 

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

Sent from my BlackBerry.


From: Mickael Marrache

Sent: Tuesday, May 5, 2015 08:27

To: sr-users@lists.sip-router.org

Reply To: Kamailio (SER) - Users Mailing List

Subject: [SR-Users] Double record routes

 

Hi,

 

We are adding TCP support to our load balancer and for some reason it adds two 
record route headers.

 

The instance have two IP addresses on which it binds: one if the VIP address 
and the second is the non-VIP address.

 

I explicitly set the tcp_source_ipv4 parameter with the VIP address so that it 
is used as source address for outbound TCP connection.

 

So, we get the following INVITE going from the load balancer to a proxy:

 

T 2015/05/05 12:08:49.715822 VIP:54667 - PROXY:5060 [AP]

INVITE sip:1...@mycompany.com SIP/2.0.

Record-Route: sip:NONVIP;transport=tcp;r2=on;lr.

Record-Route: sip:VIP;transport=tcp;r2=on;lr.

Via: SIP/2.0/TCP 
NONVIP;branch=z9hG4bK6f4.688efa90a17e02181ef7a11fecf8bb72.0;i=3.

Via: SIP/2.0/TCP 
1.1.1.1:4598;received=2.2.2.2;branch=z9hG4bKmqFaCxNo6m3f5LW4;rport=40020.

 

You can see the INVITE is sent from the VIP address (as specified using the 
tcp_source_ipv4 parameter). However, the added Via corresponds to the non-VIP 
address. Also, you can see the two record route headers added for both 
addresses.

 

Any idea?

 

Thanks,

Mickael





___
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] Double record routes

2015-05-05 Thread Mickael Marrache
Hi,

 

We are adding TCP support to our load balancer and for some reason it adds
two record route headers.

 

The instance have two IP addresses on which it binds: one if the VIP address
and the second is the non-VIP address.

 

I explicitly set the tcp_source_ipv4 parameter with the VIP address so that
it is used as source address for outbound TCP connection.

 

So, we get the following INVITE going from the load balancer to a proxy:

 

T 2015/05/05 12:08:49.715822 VIP:54667 - PROXY:5060 [AP]

INVITE sip:1...@mycompany.com SIP/2.0.

Record-Route: sip:NONVIP;transport=tcp;r2=on;lr.

Record-Route: sip:VIP;transport=tcp;r2=on;lr.

Via: SIP/2.0/TCP
NONVIP;branch=z9hG4bK6f4.688efa90a17e02181ef7a11fecf8bb72.0;i=3.

Via: SIP/2.0/TCP
1.1.1.1:4598;received=2.2.2.2;branch=z9hG4bKmqFaCxNo6m3f5LW4;rport=40020.

 

You can see the INVITE is sent from the VIP address (as specified using the
tcp_source_ipv4 parameter). However, the added Via corresponds to the
non-VIP address. Also, you can see the two record route headers added for
both addresses.

 

Any idea?

 

Thanks,

Mickael

___
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] Double record routes

2015-05-05 Thread Mickael Marrache
Hi,

 

After making some tests, I found that if I configure the VIP interface
before the non-VIP one, all works fine.

 

listen=tcp:VIP:5060

listen=tcp:nonVIP:5060

 

Double RR is still enabled but only one RR header is added (with the VIP
interface). Also, only one Via header is added (with the VIP interface). The
incoming INVITE is forwarded using a random source port, not 5060. I assume
it is the source port used to establish the TCP connection with the proxy
(next hop from the load balancer). However, this port doesn't appear in the
inserted RR and Via headers - don't know why.

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Tuesday, May 05, 2015 10:13 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Double record routes

 

Hello,

do you have mhomed enabled? Are there routes from both IP addresses to the
destination?

IIRC, not that long ago I pointed to some article about linux not ensuring
what would be the local ip used for tcp connections when many interfaces are
having routes to destination. I couldn't find it quickly now, though.

What you can try is to force advertised address with:

listen=tcp:1.2.3.4:5060 advertise 1.2.3.4:5060

Cheers,
Daniel

On 05/05/15 15:02, Mickael Marrache wrote:

Here, there are 2 interfaces but only the VIP should be used. Also, the
INVITE exits the same interface it entered (i.e. the VIP) but exits with a
different source port (because of the TCP connection).

 

I tried disabling double RR, I only see the VIP record route now, however I
still see the top Via with the non-VIP interface although the INVITE is
forwarded to the proxy using the VIP interface.

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Alex Balashov
Sent: Tuesday, May 05, 2015 3:31 PM
To: Mickael Marrache; sr-users@lists.sip-router.org
Subject: Re: [SR-Users] Double record routes

 

That is normal behaviour if double RR is enabled in the RR module; two
Record-Routes will be added if Kamailio is multihomed and the invite exits a
different interface to the one it entered.

 

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

Sent from my BlackBerry.


From: Mickael Marrache

Sent: Tuesday, May 5, 2015 08:27

To: sr-users@lists.sip-router.org

Reply To: Kamailio (SER) - Users Mailing List

Subject: [SR-Users] Double record routes

 

Hi,

 

We are adding TCP support to our load balancer and for some reason it adds
two record route headers.

 

The instance have two IP addresses on which it binds: one if the VIP address
and the second is the non-VIP address.

 

I explicitly set the tcp_source_ipv4 parameter with the VIP address so that
it is used as source address for outbound TCP connection.

 

So, we get the following INVITE going from the load balancer to a proxy:

 

T 2015/05/05 12:08:49.715822 VIP:54667 - PROXY:5060 [AP]

INVITE sip:1...@mycompany.com SIP/2.0.

Record-Route: sip:NONVIP;transport=tcp;r2=on;lr.

Record-Route: sip:VIP;transport=tcp;r2=on;lr.

Via: SIP/2.0/TCP
NONVIP;branch=z9hG4bK6f4.688efa90a17e02181ef7a11fecf8bb72.0;i=3.

Via: SIP/2.0/TCP
1.1.1.1:4598;received=2.2.2.2;branch=z9hG4bKmqFaCxNo6m3f5LW4;rport=40020.

 

You can see the INVITE is sent from the VIP address (as specified using the
tcp_source_ipv4 parameter). However, the added Via corresponds to the
non-VIP address. Also, you can see the two record route headers added for
both addresses.

 

Any idea?

 

Thanks,

Mickael











___
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





-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
___
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] Recommended configuration for TCP support

2015-05-04 Thread Mickael Marrache
Hi,

 

We sometimes get issues caused by truncated SDP bodies. Therefore, we are
looking at using TCP instead of UDP.

 

What is the recommended configuration when TCP is used?

 

Currently, I only have the following:

 

children=16

listen=udp:ip:5060

listen=tcp:ip:5060

disable_tcp=no

tcp_connection_lifetime=605 (registration expiry is 600)

 

Also, is there a difference with UDP regarding NAT handling?

 

Thanks,

Mickael

___
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] Possible bug in TM module

2015-04-22 Thread Mickael Marrache
Hi,

 

For now, I got it only once, I will keep an eye on it.

 

Thanks,

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Wednesday, April 22, 2015 12:37 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Possible bug in TM module

 

Hello,

On 22/04/15 11:26, Mickael Marrache wrote:

Hi,

 

I just got the following issue when stopping kamailio.

 

kamailio[7279]: NOTICE: core [main.c:682]: handle_sigs(): Thank you for
flying kamailio!!!

kamailio[7279]: ERROR: ctl [ctl.c:369]: mod_destroy(): ERROR: ctl: could not
delete unix socket /tmp/kamailio_ctl: Operation not permitted (1)

kamailio[7279]: : core [mem/f_malloc.c:586]: fm_free(): BUG: fm_free: bad
pointer 0x4f2dec62 (out of memory block!), called from tm:
h_table.c: free_cell(138) - aborting

 

I always get the first ERROR when I stop kamailio, I need to look at the
permissions. However, the next one is a bug.


the first one should be fixed with the new release. With old versions, ctl
module doesn't inherits the user/group set by the core, you would have to
set it in the ctl module via params.

The second can happen in very rare cases -- if there was a transaction in
the process of freeing, then signal interrupted it. Parts of the transaction
structure that were freed could have been allocated already and value
overwritten. But the transaction itself was not removed from the list, so
the main process will attempt a cleanup at shutdown, ending in some invalid
pointer data.

If you get it every time, then is likely a bug. If you get it very rare,
then it can be the above case.

Perhaps we can add a flag saying it is shutdown where to be more flexible in
handling these situations.

Cheers,
Daniel



-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
___
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] Possible bug in TM module

2015-04-22 Thread Mickael Marrache
Hi,

 

I just got the following issue when stopping kamailio.

 

kamailio[7279]: NOTICE: core [main.c:682]: handle_sigs(): Thank you for
flying kamailio!!!

kamailio[7279]: ERROR: ctl [ctl.c:369]: mod_destroy(): ERROR: ctl: could not
delete unix socket /tmp/kamailio_ctl: Operation not permitted (1)

kamailio[7279]: : core [mem/f_malloc.c:586]: fm_free(): BUG: fm_free: bad
pointer 0x4f2dec62 (out of memory block!), called from tm:
h_table.c: free_cell(138) - aborting

 

I always get the first ERROR when I stop kamailio, I need to look at the
permissions. However, the next one is a bug.

 

Thanks,

Mickael

___
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] db_mongodb get columns error

2015-04-22 Thread Mickael Marrache
Hi,

 

After restarting Kamailio, I got the following errors during the startup:

 

kamailio[12614]: ERROR: db_mongodb [mongodb_dbase.c:381]:
db_mongodb_get_columns(): field [caller_sock] not found in result iterator

kamailio[12614]: ERROR: db_mongodb [mongodb_dbase.c:739]:
db_mongodb_store_result(): failed to set the columns

kamailio[12614]: ERROR: db_mongodb [mongodb_dbase.c:918]:
db_mongodb_query(): failed to store result

kamailio[12614]: ERROR: db_mongodb [mongodb_dbase.c:927]:
db_mongodb_query(): failed to do the query

kamailio[12614]: ERROR: dialog [dlg_db_handler.c:257]:
select_entire_dialog_table(): Error while querying database

 

What may be causing the issue? I should always have a caller_sock in every
dialog document.

 

Thanks,

Mickael

___
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] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-20 Thread Mickael Marrache
Hi,

IIR means If I Remember.

Are you also using keepalives sent by clients? I often read that NATs don't 
refresh their mapping on incoming traffic, you may want to take a look at 
client keepalives.

Mickael

 On 21 באפר 2015, at 07:38, xuefeng zhang zhangxuefeng1...@gmail.com wrote:
 
 Hi Daniel,
 
 I understand your reply.The kamailio can set the IIR to send the OPTIONS 
 packets period.
 But I don't found out the knowledge of the IIR.
 
 Would you give me some things how to do it.
 
 Thanks!
 
 Xuefeng Zhang
 
 2015-04-20 18:10 GMT+08:00 Daniel-Constantin Mierla mico...@gmail.com:
 IIR, the keepalives are sent stateless, so no transactions are create
 for them. Just OPTIONS packets sent out, resulting in less load on
 kamailio (well, comparing with normal transactional forwarding). The
 mechanism behind detecting offline users with keepalives is based on a
 counter kept in memory for the location record, which is reset if the
 reply to OPTIONS comes back. If there are three (or so) keepalives sent
 out and none was replied, then the record is removed. Practically there
 is no retransmission for those keepalive requests, no special states,
 just this counter in memory per location record. Given this, (again
 iirc), this feature doesn't work with db_mode set to database only.
 
 Cheers,
 Daniel
 
 On 20/04/15 10:46, Mickael Marrache wrote:
  Didn't know about that, it's interesting.
 
  I'm curious about the load impact of this feature, since keepalives are
  generally sent every 30 sec.
 
  -Original Message-
  From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
  Daniel Grotti
  Sent: Monday, April 20, 2015 11:40 AM
  To: sr-users@lists.sip-router.org
  Subject: Re: [SR-Users] Expect the kamailio's sip account is unregistered
  state when the client app is shutdown
 
  Hi,
  you may want to use:
 
  http://www.kamailio.org/docs/modules/4.2.x/modules/nathelper.html#nathelper.
  p.keepalive_timeout
 
 
  --
  Daniel Grotti
  VoIP Engineer
 
 
  Sipwise GmbH
  Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com
 
  On 04/20/2015 10:34 AM, Filip Malenka wrote:
  Thank you for information..
  What can Kamailio do about clients, that exit abnormally (e.g. crash, turn
  off, ..) which do unregister properly? Can Kamailio send this expire=0 on
  behalf of these clients?
  Can Kamailio determine that a client got offline based on e.g. TLS
  connection or other heartbeats?
  On 20.04.2015 10:16, Daniel Grotti wrote:
  Hi,
  here you are:
 
  https://tools.ietf.org/html/rfc3665#section-2.4
 
 
 
  --
  Daniel Grotti
  VoIP Engineer
 
 
  Sipwise GmbH
  Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com
 
  On 04/20/2015 10:10 AM, Mickael Marrache wrote:
  Hi,
 
 
 
  You need to configure your client to un register when the app is closed.
 
 
 
  For that, your client must send a REGISTER with Expires: 0.
 
 
 
  Mickael
 
 
 
  *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
  Behalf Of *xuefeng zhang
  *Sent:* Monday, April 20, 2015 10:58 AM
  *To:* Daniel-Constantin Mierla; Kamailio (SER) - Users Mailing List
  *Subject:* [SR-Users] Expect the kamailio's sip account is
  unregistered state when the client app is shutdown
 
 
 
  Hi Daniel,
 
 
 
  When the client's app is closed,the sip account may be registered
  state,because the expired time may have some rest time.I want to
  implement when the client's app is closed,the account also unregister.
 
 
 
  How can I implement this function?Would you give me some advices?
 
 
 
  Thanks!
 
 
 
  Xuefeng Zhang
 
 
 
  ___
  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
 
 
  ___
  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
 
 
  ___
  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
 
 --
 Daniel-Constantin Mierla
 http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
 Kamailio World Conference, May 27-29, 2015
 Berlin, Germany - http://www.kamailioworld.com
 
 
 ___
 SIP Express Router (SER

Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-20 Thread Mickael Marrache
Hi,

 

You need to configure your client to un register when the app is closed.

 

For that, your client must send a REGISTER with Expires: 0.

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
xuefeng zhang
Sent: Monday, April 20, 2015 10:58 AM
To: Daniel-Constantin Mierla; Kamailio (SER) - Users Mailing List
Subject: [SR-Users] Expect the kamailio's sip account is unregistered state 
when the client app is shutdown

 

Hi Daniel,

 

When the client's app is closed,the sip account may be registered state,because 
the expired time may have some rest time.I want to implement when the client's 
app is closed,the account also unregister.

 

How can I implement this function?Would you give me some advices?

 

Thanks!

 

Xuefeng Zhang

___
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] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-20 Thread Mickael Marrache
No, it is not possible.

However, it's not really an issue since sending an INVITE to the invalid
location will result on a timeout which you can keep short (see the
fr_timer) and then you can catch the timeout and behave as if there was no
active registration.

-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Filip Malenka
Sent: Monday, April 20, 2015 11:34 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Expect the kamailio's sip account is unregistered
state when the client app is shutdown

Thank you for information..
What can Kamailio do about clients, that exit abnormally (e.g. crash, turn
off, ..) which do unregister properly? Can Kamailio send this expire=0 on
behalf of these clients?
Can Kamailio determine that a client got offline based on e.g. TLS
connection or other heartbeats?
On 20.04.2015 10:16, Daniel Grotti wrote:
 Hi,
 here you are:

 https://tools.ietf.org/html/rfc3665#section-2.4



 --
 Daniel Grotti
 VoIP Engineer


 Sipwise GmbH
 Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com

 On 04/20/2015 10:10 AM, Mickael Marrache wrote:
  Hi,
 
   
 
  You need to configure your client to un register when the app is closed.
 
   
 
  For that, your client must send a REGISTER with Expires: 0.
 
   
 
  Mickael
 
   
 
  *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On 
  Behalf Of *xuefeng zhang
  *Sent:* Monday, April 20, 2015 10:58 AM
  *To:* Daniel-Constantin Mierla; Kamailio (SER) - Users Mailing List
  *Subject:* [SR-Users] Expect the kamailio's sip account is 
  unregistered state when the client app is shutdown
 
   
 
  Hi Daniel,
 
   
 
  When the client's app is closed,the sip account may be registered 
  state,because the expired time may have some rest time.I want to 
  implement when the client's app is closed,the account also unregister.
 
   
 
  How can I implement this function?Would you give me some advices?
 
   
 
  Thanks!
 
   
 
  Xuefeng Zhang
 
 
 
  ___
  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



___
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


Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-20 Thread Mickael Marrache
Didn't know about that, it's interesting.

I'm curious about the load impact of this feature, since keepalives are
generally sent every 30 sec. 

-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel Grotti
Sent: Monday, April 20, 2015 11:40 AM
To: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] Expect the kamailio's sip account is unregistered
state when the client app is shutdown

Hi,
you may want to use:

http://www.kamailio.org/docs/modules/4.2.x/modules/nathelper.html#nathelper.
p.keepalive_timeout


--
Daniel Grotti
VoIP Engineer


Sipwise GmbH
Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com

On 04/20/2015 10:34 AM, Filip Malenka wrote:
 Thank you for information..
 What can Kamailio do about clients, that exit abnormally (e.g. crash, turn
off, ..) which do unregister properly? Can Kamailio send this expire=0 on
behalf of these clients?
 Can Kamailio determine that a client got offline based on e.g. TLS
connection or other heartbeats?
 On 20.04.2015 10:16, Daniel Grotti wrote:
 Hi,
 here you are:

 https://tools.ietf.org/html/rfc3665#section-2.4



 --
 Daniel Grotti
 VoIP Engineer


 Sipwise GmbH
 Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com

 On 04/20/2015 10:10 AM, Mickael Marrache wrote:
 Hi,

  

 You need to configure your client to un register when the app is closed.

  

 For that, your client must send a REGISTER with Expires: 0.

  

 Mickael

  

 *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On 
 Behalf Of *xuefeng zhang
 *Sent:* Monday, April 20, 2015 10:58 AM
 *To:* Daniel-Constantin Mierla; Kamailio (SER) - Users Mailing List
 *Subject:* [SR-Users] Expect the kamailio's sip account is 
 unregistered state when the client app is shutdown

  

 Hi Daniel,

  

 When the client's app is closed,the sip account may be registered 
 state,because the expired time may have some rest time.I want to 
 implement when the client's app is closed,the account also unregister.

  

 How can I implement this function?Would you give me some advices?

  

 Thanks!

  

 Xuefeng Zhang



 ___
 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

 
 
 ___
 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


___
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] Kamailio load statistics

2015-04-16 Thread Mickael Marrache
Hi,

 

What are the statistics that should be used to monitor a Kamailio instance?

 

I currently looked at shmem_real_used_size, shmem_used_size,
dialogs_active_dialogs. However, I'm looking for other statistics that
represent the load on the instance.

 

Thanks,

Mickael

___
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] Inconsistent dlg timer data warning at dialog timeout

2015-04-15 Thread Mickael Marrache
Hi,

 

I get the following warning when a dialog timeout occurs:

 

kamailio[18889]: WARNING: dialog [dlg_req_within.c:214]: bye_reply_cb():
inconsitent dlg timer data on dlg 0x7f422986e448 [3547:6673] with clid
'mycvJWgmbmOSD5XQrcStKAKoTfW12XeR' and tags
'C5mlsaZCdTmybNSYgvWr75MBxWa5hVyA' 'L1ZzszpZ1MYO6qlQQ3FYYRWQYtF4F75r'

 

Am I doing something wrong?

 

Thanks,

Mickael

___
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] Inconsistent dlg timer data warning at dialog timeout

2015-04-15 Thread Mickael Marrache
Ok I understand, the warning is generated in bye_reply_cb() which I guess is
called when the 200 is received for the BYE, and in this case, there are two
200 (one for each BYE).

 

The function send_bye() [dlg_req_within.c:325] is called twice: once for the
caller and another time for the callee. I also see the bye_reply_cb callback
is registered for each BYE sent, therefore this callback is called twice.

 

Therefore, I conclude this warning will appear every time a dialog timeout
occurs?

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Wednesday, April 15, 2015 4:49 PM
To: Mickael Marrache; 'Kamailio (SER) - Users Mailing List'
Subject: Re: [SR-Users] Inconsistent dlg timer data warning at dialog
timeout

 

 

On 15/04/15 15:42, Mickael Marrache wrote:

It looks like it is a real issue since CDRs are not generated on dialog
timeout.

 

If the dialog is not in the timer list, does that mean the DLGCB_EXPIRED
callbacks are not called?

The log message is not related. It pure about trying to see if the dialog is
still in the timer list and remove it, failing because it was already
removed -- it will not get to that state if it was not in the timer already.

Daniel




 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Wednesday, April 15, 2015 3:22 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Inconsistent dlg timer data warning at dialog
timeout

 

Hello,

On 15/04/15 14:04, Mickael Marrache wrote:

Hi,

 

I get the following warning when a dialog timeout occurs:

 

kamailio[18889]: WARNING: dialog [dlg_req_within.c:214]: bye_reply_cb():
inconsitent dlg timer data on dlg 0x7f422986e448 [3547:6673] with clid
'mycvJWgmbmOSD5XQrcStKAKoTfW12XeR' and tags
'C5mlsaZCdTmybNSYgvWr75MBxWa5hVyA' 'L1ZzszpZ1MYO6qlQQ3FYYRWQYtF4F75r'

 

Am I doing something wrong?

do you get it always when a dialog times out?

The warning is for the case when the dialog is no longer on timer list,
which can happen when there are two BYEs crossing through. The situation is
harmless, perhaps the log message has to be done as info not warning.

Cheers,
Daniel




-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda http://twitter.com/#%21/miconda  -
http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com





-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
___
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] No CDR is written when dialog timeouts

2015-04-15 Thread Mickael Marrache
I also confirm the cdr_on_create() [acc_cdr.c:718] function is called since
I can see the debug statement dialog '%p' created!.

 

From: Mickael Marrache [mailto:mickaelmarra...@gmail.com] 
Sent: Wednesday, April 15, 2015 3:48 PM
To: sr-users@lists.sip-router.org
Subject: No CDR is written when dialog timeouts

 

Hi,

 

I'm testing the dialog timeout scenario and I see that no CDR is written.

 

This is my configuration:

 

modparam(acc, cdr_enable, 1)

modparam(acc, cdr_expired_dlg_enable, 1)

modparam(acc, cdr_start_on_confirmed, 1)

modparam(acc, cdr_log_enable, 0)

modparam(acc, cdr_on_failed, 0)

 

I can confirm the cdr_on_expired() [acc_cdr.c:684] function is not called
since I don't see the debug statement dialog '%p' expired!\n.

 

(I precise that CDR generation works fine for regular hangup scenario.)

 

Any idea what can cause the issue?

 

Thanks,

Mickael 

___
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] Inconsistent dlg timer data warning at dialog timeout

2015-04-15 Thread Mickael Marrache
Also, I get this warning without two BYEs crossing since the BYEs are
generated by Kamailio and sent to the caller and callee.

 

From: Mickael Marrache [mailto:mickaelmarra...@gmail.com] 
Sent: Wednesday, April 15, 2015 4:43 PM
To: 'mico...@gmail.com'; 'Kamailio (SER) - Users Mailing List'
Subject: RE: [SR-Users] Inconsistent dlg timer data warning at dialog
timeout

 

It looks like it is a real issue since CDRs are not generated on dialog
timeout.

 

If the dialog is not in the timer list, does that mean the DLGCB_EXPIRED
callbacks are not called?

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Wednesday, April 15, 2015 3:22 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Inconsistent dlg timer data warning at dialog
timeout

 

Hello,

On 15/04/15 14:04, Mickael Marrache wrote:

Hi,

 

I get the following warning when a dialog timeout occurs:

 

kamailio[18889]: WARNING: dialog [dlg_req_within.c:214]: bye_reply_cb():
inconsitent dlg timer data on dlg 0x7f422986e448 [3547:6673] with clid
'mycvJWgmbmOSD5XQrcStKAKoTfW12XeR' and tags
'C5mlsaZCdTmybNSYgvWr75MBxWa5hVyA' 'L1ZzszpZ1MYO6qlQQ3FYYRWQYtF4F75r'

 

Am I doing something wrong?

do you get it always when a dialog times out?

The warning is for the case when the dialog is no longer on timer list,
which can happen when there are two BYEs crossing through. The situation is
harmless, perhaps the log message has to be done as info not warning.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
___
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] No CDR is written when dialog timeouts

2015-04-15 Thread Mickael Marrache
Hi,

 

I'm testing the dialog timeout scenario and I see that no CDR is written.

 

This is my configuration:

 

modparam(acc, cdr_enable, 1)

modparam(acc, cdr_expired_dlg_enable, 1)

modparam(acc, cdr_start_on_confirmed, 1)

modparam(acc, cdr_log_enable, 0)

modparam(acc, cdr_on_failed, 0)

 

I can confirm the cdr_on_expired() [acc_cdr.c:684] function is not called
since I don't see the debug statement dialog '%p' expired!\n.

 

(I precise that CDR generation works fine for regular hangup scenario.)

 

Any idea what can cause the issue?

 

Thanks,

Mickael 

___
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] Differentiating between regular hangup and dialog timeout

2015-04-15 Thread Mickael Marrache
Hi,

 

I'm looking for a way to differentiate between regular hangup and dialog
timeout.

 

In both case, the dialog:end event is called. Do you know which information
can I use in the event route to differentiate between the two cases?

 

Thanks,

Mickael

___
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] Differentiating between regular hangup and dialog timeout

2015-04-15 Thread Mickael Marrache
Thanks for your reply, the solution you proposed works fine.

 

However, I created a pull request with the flag change you proposed. I
tested the change, it works, however I wonder if there is a way to access
the flag name inside the script?

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Wednesday, April 15, 2015 3:20 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Differentiating between regular hangup and dialog
timeout

 

Hello,

On 15/04/15 14:02, Mickael Marrache wrote:

Hi,

 

I'm looking for a way to differentiate between regular hangup and dialog
timeout.

 

In both case, the dialog:end event is called. Do you know which information
can I use in the event route to differentiate between the two cases?

no embedded mechanism comes in my mind now. For the future, maybe we can set
a specific flag in one of the internal flags fields (dflags seems
appropriate, not being persistent and already exposed via $dlg() variable).

For now the solution would be to set and avp when you receive a BYE, before
calling dlg_manage() or loose_route(). In event route that avp should be
present if the dialog is terminated is due to a BYE on the wire and not
present if it is internal timeout.

Cheers,
Daniel



-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
___
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] Inconsistent dlg timer data warning at dialog timeout

2015-04-15 Thread Mickael Marrache
It looks like it is a real issue since CDRs are not generated on dialog
timeout.

 

If the dialog is not in the timer list, does that mean the DLGCB_EXPIRED
callbacks are not called?

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Wednesday, April 15, 2015 3:22 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Inconsistent dlg timer data warning at dialog
timeout

 

Hello,

On 15/04/15 14:04, Mickael Marrache wrote:

Hi,

 

I get the following warning when a dialog timeout occurs:

 

kamailio[18889]: WARNING: dialog [dlg_req_within.c:214]: bye_reply_cb():
inconsitent dlg timer data on dlg 0x7f422986e448 [3547:6673] with clid
'mycvJWgmbmOSD5XQrcStKAKoTfW12XeR' and tags
'C5mlsaZCdTmybNSYgvWr75MBxWa5hVyA' 'L1ZzszpZ1MYO6qlQQ3FYYRWQYtF4F75r'

 

Am I doing something wrong?

do you get it always when a dialog times out?

The warning is for the case when the dialog is no longer on timer list,
which can happen when there are two BYEs crossing through. The situation is
harmless, perhaps the log message has to be done as info not warning.

Cheers,
Daniel



-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
___
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] No CDR is written when dialog timeouts

2015-04-15 Thread Mickael Marrache
I'm looking at the dlg_ontimeout function [dlg_handlers.c:1369] and I
understand the code, the DLGCB_EXPIRED callbacks are not called when the
send_bye parameter is set to 1.

 

I'm looking at the block 1399-1408.

 

From: Mickael Marrache [mailto:mickaelmarra...@gmail.com] 
Sent: Wednesday, April 15, 2015 3:53 PM
To: sr-users@lists.sip-router.org
Subject: RE: No CDR is written when dialog timeouts

 

I also confirm the cdr_on_create() [acc_cdr.c:718] function is called since
I can see the debug statement dialog '%p' created!.

 

From: Mickael Marrache [mailto:mickaelmarra...@gmail.com] 
Sent: Wednesday, April 15, 2015 3:48 PM
To: sr-users@lists.sip-router.org
Subject: No CDR is written when dialog timeouts

 

Hi,

 

I'm testing the dialog timeout scenario and I see that no CDR is written.

 

This is my configuration:

 

modparam(acc, cdr_enable, 1)

modparam(acc, cdr_expired_dlg_enable, 1)

modparam(acc, cdr_start_on_confirmed, 1)

modparam(acc, cdr_log_enable, 0)

modparam(acc, cdr_on_failed, 0)

 

I can confirm the cdr_on_expired() [acc_cdr.c:684] function is not called
since I don't see the debug statement dialog '%p' expired!\n.

 

(I precise that CDR generation works fine for regular hangup scenario.)

 

Any idea what can cause the issue?

 

Thanks,

Mickael 

___
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] DNS resolution and logical domain

2015-04-14 Thread Mickael Marrache
Hi,

 

I sometimes get the following errors:

 

kamailio[16098]: ERROR: core [resolve.c:1693]: sip_hostport2su(): could
not resolve hostname: mycompany.com

kamailio[16098]: ERROR: tm [ut.h:319]: uri2dst2(): failed to resolve
mycompany.com

 

mycompany.com cannot be resolved using DNS (there is no corresponding DNS
entry). I use this as a logical domain and I don't expect Kamailio to
resolve it. Also, I set use_domain (usrloc module) to 0 so only the RURI
username is used when searching locations.

 

The flow is as follows:

 

-the proxy receives the INVITE with sip:
sip:%3cuser%3e@myloadbalancerip:5060 user@myloadbalancerip:5060 which
then forwards the INVITE to a proxy

-the proxy looks for user internally and finds that this user has multiple
subscribers (endpoints)

-for each subscriber, a branch is appended using append_branch (or the RURI
is replaced for the first subscriber) - the new RURI for each branch is sip:
sip:%3csubscriber...@mycompany.com subscriber@mycompany.com

-finally, lookup_branches is called to look for locations for every
subscriber

 

lookup_branches only uses the subscriber (RURI username) for searching
locations since use_domain is set to 0.

 

However, I sometimes get the errors I mentioned.

 

Any idea why Kamailio sometimes tries to resolve the domain name?

 

Thanks,

Mickael

___
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] CDR fields are all strings

2015-04-14 Thread Mickael Marrache
I created a pull request that I tested using MongoDB.

 

It works fine.

 

Let me know if I can help more.

 

Mickael

 

From: Mickael Marrache [mailto:mickaelmarra...@gmail.com] 
Sent: Monday, April 13, 2015 5:13 PM
To: mico...@gmail.com; 'Kamailio (SER) - Users Mailing List'
Subject: RE: [SR-Users] CDR fields are all strings

 

We are using MongoDB and all the values are inserted as strings.

 

I also tried using the time_mode and time_format parameters, but it looks
like they are only relevant for transactions accounting.

 

Regarding the duration, it is set as a string for any backend.

 

I think this behavior strongly limits us (and probably others) performing
queries on CDRs (especially queries based on start and end time).

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Monday, April 13, 2015 3:03 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] CDR fields are all strings

 

Hello,

On 13/04/15 11:48, Mickael Marrache wrote:

Hi,

 

Why are all the CDR fields inserted as strings?

 

For extra fields, I can understand it is easier to implement. However, for
the built in fields (e.g. duration), we need to perform queries based on
duration and time and it is not really possible using strings.

Dialog variables hold only strings and those values are stored in variables,
iirc -- that was the design behind the concept done by initial developer.
Perhaps they can be easily updated to hold integers.

Anyhow, iirc, at least with mysql it should work to insert any value
enclosed in quotes, not matter the field type. For datetime that is
acutually the default -- to use quotes, afaik. So if you change the types of
columns, it should just work.

We can push a patch if most of the people think is better to use different
column types.

Cheers,
Daniel



 

I see that the time field for failed transactions is inserted as a date.

 

 

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
___
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] Avoiding script writer didn't release transaction warnings

2015-04-13 Thread Mickael Marrache
Does Kamailio have a way to determine if to use the TM or SL module to send
the reply?

If yes, maybe the right solution is to modify the REGISTRAR sources to use
it.

I know OpenSIPS has a module called SIGNALING that allows exactly that.

-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Alex Balashov
Sent: Monday, April 13, 2015 8:55 PM
To: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] Avoiding script writer didn't release transaction
warnings

On 04/13/2015 01:54 PM, Alex Balashov wrote:

 Your interpretation is correct; an SL final reply within a context 
 where a transaction exists will trigger the error.

Well, more pedantically, exiting script following an SL final reply in a
context where a transaction exists is what will trigger the error.

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
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


Re: [SR-Users] Avoiding script writer didn't release transaction warnings

2015-04-13 Thread Mickael Marrache
Any idea?

 

From: Mickael Marrache [mailto:mickaelmarra...@gmail.com] 
Sent: Thursday, April 09, 2015 2:08 PM
To: sr-users@lists.sip-router.org
Subject: RE: Avoiding script writer didn't release transaction warnings

 

I think understand in which case it happens.

 

When I receive a REGISTER, I create a transaction since I need to use the
t_continue feature to wake up a suspended transaction. However, the save()
command of the REGISTRAR module doesn't seem to call t_reply for replying
the 200 (it looks like the SL module is used instead). Therefore, I get the
warning every time it happens since the transaction is not released
explicitly.

 

Should I call t_release just before exiting the block handling the REGISTER?

 

From: Mickael Marrache [mailto:mickaelmarra...@gmail.com] 
Sent: Thursday, April 09, 2015 1:43 PM
To: sr-users@lists.sip-router.org
Subject: Avoiding script writer didn't release transaction warnings

 

Hi,

 

In my logs, I get a lot of the following warnings:

 

WARNING: tm [t_lookup.c:1476]: t_unref(): WARNING: script writer didn't
release transaction

 

I force transaction creation from my script to absorb retransmissions as
soon as possible. I understand that I need to explicitly call t_release in
order to avoid this warning.

 

What is the most appropriate place in the script to call t_release?

 

Thanks,

Mickael

___
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] Avoiding script writer didn't release transaction warnings

2015-04-13 Thread Mickael Marrache
Can you think of a case where one wants to reply stateless even if a
transaction exists?

-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Alex Balashov
Sent: Monday, April 13, 2015 9:06 PM
To: Mickael Marrache
Subject: Re: [SR-Users] Avoiding script writer didn't release transaction
warnings

Kamailio has a send_reply() function that accomplishes this for manually
issued replies, but that won't help with internally generated replies by the
registrar, since these are automatic.

As to a registrar patch, it's up to Daniel, but my personal opinion is that
it's not practical to go through the code to patch everything sent SL just
to make it more user-friendly in a transactional context where
t_suspend/continue are used. Maybe the users should just deal.

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

Sent from my BlackBerry.
  Original Message
From: Mickael Marrache
Sent: Monday, April 13, 2015 14:03
To: 'Kamailio (SER) - Users Mailing List'
Reply To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Avoiding script writer didn't release transaction
warnings

Does Kamailio have a way to determine if to use the TM or SL module to send
the reply?

If yes, maybe the right solution is to modify the REGISTRAR sources to use
it.

I know OpenSIPS has a module called SIGNALING that allows exactly that.

-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Alex Balashov
Sent: Monday, April 13, 2015 8:55 PM
To: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] Avoiding script writer didn't release transaction
warnings

On 04/13/2015 01:54 PM, Alex Balashov wrote:

 Your interpretation is correct; an SL final reply within a context 
 where a transaction exists will trigger the error.

Well, more pedantically, exiting script following an SL final reply in a
context where a transaction exists is what will trigger the error.

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
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

___
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] End time in CDR

2015-04-13 Thread Mickael Marrache
Hi,

 

Very short question.

 

Why the time at which the dialog ended is also included in the CDRs?

 

There already are the start time and duration.

 

Is it there to avoid end time computation?

 

Mickael

___
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] Dialog based CDRs and failed dialogs

2015-04-13 Thread Mickael Marrache
Hi,

 

I added your changes to my deployments.

 

Thanks!

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Friday, April 03, 2015 12:54 PM
To: Mickael Marrache; 'Kamailio (SER) - Users Mailing List'
Subject: Re: [SR-Users] Dialog based CDRs and failed dialogs

 

OK, I will look a the code and try to add an option to skip storing cdrs for
failed dialogs with the first chance.

Cheers,
Daniel

On 02/04/15 15:02, Mickael Marrache wrote:

Yes, the duration is set to 0.

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Thursday, April 02, 2015 3:59 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Dialog based CDRs and failed dialogs

 

Hello,

On 02/04/15 14:36, Mickael Marrache wrote:

Hi,

 

I'm using the ACC module to generate dialog based CDRs and I see that CDRs
are generated even for failed calls.

 

For example, a CDR is generated for cancelled calls.

 

At first, I thought that dialog based CDRs are generated only for
successfully established dialogs but it doesn't seem to be the case.


at least, is the duration 0?

I didn't have time to look in the source yet, but I guess it won't be hard
to add an option to skip storing those records.

Cheers,
Daniel




-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda http://twitter.com/#%21/miconda  -
http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com





-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
___
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] CDR fields are all strings

2015-04-13 Thread Mickael Marrache
Hi,

 

Why are all the CDR fields inserted as strings?

 

For extra fields, I can understand it is easier to implement. However, for
the built in fields (e.g. duration), we need to perform queries based on
duration and time and it is not really possible using strings.

 

I see that the time field for failed transactions is inserted as a date.

 

Thanks,

Mickael

___
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] CDR fields are all strings

2015-04-13 Thread Mickael Marrache
We are using MongoDB and all the values are inserted as strings.

 

I also tried using the time_mode and time_format parameters, but it looks
like they are only relevant for transactions accounting.

 

Regarding the duration, it is set as a string for any backend.

 

I think this behavior strongly limits us (and probably others) performing
queries on CDRs (especially queries based on start and end time).

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Monday, April 13, 2015 3:03 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] CDR fields are all strings

 

Hello,



On 13/04/15 11:48, Mickael Marrache wrote:

Hi,

 

Why are all the CDR fields inserted as strings?

 

For extra fields, I can understand it is easier to implement. However, for
the built in fields (e.g. duration), we need to perform queries based on
duration and time and it is not really possible using strings.

Dialog variables hold only strings and those values are stored in variables,
iirc -- that was the design behind the concept done by initial developer.
Perhaps they can be easily updated to hold integers.

Anyhow, iirc, at least with mysql it should work to insert any value
enclosed in quotes, not matter the field type. For datetime that is
acutually the default -- to use quotes, afaik. So if you change the types of
columns, it should just work.

We can push a patch if most of the people think is better to use different
column types.

Cheers,
Daniel




 

I see that the time field for failed transactions is inserted as a date.

 





-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
___
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] Avoiding script writer didn't release transaction warnings

2015-04-09 Thread Mickael Marrache
Hi,

 

In my logs, I get a lot of the following warnings:

 

WARNING: tm [t_lookup.c:1476]: t_unref(): WARNING: script writer didn't
release transaction

 

I force transaction creation from my script to absorb retransmissions as
soon as possible. I understand that I need to explicitly call t_release in
order to avoid this warning.

 

What is the most appropriate place in the script to call t_release?

 

Thanks,

Mickael

___
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] Avoiding script writer didn't release transaction warnings

2015-04-09 Thread Mickael Marrache
I think understand in which case it happens.

 

When I receive a REGISTER, I create a transaction since I need to use the
t_continue feature to wake up a suspended transaction. However, the save()
command of the REGISTRAR module doesn't seem to call t_reply for replying
the 200 (it looks like the SL module is used instead). Therefore, I get the
warning every time it happens since the transaction is not released
explicitly.

 

Should I call t_release just before exiting the block handling the REGISTER?

 

From: Mickael Marrache [mailto:mickaelmarra...@gmail.com] 
Sent: Thursday, April 09, 2015 1:43 PM
To: sr-users@lists.sip-router.org
Subject: Avoiding script writer didn't release transaction warnings

 

Hi,

 

In my logs, I get a lot of the following warnings:

 

WARNING: tm [t_lookup.c:1476]: t_unref(): WARNING: script writer didn't
release transaction

 

I force transaction creation from my script to absorb retransmissions as
soon as possible. I understand that I need to explicitly call t_release in
order to avoid this warning.

 

What is the most appropriate place in the script to call t_release?

 

Thanks,

Mickael

___
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] Dialog based CDRs and failed dialogs

2015-04-02 Thread Mickael Marrache
Yes, the duration is set to 0.

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Thursday, April 02, 2015 3:59 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Dialog based CDRs and failed dialogs

 

Hello,

On 02/04/15 14:36, Mickael Marrache wrote:

Hi,

 

I'm using the ACC module to generate dialog based CDRs and I see that CDRs
are generated even for failed calls.

 

For example, a CDR is generated for cancelled calls.

 

At first, I thought that dialog based CDRs are generated only for
successfully established dialogs but it doesn't seem to be the case.


at least, is the duration 0?

I didn't have time to look in the source yet, but I guess it won't be hard
to add an option to skip storing those records.

Cheers,
Daniel



-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
___
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] Dialog based CDRs and failed dialogs

2015-04-02 Thread Mickael Marrache
Hi,

 

I'm using the ACC module to generate dialog based CDRs and I see that CDRs
are generated even for failed calls.

 

For example, a CDR is generated for cancelled calls.

 

At first, I thought that dialog based CDRs are generated only for
successfully established dialogs but it doesn't seem to be the case.

 

Thanks,

Mickael

___
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] Inter Kamailio communication: UDP vs TCP vs SCTP

2015-03-24 Thread Mickael Marrache
Hi,

 

We are deploying a VoIP system based on Kamailio. The system is composed of
load balancers, proxies, registrars, etc

 

What is the recommended transport protocol to use for internal communication
(i.e. load balancer - proxy/registrar)? We started with UDP but we also
see that Kamailio supports TCP and SCTP.

 

For information, at first stage, the UAs will communicate using UDP but we
may need to use TCP in case messages are too large (we had such issues when
using ICE).

 

Thanks,

Mickael

___
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] Sending PUSH notification asynchronously

2015-03-19 Thread Mickael Marrache
I already looked at your presentation, the PUSH is send synchronously.

 

What I'm trying to achieve is sending the PUSH asynchronously. So, when I
receive an incoming call and the callee has no registration, I would like to
suspend the transaction and then delegate PUSH sending to another process.

 

In your presentation, I see the following:

 

route[PUSHASYNC] {

if (!is_method(INVITE))

return;

if(registered(location))

return;

route(SENDPUSH);

if(!t_suspend()) {

xlog(failed suspending trasaction [$T(id_index):$T(id_label)]\n);

send_reply(501, Unknown destination);

exit;

}

xdbg(suspended transaction [$T(id_index):$T(id_label)] $fU = $rU\n);

$sht(vtp=join::$rU) =  + $T(id_index) + : + $T(id_label);

xdbg(htale key value [$sht(vtp=join::$rU)]\n);

exit;

}

 

The route block is not execute asynchronously since it is called by the
calling block using regular way (i.e. route(PUSHASYNC)). Therefore, all
these operations are executed by the same process which is a worker process.
I would like to delegate execution of all the route block to a separate
process (at least execution of the SENDPUSH route block).

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Thursday, March 19, 2015 10:04 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Sending PUSH notification asynchronously

 

Hello,

don't do explicit t_suspend() if you are calling the async_task_route()
because it is done internally.

I presented a way for async push notifications during the Kamailio World
Conference 2014, see:

  -
http://www.kamailio.org/events/2014-KamailioWorld/day2/26-Daniel-Constantin.
Mierla-Kamailio.cfg-Async.pdf

A video should be also on youtube.

Cheers,
Daniel

On 19/03/15 08:49, Mickael Marrache wrote:

Hi,

 

I'm trying to add PUSH support to my system using Kamailio.

 

When a call is received and the callee has no active registration, a PUSH is
sent to the callee endpoint. In order to send this PUSH, my proxy sends an
HTTP requests to another server that will send the PUSH.

 

So, my route block is as follows:

 

route[PUSH] {

#Send PUSH notification using a custom module I wrote

 

#Suspend transaction execution.

t_on_failure(MANAGE_FAILURE);

if(!t_suspend()) {

send_reply(503, Service Unavailable);

exit;

}

 

$sht(push=join::$rU) =  + $T(id_index) + : + $T(id_label);

exit;

}

 

I would like to execute this route block asynchronously (i.e. in a separate
process).

 

I tried using the async_task_route command, and I can see the route block is
execute in a separate process, however some stuffs are broken (e.g.
transaction timeout, failure route). So, I thought it may be related to the
fact asynchronous execution is implemented using t_suspend/t_continue and in
this case, t_suspend/t_continue would be called twice.

 

The important point is to make the interaction with the PUSH server
asynchronous.

 

Any idea?

 

Thanks,

Mickael






___
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





-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
___
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] Sending PUSH notification asynchronously

2015-03-19 Thread Mickael Marrache
Thanks, it helps.

 

However, if I create a timer and specify mode to 1, I will only have one
extra process to send all PUSH notifications. Therefore, at some point, this
extra process will be continuously busy handling messages in the queue, and
the queue will grow over and over.

 

Is it possible to have a pool of timers fetching from the same message
queue?

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Thursday, March 19, 2015 10:28 AM
To: Mickael Marrache; 'Kamailio (SER) - Users Mailing List'
Subject: Re: [SR-Users] Sending PUSH notification asynchronously

 

You can delegate to send of the push to a rtimer process using mqueue -- see
same presentation, the section about tweeting.

Cheers,
Daniel

On 19/03/15 09:14, Mickael Marrache wrote:

I already looked at your presentation, the PUSH is send synchronously.

 

What I'm trying to achieve is sending the PUSH asynchronously. So, when I
receive an incoming call and the callee has no registration, I would like to
suspend the transaction and then delegate PUSH sending to another process.

 

In your presentation, I see the following:

 

route[PUSHASYNC] {

if (!is_method(INVITE))

return;

if(registered(location))

return;

route(SENDPUSH);

if(!t_suspend()) {

xlog(failed suspending trasaction [$T(id_index):$T(id_label)]\n);

send_reply(501, Unknown destination);

exit;

}

xdbg(suspended transaction [$T(id_index):$T(id_label)] $fU = $rU\n);

$sht(vtp=join::$rU) =  + $T(id_index) + : + $T(id_label);

xdbg(htale key value [$sht(vtp=join::$rU)]\n);

exit;

}

 

The route block is not execute asynchronously since it is called by the
calling block using regular way (i.e. route(PUSHASYNC)). Therefore, all
these operations are executed by the same process which is a worker process.
I would like to delegate execution of all the route block to a separate
process (at least execution of the SENDPUSH route block).

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Thursday, March 19, 2015 10:04 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Sending PUSH notification asynchronously

 

Hello,

don't do explicit t_suspend() if you are calling the async_task_route()
because it is done internally.

I presented a way for async push notifications during the Kamailio World
Conference 2014, see:

  -
http://www.kamailio.org/events/2014-KamailioWorld/day2/26-Daniel-Constantin.
Mierla-Kamailio.cfg-Async.pdf

A video should be also on youtube.

Cheers,
Daniel

On 19/03/15 08:49, Mickael Marrache wrote:

Hi,

 

I'm trying to add PUSH support to my system using Kamailio.

 

When a call is received and the callee has no active registration, a PUSH is
sent to the callee endpoint. In order to send this PUSH, my proxy sends an
HTTP requests to another server that will send the PUSH.

 

So, my route block is as follows:

 

route[PUSH] {

#Send PUSH notification using a custom module I wrote

 

#Suspend transaction execution.

t_on_failure(MANAGE_FAILURE);

if(!t_suspend()) {

send_reply(503, Service Unavailable);

exit;

}

 

$sht(push=join::$rU) =  + $T(id_index) + : + $T(id_label);

exit;

}

 

I would like to execute this route block asynchronously (i.e. in a separate
process).

 

I tried using the async_task_route command, and I can see the route block is
execute in a separate process, however some stuffs are broken (e.g.
transaction timeout, failure route). So, I thought it may be related to the
fact asynchronous execution is implemented using t_suspend/t_continue and in
this case, t_suspend/t_continue would be called twice.

 

The important point is to make the interaction with the PUSH server
asynchronous.

 

Any idea?

 

Thanks,

Mickael







___
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






-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda http://twitter.com/#%21/miconda  -
http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com





-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
___
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] Sending PUSH notification asynchronously

2015-03-19 Thread Mickael Marrache
Hi,

 

I'm trying to add PUSH support to my system using Kamailio.

 

When a call is received and the callee has no active registration, a PUSH is
sent to the callee endpoint. In order to send this PUSH, my proxy sends an
HTTP requests to another server that will send the PUSH.

 

So, my route block is as follows:

 

route[PUSH] {

#Send PUSH notification using a custom module I wrote

 

#Suspend transaction execution.

t_on_failure(MANAGE_FAILURE);

if(!t_suspend()) {

send_reply(503, Service Unavailable);

exit;

}

 

$sht(push=join::$rU) =  + $T(id_index) + : + $T(id_label);

exit;

}

 

I would like to execute this route block asynchronously (i.e. in a separate
process).

 

I tried using the async_task_route command, and I can see the route block is
execute in a separate process, however some stuffs are broken (e.g.
transaction timeout, failure route). So, I thought it may be related to the
fact asynchronous execution is implemented using t_suspend/t_continue and in
this case, t_suspend/t_continue would be called twice.

 

The important point is to make the interaction with the PUSH server
asynchronous.

 

Any idea?

 

Thanks,

Mickael

___
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] Timeout after t_suspend and failure route

2015-03-19 Thread Mickael Marrache
No, I didn't try forwarding after transaction timeout because no voicemail 
server is configured.

 

failure_route[MANAGE_FAILURE] {

route(NATMANAGE);

 

if (t_is_canceled()) {

exit;

}

 

if (t_check_status(3[0-9][0-9])) {

t_reply(404, Not found);

exit;

}

 

if (t_check_status(486|408)) {

$du = $null;

route(TOVOICEMAIL);

exit;

}

}

 

Mickael

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Thursday, March 19, 2015 10:00 AM
To: Mickael Marrache; 'Kamailio (SER) - Users Mailing List'
Subject: Re: [SR-Users] Timeout after t_suspend and failure route

 

Have you tried forwarding after the timeout of suspended transaction occurred? 
What kind of operations you had in the failure route. Trying to see what 
scenarios were covered...

Cheers,
Daniel 

On 18/03/15 21:13, Mickael Marrache wrote:

Thanks Daniel!

 

Your patch seems to have fixed it…

 

Mickael

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Wednesday, March 18, 2015 8:54 PM
To: Mickael Marrache; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Timeout after t_suspend and failure route

 

Can you try with the patch from the next commit?

- 
https://github.com/kamailio/kamailio/commit/6484b199fb48acc2c55f318812f2c968b845ca80

Cheers,
Daniel

On 18/03/15 17:09, Mickael Marrache wrote:

Confirmed.

 

Thanks,

Mickael


On 18 áîøõ 2015, at 18:06, Daniel-Constantin Mierla mico...@gmail.com wrote:

Hello,

can't check the code right now, but to confirm, if you use t_on_failure() 
before suspending the transaction, isn't executed? 

Cheers,
Daniel

On 18/03/15 15:56, Mickael Marrache wrote:

Hi,

 

When receiving an INVITE, I arm a failure route and set the fr_timer to 30 
seconds. After the fr_timer expires, I need to do some operations however I see 
the failure route is not executed.

 

I guess it is related to the fact the INVITE has not been forwarded?

 

If yes, how can I execute code when a transaction times out after calling 
t_suspend?

 

Thanks,

Mickael 







___
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






-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda http://twitter.com/#%21/miconda  - 
http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com

___
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






-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda http://twitter.com/#%21/miconda  - 
http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com





-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
___
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] Sending PUSH notification asynchronously

2015-03-19 Thread Mickael Marrache
Thanks, it works great!

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Thursday, March 19, 2015 11:56 AM
To: Mickael Marrache; 'Kamailio (SER) - Users Mailing List'
Subject: Re: [SR-Users] Sending PUSH notification asynchronously

 

You can define as many rtimer processes as you want and tell them to execute
same route block, consuming from the same queue.

Cheers,
Daniel

On 19/03/15 09:39, Mickael Marrache wrote:

Thanks, it helps.

 

However, if I create a timer and specify mode to 1, I will only have one
extra process to send all PUSH notifications. Therefore, at some point, this
extra process will be continuously busy handling messages in the queue, and
the queue will grow over and over.

 

Is it possible to have a pool of timers fetching from the same message
queue?

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Thursday, March 19, 2015 10:28 AM
To: Mickael Marrache; 'Kamailio (SER) - Users Mailing List'
Subject: Re: [SR-Users] Sending PUSH notification asynchronously

 

You can delegate to send of the push to a rtimer process using mqueue -- see
same presentation, the section about tweeting.

Cheers,
Daniel

On 19/03/15 09:14, Mickael Marrache wrote:

I already looked at your presentation, the PUSH is send synchronously.

 

What I'm trying to achieve is sending the PUSH asynchronously. So, when I
receive an incoming call and the callee has no registration, I would like to
suspend the transaction and then delegate PUSH sending to another process.

 

In your presentation, I see the following:

 

route[PUSHASYNC] {

if (!is_method(INVITE))

return;

if(registered(location))

return;

route(SENDPUSH);

if(!t_suspend()) {

xlog(failed suspending trasaction [$T(id_index):$T(id_label)]\n);

send_reply(501, Unknown destination);

exit;

}

xdbg(suspended transaction [$T(id_index):$T(id_label)] $fU = $rU\n);

$sht(vtp=join::$rU) =  + $T(id_index) + : + $T(id_label);

xdbg(htale key value [$sht(vtp=join::$rU)]\n);

exit;

}

 

The route block is not execute asynchronously since it is called by the
calling block using regular way (i.e. route(PUSHASYNC)). Therefore, all
these operations are executed by the same process which is a worker process.
I would like to delegate execution of all the route block to a separate
process (at least execution of the SENDPUSH route block).

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Thursday, March 19, 2015 10:04 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Sending PUSH notification asynchronously

 

Hello,

don't do explicit t_suspend() if you are calling the async_task_route()
because it is done internally.

I presented a way for async push notifications during the Kamailio World
Conference 2014, see:

  -
http://www.kamailio.org/events/2014-KamailioWorld/day2/26-Daniel-Constantin.
Mierla-Kamailio.cfg-Async.pdf

A video should be also on youtube.

Cheers,
Daniel

On 19/03/15 08:49, Mickael Marrache wrote:

Hi,

 

I'm trying to add PUSH support to my system using Kamailio.

 

When a call is received and the callee has no active registration, a PUSH is
sent to the callee endpoint. In order to send this PUSH, my proxy sends an
HTTP requests to another server that will send the PUSH.

 

So, my route block is as follows:

 

route[PUSH] {

#Send PUSH notification using a custom module I wrote

 

#Suspend transaction execution.

t_on_failure(MANAGE_FAILURE);

if(!t_suspend()) {

send_reply(503, Service Unavailable);

exit;

}

 

$sht(push=join::$rU) =  + $T(id_index) + : + $T(id_label);

exit;

}

 

I would like to execute this route block asynchronously (i.e. in a separate
process).

 

I tried using the async_task_route command, and I can see the route block is
execute in a separate process, however some stuffs are broken (e.g.
transaction timeout, failure route). So, I thought it may be related to the
fact asynchronous execution is implemented using t_suspend/t_continue and in
this case, t_suspend/t_continue would be called twice.

 

The important point is to make the interaction with the PUSH server
asynchronous.

 

Any idea?

 

Thanks,

Mickael








___
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







-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda http://twitter.com/#%21/miconda  -
http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com






-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda http://twitter.com/#%21/miconda  -
http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com





-- 
Daniel-Constantin

[SR-Users] Kamailio hardware requirements

2015-03-19 Thread Mickael Marrache
Hi,

 

We are currently deploying an entire architecture composed of load
balancers, proxies and media relays. All the components except the media
relays are Kamailio instances. The media relays are RTP proxy instances.

 

We are trying to determine the hardware requirements for the different
servers.

 

We will start with an architecture composed of:

. 2 load balancers (one kept as backup to ensure availability)

. 2 proxies (load is balanced over the 2 using the DISPATCHER
module)

. 2 media relays

 

We are trying to determine the recommended hardware for the different
components taking into account we will need to serve around 40 users.

 

How many registrations per second can Kamailio support?

How many concurrent calls can Kamailio support?

What is the recommended number of children processes?

What is the recommended size for PKG memory?

What is the recommended size for SHM memory?

 

Thanks for your help,

Mickael

___
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] Timeout after t_suspend and failure route

2015-03-18 Thread Mickael Marrache
Hi,

 

When receiving an INVITE, I arm a failure route and set the fr_timer to 30
seconds. After the fr_timer expires, I need to do some operations however I
see the failure route is not executed.

 

I guess it is related to the fact the INVITE has not been forwarded?

 

If yes, how can I execute code when a transaction times out after calling
t_suspend?

 

Thanks,

Mickael 

___
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] Timeout after t_suspend and failure route

2015-03-18 Thread Mickael Marrache
Confirmed.

Thanks,
Mickael

 On 18 במרץ 2015, at 18:06, Daniel-Constantin Mierla mico...@gmail.com wrote:
 
 Hello,
 
 can't check the code right now, but to confirm, if you use t_on_failure() 
 before suspending the transaction, isn't executed? 
 
 Cheers,
 Daniel
 
 On 18/03/15 15:56, Mickael Marrache wrote:
 Hi,
  
 When receiving an INVITE, I arm a failure route and set the fr_timer to 30 
 seconds. After the fr_timer expires, I need to do some operations however I 
 see the failure route is not executed.
  
 I guess it is related to the fact the INVITE has not been forwarded?
  
 If yes, how can I execute code when a transaction times out after calling 
 t_suspend?
  
 Thanks,
 Mickael
 
 
 ___
 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
 
 -- 
 Daniel-Constantin Mierla
 http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
 Kamailio World Conference, May 27-29, 2015
 Berlin, Germany - http://www.kamailioworld.com
 ___
 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


Re: [SR-Users] Timeout after t_suspend and failure route

2015-03-18 Thread Mickael Marrache
Thanks Daniel!

 

Your patch seems to have fixed it…

 

Mickael

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Wednesday, March 18, 2015 8:54 PM
To: Mickael Marrache; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Timeout after t_suspend and failure route

 

Can you try with the patch from the next commit?

- 
https://github.com/kamailio/kamailio/commit/6484b199fb48acc2c55f318812f2c968b845ca80

Cheers,
Daniel

On 18/03/15 17:09, Mickael Marrache wrote:

Confirmed.

 

Thanks,

Mickael


On 18 áîøõ 2015, at 18:06, Daniel-Constantin Mierla mico...@gmail.com wrote:

Hello,

can't check the code right now, but to confirm, if you use t_on_failure() 
before suspending the transaction, isn't executed? 

Cheers,
Daniel

On 18/03/15 15:56, Mickael Marrache wrote:

Hi,

 

When receiving an INVITE, I arm a failure route and set the fr_timer to 30 
seconds. After the fr_timer expires, I need to do some operations however I see 
the failure route is not executed.

 

I guess it is related to the fact the INVITE has not been forwarded?

 

If yes, how can I execute code when a transaction times out after calling 
t_suspend?

 

Thanks,

Mickael 






___
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





-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda http://twitter.com/#%21/miconda  - 
http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com

___
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





-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
___
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] WARNING when querying data using db_mongodb

2015-03-10 Thread Mickael Marrache
Hi,



I'm continuously seeing the following WARNING in my logs:



WARNING: db_mongodb [mongodb_dbase.c:454]: db_mongodb_get_columns():
unhandled data type column (instance) type id (10), use DB1_STRING as
default



It looks like the WARNING appears when data is fetched from the location
collection. The instance field is always null in my case.



Thanks,

Mickael
___
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] Wrong location entries when using usrloc with Mongo

2015-02-10 Thread Mickael Marrache
:83]: db_free_columns(): freeing RES_NAMES[13] 
at 0x7f5485599548

[31723]: DEBUG: core [db_res.c:83]: db_free_columns(): freeing RES_NAMES[14] 
at 0x7f5485599590

[31723]: DEBUG: core [db_res.c:83]: db_free_columns(): freeing RES_NAMES[15] 
at 0x7f54855995d8

[31723]: DEBUG: core [db_res.c:92]: db_free_columns(): freeing result names 
at 0x7f548559cf08

[31723]: DEBUG: core [db_res.c:97]: db_free_columns(): freeing result types 
at 0x7f54855a0c48

[31723]: DEBUG: core [db_res.c:52]: db_free_rows(): freeing 1 rows

[31723]: DEBUG: core [db_row.c:95]: db_free_row(): freeing row values at 
0x7f5485539e80

[31723]: DEBUG: core [db_res.c:60]: db_free_rows(): freeing rows at 
0x7f54855c0578

[31723]: DEBUG: core [db_res.c:134]: db_free_result(): freeing result set at 
0x7f548558aae0

[31723]: DEBUG: core [strcommon.c:212]: unescape_user(): unescaped string is 
sip:xx

[31723]: DEBUG: registrar [path.c:110]: build_path_vector(): received is 
sip:xx

[31723]: DEBUG: registrar [path.c:118]: build_path_vector(): path is 
sip:x;lr;received=sip:xxx

[31723]: DEBUG: core [sruid.c:183]: sruid_next(): new sruid is 
[uloc-54d9e708-7beb-d1] (29 / 21)

[31723]: DEBUG: registrar [save.c:409]: pack_ci(): generated ruid is: 
uloc-54d9e708-7beb-d1

[31723]: DEBUG: usrloc [ucontact.c:948]: db_update_ucontact_ruid(): 
ruid:uloc-54d9e708-7be9-c1

[31723]: DEBUG: usrloc [ucontact.c:1059]: db_update_ucontact_ruid(): 
contact:sip:u1@xxx;rinstance=2786DE56

[31723]: DEBUG: registrar [reply.c:374]: build_contact(): created Contact HF: 
Contact: 
sip:u1@xx;rinstance=2786DE56;expires=3600;received=sip:xx#015#012

[31723]: DEBUG: sl [sl.c:280]: send_reply(): reply in stateless mode (sl)

[31723]: DEBUG: core [msg_translator.c:158]: check_via_address(): 
(x,x, 0)

[31723]: DEBUG: core [usr_avp.c:631]: destroy_avp_list(): destroying list 
0x7f547e87e188

[31723]: DEBUG: core [usr_avp.c:631]: destroy_avp_list(): destroying list 
(nil)

[31723]: DEBUG: core [usr_avp.c:631]: destroy_avp_list(): destroying list 
(nil)

[31723]: DEBUG: core [usr_avp.c:631]: destroy_avp_list(): destroying list 
(nil)

[31723]: DEBUG: core [usr_avp.c:631]: destroy_avp_list(): destroying list 
(nil)

[31723]: DEBUG: core [usr_avp.c:631]: destroy_avp_list(): destroying list 
(nil)

[31723]: DEBUG: core [xavp.c:446]: xavp_destroy_list(): destroying xavp list 
(nil)

[31723]: DEBUG: core [receive.c:278]: receive_msg(): cleaning up

 

Thanks,

Mickael

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Tuesday, February 03, 2015 9:43 PM
To: Mickael Marrache; sr-users@lists.sip-router.org
Subject: Re: [SR-Users] Wrong location entries when using usrloc with Mongo

 

I pushed a patch on git master branch for this issue, can you try it and report 
the results?

I tested a bit with usrloc and DB_ONLY mode, it seemed fine here.

Cheers,
Daniel

On 03/02/15 12:36, Daniel-Constantin Mierla wrote:

I haven't had time to look at it, being traveling to Fosdem in the past days. 
It is on my short term agenda.

Cheers,
Daniel

On 02/02/15 12:38, Mickael Marrache wrote:

Any news regarding this issue?

 

I don't think { expires : { $date : 1422728781000 }, expires : { $date 
: 0 } } is a valid query… Is the intent to remove entries where expires = 
1422728781000 or expires = 0? If yes, I think the logical operator $or should 
be used for that? Let me know how I can help you to figure out what the issue 
is.

 

Thanks,

Mickael

 

From: Mickael Marrache [mailto:mickaelmarra...@gmail.com] 
Sent: Saturday, January 31, 2015 8:32 PM
To: 'Kamailio (SER) - Users Mailing List'
Subject: RE: [SR-Users] Wrong location entries when using usrloc with Mongo

 

Hi,

 

The log entries are all of the form:

 

DEBUG: db_mongodb [mongodb_dbase.c:948]: db_mongodb_delete(): delete filter 
document: { expires : { $date : 1422728781000 }, expires : { $date : 0 
} }

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Daniel-Constantin Mierla
Sent: Friday, January 30, 2015 4:28 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Wrong location entries when using usrloc with Mongo

 

I checked quickly the code and mongo c api, it looks ok. Can you see a debug 
message with content like:

 

... delete filter document: ...

 

when running with debug=3? If yes, can you send it over to check if is correct?

 

Cheers,

Daniel

 

On Fri, Jan 30, 2015 at 10:45 AM, Daniel-Constantin Mierla mico...@gmail.com 
wrote:

Hello,

 

it seems that the fileds inside the object are deleted, not the entire object. 
The match was done on username and ruid for deletion, both of them are missing.

 

I will look at the mongo api to see if something was set wrong there for the 
delete command.

 

Cheers,

Daniel

 

 

On Fri, Jan 30, 2015 at 9:54 AM, Mickael Marrache mickaelmarra...@gmail.com 
wrote:

I forgot to precise that I allow only one contact per AOR

Re: [SR-Users] Wrong location entries when using usrloc with Mongo

2015-02-02 Thread Mickael Marrache
Any news regarding this issue?

 

I don't think { expires : { $date : 1422728781000 }, expires : { $date 
: 0 } } is a valid query… Is the intent to remove entries where expires = 
1422728781000 or expires = 0? If yes, I think the logical operator $or should 
be used for that? Let me know how I can help you to figure out what the issue 
is.

 

Thanks,

Mickael

 

From: Mickael Marrache [mailto:mickaelmarra...@gmail.com] 
Sent: Saturday, January 31, 2015 8:32 PM
To: 'Kamailio (SER) - Users Mailing List'
Subject: RE: [SR-Users] Wrong location entries when using usrloc with Mongo

 

Hi,

 

The log entries are all of the form:

 

DEBUG: db_mongodb [mongodb_dbase.c:948]: db_mongodb_delete(): delete filter 
document: { expires : { $date : 1422728781000 }, expires : { $date : 0 
} }

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Daniel-Constantin Mierla
Sent: Friday, January 30, 2015 4:28 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Wrong location entries when using usrloc with Mongo

 

I checked quickly the code and mongo c api, it looks ok. Can you see a debug 
message with content like:

 

... delete filter document: ...

 

when running with debug=3? If yes, can you send it over to check if is correct?

 

Cheers,

Daniel

 

On Fri, Jan 30, 2015 at 10:45 AM, Daniel-Constantin Mierla mico...@gmail.com 
wrote:

Hello,

 

it seems that the fileds inside the object are deleted, not the entire object. 
The match was done on username and ruid for deletion, both of them are missing.

 

I will look at the mongo api to see if something was set wrong there for the 
delete command.

 

Cheers,

Daniel

 

 

On Fri, Jan 30, 2015 at 9:54 AM, Mickael Marrache mickaelmarra...@gmail.com 
wrote:

I forgot to precise that I allow only one contact per AOR.

 

modparam(registrar, max_contacts, 1)

save(location, 0x04)

 

From: Mickael Marrache [mailto:mickaelmarra...@gmail.com] 
Sent: Friday, January 30, 2015 10:51 AM
To: sr-users@lists.sip-router.org
Subject: Wrong location entries when using usrloc with Mongo

 

Hi,

 

I start with no location nor in Mongo, nor in memory. My UA registers 
successfully and I can see the location entry in Mongo. Then, I close my UA 
which unregisters (by setting Expires header to 0). Then, I open the app again 
and a new registration is made.

 

The entry after first registration. Looks okay.

 

{ _id : ObjectId(54cb38f684e58133783f2b42), username : A, contact : 
sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp, expires : 
ISODate(2015-01-30T08:55:34Z), q : -1, callid : 
297EC55073A07BF78F0C05822A6CCDFB47E48705, cseq : 8809, flags : 0, 
cflags : 0, user_agent : Acrobits Softphone Business/3.1, received : 
sip:XXX:54217;transport=tcp, path : 
sip:XX;lr;received=sip:XXX:54217%3Btransport%3Dtcp, 
socket : udp:X:5060, methods : 4751, last_modified : 
ISODate(2015-01-30T07:55:34Z), ruid : uloc-54cb38df-3378-2, instance : 
null, reg_id : 0 }

 

The same entry after un register (Expires 0). Note that the username field is 
missing. In any case, I expected the entry to be deleted.

 

{ _id : ObjectId(54cb38f684e58133783f2b42), expires : 
ISODate(2015-01-30T08:56:51Z), q : -1, cseq : 8811, flags : 0, cflags 
: 0, user_agent : Acrobits Softphone Business/3.1, received : sip: 
X:54217;transport=tcp, path : sip: X;lr;received=sip: 
X:54217%3Btransport%3Dtcp, socket : udp: X:5060, 
methods : 4751, last_modified : ISODate(2015-01-30T07:56:51Z), callid : 
297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id : 0, 
contact : sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp }

 

The entries after second registration. The new entry looks okay. But, the old 
entry is still here.

 

{ _id : ObjectId(54cb38f684e58133783f2b42), expires : 
ISODate(2015-01-30T08:56:51Z), q : -1, cseq : 8811, flags : 0, cflags 
: 0, user_agent : Acrobits Softphone Business/3.1, received : sip: 
X:54217;transport=tcp, path : sip: X;lr;received=sip: 
X:54217%3Btransport%3Dtcp, socket : udp: X:5060, 
methods : 4751, last_modified : ISODate(2015-01-30T07:56:51Z), callid : 
297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id : 0, 
contact : sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp }

 

{ _id : ObjectId(54cb3a7884e581337a25b895), username : A, contact : 
sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp, expires : 
ISODate(2015-01-30T09:02:00Z), q : -1, callid : 
297EC55073A07BF78F0C05822A6CCDFB47E48705, cseq : 8813, flags : 0, 
cflags : 0, user_agent : Acrobits Softphone Business/3.1, received : 
sip: X:54217;transport=tcp, path : sip: 
X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket : 
udp: X:5060, methods : 4751, last_modified : 
ISODate(2015-01-30T08:02:00Z), ruid : uloc-54cb38df-337a-1, instance : 
null, reg_id : 0 }

 

The issue is the entry

Re: [SR-Users] Wrong location entries when using usrloc with Mongo

2015-01-31 Thread Mickael Marrache
Hi,

 

The log entries are all of the form:

 

DEBUG: db_mongodb [mongodb_dbase.c:948]: db_mongodb_delete(): delete filter 
document: { expires : { $date : 1422728781000 }, expires : { $date : 0 
} }

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Daniel-Constantin Mierla
Sent: Friday, January 30, 2015 4:28 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Wrong location entries when using usrloc with Mongo

 

I checked quickly the code and mongo c api, it looks ok. Can you see a debug 
message with content like:

 

... delete filter document: ...

 

when running with debug=3? If yes, can you send it over to check if is correct?

 

Cheers,

Daniel

 

On Fri, Jan 30, 2015 at 10:45 AM, Daniel-Constantin Mierla mico...@gmail.com 
wrote:

Hello,

 

it seems that the fileds inside the object are deleted, not the entire object. 
The match was done on username and ruid for deletion, both of them are missing.

 

I will look at the mongo api to see if something was set wrong there for the 
delete command.

 

Cheers,

Daniel

 

 

On Fri, Jan 30, 2015 at 9:54 AM, Mickael Marrache mickaelmarra...@gmail.com 
wrote:

I forgot to precise that I allow only one contact per AOR.

 

modparam(registrar, max_contacts, 1)

save(location, 0x04)

 

From: Mickael Marrache [mailto:mickaelmarra...@gmail.com] 
Sent: Friday, January 30, 2015 10:51 AM
To: sr-users@lists.sip-router.org
Subject: Wrong location entries when using usrloc with Mongo

 

Hi,

 

I start with no location nor in Mongo, nor in memory. My UA registers 
successfully and I can see the location entry in Mongo. Then, I close my UA 
which unregisters (by setting Expires header to 0). Then, I open the app again 
and a new registration is made.

 

The entry after first registration. Looks okay.

 

{ _id : ObjectId(54cb38f684e58133783f2b42), username : A, contact : 
sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp, expires : 
ISODate(2015-01-30T08:55:34Z), q : -1, callid : 
297EC55073A07BF78F0C05822A6CCDFB47E48705, cseq : 8809, flags : 0, 
cflags : 0, user_agent : Acrobits Softphone Business/3.1, received : 
sip:XXX:54217;transport=tcp, path : 
sip:XX;lr;received=sip:XXX:54217%3Btransport%3Dtcp, 
socket : udp:X:5060, methods : 4751, last_modified : 
ISODate(2015-01-30T07:55:34Z), ruid : uloc-54cb38df-3378-2, instance : 
null, reg_id : 0 }

 

The same entry after un register (Expires 0). Note that the username field is 
missing. In any case, I expected the entry to be deleted.

 

{ _id : ObjectId(54cb38f684e58133783f2b42), expires : 
ISODate(2015-01-30T08:56:51Z), q : -1, cseq : 8811, flags : 0, cflags 
: 0, user_agent : Acrobits Softphone Business/3.1, received : sip: 
X:54217;transport=tcp, path : sip: X;lr;received=sip: 
X:54217%3Btransport%3Dtcp, socket : udp: X:5060, 
methods : 4751, last_modified : ISODate(2015-01-30T07:56:51Z), callid : 
297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id : 0, 
contact : sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp }

 

The entries after second registration. The new entry looks okay. But, the old 
entry is still here.

 

{ _id : ObjectId(54cb38f684e58133783f2b42), expires : 
ISODate(2015-01-30T08:56:51Z), q : -1, cseq : 8811, flags : 0, cflags 
: 0, user_agent : Acrobits Softphone Business/3.1, received : sip: 
X:54217;transport=tcp, path : sip: X;lr;received=sip: 
X:54217%3Btransport%3Dtcp, socket : udp: X:5060, 
methods : 4751, last_modified : ISODate(2015-01-30T07:56:51Z), callid : 
297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id : 0, 
contact : sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp }

 

{ _id : ObjectId(54cb3a7884e581337a25b895), username : A, contact : 
sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp, expires : 
ISODate(2015-01-30T09:02:00Z), q : -1, callid : 
297EC55073A07BF78F0C05822A6CCDFB47E48705, cseq : 8813, flags : 0, 
cflags : 0, user_agent : Acrobits Softphone Business/3.1, received : 
sip: X:54217;transport=tcp, path : sip: 
X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket : 
udp: X:5060, methods : 4751, last_modified : 
ISODate(2015-01-30T08:02:00Z), ruid : uloc-54cb38df-337a-1, instance : 
null, reg_id : 0 }

 

The issue is the entry is not deleted after un registering.

 

I precise that registrations are dispatched over multiple registrars with all 
accesses the same Mongo cluster.

 

Thanks,

Mickael

 

 

___
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





 

-- 

Daniel-Constantin Mierla - http://www.asipto.com

http://twitter.com/#!/miconda - http://www.linkedin.com/in/micond 
http://www.linkedin.com/in/miconda 





 

-- 

Daniel-Constantin Mierla

Re: [SR-Users] Core dump while saving user location in mongo

2015-01-30 Thread Mickael Marrache
Hi,

 

Thanks for the patch, Kamailio doesn't crash anymore.

 

However, I'm encountering another issue with usrloc + Mongo, I will write a new 
post.

 

Thanks,

Mickael

 

From: Daniel-Constantin Mierla [mailto:mico...@gmail.com] 
Sent: Friday, January 30, 2015 7:22 AM
To: Mickael Marrache
Cc: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Core dump while saving user location in mongo

 

Hello,

 

I pushed a patch that takes care of initializing the columns array of the 
result - it is in the master branch for now.

 

However, the log messages don't seem to be complete, were you sending all. The 
backtrace shows a line which is executed only if an error message is printed, 
it is not in the logs you sent.

 

One thing that I remembered was that usrloc requires parameter db_insert_null 
to be set in order to work with mongodb:

 

- 
http://kamailio.org/docs/modules/stable/modules/usrloc.html#usrloc.p.db_insert_null

 

The crash shouldn't happen and hopefully the patch I pushed catches it. Try the 
patch without db_insert_null just to see if there is still a crash or not.

 

Cheers,

Daniel

 

On Thu, Jan 29, 2015 at 11:51 AM, Mickael Marrache mickaelmarra...@gmail.com 
wrote:

Now, it didn't crash during the REGISTER but during the INVITE:

 

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:705]: db_mongodb_query(): 
query to collection [location]

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:726]: db_mongodb_query(): 
query filter: { username : m1 }

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:745]: db_mongodb_query(): 
columns filter: { contact : 1, expires : 1, q : 1, callid : 1, cseq : 
1, flags :

1, cflags : 1, user_agent : 1, received : 1, path : 1, socket : 1, 
methods : 1, last_modified : 1, ruid : 1, instance : 1, reg_id : 1 }

kamailio[32599]: DEBUG: core [db_res.c:118]: db_new_result(): allocate 56 
bytes for result set at 0x7f83a32daa48

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:203]: 
db_mongodb_get_columns(): 16 columns returned from the query

kamailio[32599]: DEBUG: core [db_res.c:155]: db_allocate_columns(): allocate 
128 bytes for result names at 0x7f83a32daf98

kamailio[32599]: DEBUG: core [db_res.c:165]: db_allocate_columns(): allocate 
64 bytes for result types at 0x7f83a32daed8

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:231]: 
db_mongodb_get_columns(): Found a field[0] named: contact

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:250]: 
db_mongodb_get_columns(): allocate 16 bytes for RES_NAMES[0] at 0x7f83a32daab8

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:285]: 
db_mongodb_get_columns(): use DB1_STRING result type

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:314]: 
db_mongodb_get_columns(): RES_NAMES(0x7f83a32daab8)[0]=[contact] (2)

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:231]: 
db_mongodb_get_columns(): Found a field[1] named: expires

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:250]: 
db_mongodb_get_columns(): allocate 16 bytes for RES_NAMES[1] at 0x7f83a32dab98

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:275]: 
db_mongodb_get_columns(): use DB1_DATETIME result type

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:314]: 
db_mongodb_get_columns(): RES_NAMES(0x7f83a32dab98)[1]=[expires] (9)

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:231]: 
db_mongodb_get_columns(): Found a field[2] named: q

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:250]: 
db_mongodb_get_columns(): allocate 16 bytes for RES_NAMES[2] at 0x7f83a32dabe0

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:270]: 
db_mongodb_get_columns(): use DB1_DOUBLE result type

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:314]: 
db_mongodb_get_columns(): RES_NAMES(0x7f83a32dabe0)[2]=[q] (1)

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:231]: 
db_mongodb_get_columns(): Found a field[3] named: callid

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:250]: 
db_mongodb_get_columns(): allocate 16 bytes for RES_NAMES[3] at 0x7f83a32dac70

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:285]: 
db_mongodb_get_columns(): use DB1_STRING result type

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:314]: 
db_mongodb_get_columns(): RES_NAMES(0x7f83a32dac70)[3]=[callid] (2)

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:231]: 
db_mongodb_get_columns(): Found a field[4] named: cseq

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:250]: 
db_mongodb_get_columns(): allocate 16 bytes for RES_NAMES[4] at 0x7f83a32dac28

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:260]: 
db_mongodb_get_columns(): use DB1_INT result type

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:314]: 
db_mongodb_get_columns(): RES_NAMES(0x7f83a32dac28)[4]=[cseq] (16)

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:231]: 
db_mongodb_get_columns(): Found a field[5] named: flags

kamailio[32599]: DEBUG: db_mongodb [mongodb_dbase.c:250]: 
db_mongodb_get_columns(): allocate 16 bytes

[SR-Users] Wrong location entries when using usrloc with Mongo

2015-01-30 Thread Mickael Marrache
Hi,

 

I start with no location nor in Mongo, nor in memory. My UA registers
successfully and I can see the location entry in Mongo. Then, I close my UA
which unregisters (by setting Expires header to 0). Then, I open the app
again and a new registration is made.

 

The entry after first registration. Looks okay.

 

{ _id : ObjectId(54cb38f684e58133783f2b42), username : A, contact
: sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp, expires :
ISODate(2015-01-30T08:55:34Z), q : -1, callid :
297EC55073A07BF78F0C05822A6CCDFB47E48705, cseq : 8809, flags : 0,
cflags : 0, user_agent : Acrobits Softphone Business/3.1, received :
sip:XXX:54217;transport=tcp, path :
sip:XX;lr;received=sip:XXX:54217%3Btransport%3Dtcp,
socket : udp:X:5060, methods : 4751, last_modified :
ISODate(2015-01-30T07:55:34Z), ruid : uloc-54cb38df-3378-2, instance
: null, reg_id : 0 }

 

The same entry after un register (Expires 0). Note that the username field
is missing. In any case, I expected the entry to be deleted.

 

{ _id : ObjectId(54cb38f684e58133783f2b42), expires :
ISODate(2015-01-30T08:56:51Z), q : -1, cseq : 8811, flags : 0,
cflags : 0, user_agent : Acrobits Softphone Business/3.1, received :
sip: X:54217;transport=tcp, path : sip:
X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket :
udp: X:5060, methods : 4751, last_modified :
ISODate(2015-01-30T07:56:51Z), callid :
297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id : 0,
contact : sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp }

 

The entries after second registration. The new entry looks okay. But, the
old entry is still here.

 

{ _id : ObjectId(54cb38f684e58133783f2b42), expires :
ISODate(2015-01-30T08:56:51Z), q : -1, cseq : 8811, flags : 0,
cflags : 0, user_agent : Acrobits Softphone Business/3.1, received :
sip: X:54217;transport=tcp, path : sip:
X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket :
udp: X:5060, methods : 4751, last_modified :
ISODate(2015-01-30T07:56:51Z), callid :
297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id : 0,
contact : sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp }

 

{ _id : ObjectId(54cb3a7884e581337a25b895), username : A, contact
: sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp, expires :
ISODate(2015-01-30T09:02:00Z), q : -1, callid :
297EC55073A07BF78F0C05822A6CCDFB47E48705, cseq : 8813, flags : 0,
cflags : 0, user_agent : Acrobits Softphone Business/3.1, received :
sip: X:54217;transport=tcp, path : sip:
X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket :
udp: X:5060, methods : 4751, last_modified :
ISODate(2015-01-30T08:02:00Z), ruid : uloc-54cb38df-337a-1, instance
: null, reg_id : 0 }

 

The issue is the entry is not deleted after un registering.

 

I precise that registrations are dispatched over multiple registrars with
all accesses the same Mongo cluster.

 

Thanks,

Mickael

 

___
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] Wrong location entries when using usrloc with Mongo

2015-01-30 Thread Mickael Marrache
I forgot to precise that I allow only one contact per AOR.

 

modparam(registrar, max_contacts, 1)

save(location, 0x04)

 

From: Mickael Marrache [mailto:mickaelmarra...@gmail.com] 
Sent: Friday, January 30, 2015 10:51 AM
To: sr-users@lists.sip-router.org
Subject: Wrong location entries when using usrloc with Mongo

 

Hi,

 

I start with no location nor in Mongo, nor in memory. My UA registers
successfully and I can see the location entry in Mongo. Then, I close my UA
which unregisters (by setting Expires header to 0). Then, I open the app
again and a new registration is made.

 

The entry after first registration. Looks okay.

 

{ _id : ObjectId(54cb38f684e58133783f2b42), username : A, contact
: sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp, expires :
ISODate(2015-01-30T08:55:34Z), q : -1, callid :
297EC55073A07BF78F0C05822A6CCDFB47E48705, cseq : 8809, flags : 0,
cflags : 0, user_agent : Acrobits Softphone Business/3.1, received :
sip:XXX:54217;transport=tcp, path :
sip:XX;lr;received=sip:XXX:54217%3Btransport%3Dtcp,
socket : udp:X:5060, methods : 4751, last_modified :
ISODate(2015-01-30T07:55:34Z), ruid : uloc-54cb38df-3378-2, instance
: null, reg_id : 0 }

 

The same entry after un register (Expires 0). Note that the username field
is missing. In any case, I expected the entry to be deleted.

 

{ _id : ObjectId(54cb38f684e58133783f2b42), expires :
ISODate(2015-01-30T08:56:51Z), q : -1, cseq : 8811, flags : 0,
cflags : 0, user_agent : Acrobits Softphone Business/3.1, received :
sip: X:54217;transport=tcp, path : sip:
X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket :
udp: X:5060, methods : 4751, last_modified :
ISODate(2015-01-30T07:56:51Z), callid :
297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id : 0,
contact : sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp }

 

The entries after second registration. The new entry looks okay. But, the
old entry is still here.

 

{ _id : ObjectId(54cb38f684e58133783f2b42), expires :
ISODate(2015-01-30T08:56:51Z), q : -1, cseq : 8811, flags : 0,
cflags : 0, user_agent : Acrobits Softphone Business/3.1, received :
sip: X:54217;transport=tcp, path : sip:
X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket :
udp: X:5060, methods : 4751, last_modified :
ISODate(2015-01-30T07:56:51Z), callid :
297EC55073A07BF78F0C05822A6CCDFB47E48705, instance : null, reg_id : 0,
contact : sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp }

 

{ _id : ObjectId(54cb3a7884e581337a25b895), username : A, contact
: sip:A@192.168.1.3:54217;rinstance=DFAEBBC7;transport=tcp, expires :
ISODate(2015-01-30T09:02:00Z), q : -1, callid :
297EC55073A07BF78F0C05822A6CCDFB47E48705, cseq : 8813, flags : 0,
cflags : 0, user_agent : Acrobits Softphone Business/3.1, received :
sip: X:54217;transport=tcp, path : sip:
X;lr;received=sip: X:54217%3Btransport%3Dtcp, socket :
udp: X:5060, methods : 4751, last_modified :
ISODate(2015-01-30T08:02:00Z), ruid : uloc-54cb38df-337a-1, instance
: null, reg_id : 0 }

 

The issue is the entry is not deleted after un registering.

 

I precise that registrations are dispatched over multiple registrars with
all accesses the same Mongo cluster.

 

Thanks,

Mickael

 

___
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] Setting dialog variable when BYE is received before accounting

2015-01-29 Thread Mickael Marrache
Hi,

 

Is there a way to set a dialog variable when a BYE is received so that it
can be written in a CDR?

 

I tried as follows but it didn't work:

 

if (loose_route()) {

  ..

  if(is_method(BYE)) {

if(is_direction(downstream)) {

 #Call disconnected by caller

 $dlg_var(dr) = 700;

} else {

#Call disconnected by callee

$dlg_var(dr) = 701;

}

xlog(Setting disconnect reason to $dlg_var(dr)\n);

  }

  ..

  exit;

}

 

The xlog statement prints:

 

ERROR: script: Setting disconnect reason to null

 

The doc states:

 

This pseudo-variable will be available only for subsequential requests after
doing loose_route().

 

Thanks,

Mickael

___
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] Core dump while saving user location in mongo

2015-01-29 Thread Mickael Marrache
The parameters:

 

modparam(usrloc, db_url,
mongodb://DB_MONGO_HOST:DB_MONGO_PORT/DB_MONGO_DBNAME)

modparam(usrloc, db_mode, 3)

modparam(usrloc, use_domain, 0)

modparam(usrloc, timer_interval, 60)

 

Yes, I use DB_ONLY (3) mode.

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Thursday, January 29, 2015 12:23 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Core dump while saving user location in mongo

 

Hello,

can you give the parameters for usrloc module? Are you using DB_ONLY mode?

Cheers,
Daniel

On 29/01/15 08:55, Mickael Marrache wrote:

Hi,

 

When my proxy receives a REGISTER request, it crashes while saving the user
location in MongoDB.

 

This is the backtrace from the core dump:

 

#0  0x003f08e32625 in raise () from /lib64/libc.so.6

#1  0x003f08e33e05 in abort () from /lib64/libc.so.6

#2  0x006196f9 in fm_free (qm=0x7f4368bf7010, p=0x210add0,
file=0x7f4367fd7608 core: db_res.c, func=0x7f4367fd8100
db_free_columns, line=86) at mem/f_malloc.c:588

#3  0x7f4367fc37ab in db_free_columns (_r=0x7f4368ca0430) at db_res.c:86

#4  0x7f4367fc479e in db_free_result (_r=0x7f4368ca0430) at db_res.c:134

#5  0x7f4367da37cb in db_mongodb_free_result (_h=0x7f4368c94718,
_r=0x7f4368ca0430) at mongodb_dbase.c:646

#6  0x7f4367da5d65 in db_mongodb_query (_h=0x7f4368c94718,
_k=0x7fffa03d5550, _op=0x0, _v=0x7fffa03d5510, _c=0x7fffa03d5560, _n=1,
_nc=16, _o=0x7f4365ed2c80, _r=0x7fffa03d5508) at mongodb_dbase.c:783

#7  0x7f4365cac7d2 in db_load_urecord (_c=0x7f4368c94718,
_d=0x7f436154a0e8, _aor=0x7fffa03d59d0) at udomain.c:601

#8  0x7f4365cb1e8e in get_urecord (_d=0x7f436154a0e8,
_aor=0x7fffa03d59d0, _r=0x7fffa03d5760) at udomain.c:1106

#9  0x7f4365a75dea in add_contacts (_m=0x7f4368cbdc40,
_d=0x7f436154a0e8, _a=0x7fffa03d59d0, _mode=1, _use_regid=1) at save.c:832

#10 0x7f4365a77d32 in save (_m=0x7f4368cbdc40, _d=0x7f436154a0e8,
_cflags=4, _uri=0x0) at save.c:986

#11 0x7f4365a606db in w_save2 (_m=0x7f4368cbdc40, _d=0x7f436154a0e8
H\240TaC\177, _cflags=0x4 Address 0x4 out of bounds) at reg_mod.c:447

#12 0x0041d489 in do_action (h=0x7fffa03d6180, a=0x7f4368c71e98,
msg=0x7f4368cbdc40) at action.c:1100

#13 0x00429a7a in run_actions (h=0x7fffa03d6180, a=0x7f4368c71e98,
msg=0x7f4368cbdc40) at action.c:1583

#14 0x0042a0df in run_actions_safe (h=0x7fffa03d7470,
a=0x7f4368c71e98, msg=0x7f4368cbdc40) at action.c:1648

#15 0x00540b7c in rval_get_int (h=0x7fffa03d7470,
msg=0x7f4368cbdc40, i=0x7fffa03d6658, rv=0x7f4368c72830, cache=0x0) at
rvalue.c:924

#16 0x00544db4 in rval_expr_eval_int (h=0x7fffa03d7470,
msg=0x7f4368cbdc40, res=0x7fffa03d6658, rve=0x7f4368c72828) at rvalue.c:1918

#17 0x005451aa in rval_expr_eval_int (h=0x7fffa03d7470,
msg=0x7f4368cbdc40, res=0x7fffa03d6ae0, rve=0x7f4368c72070) at rvalue.c:1926

#18 0x0041ce4e in do_action (h=0x7fffa03d7470, a=0x7f4368c73148,
msg=0x7f4368cbdc40) at action.c:1064

#19 0x00429a7a in run_actions (h=0x7fffa03d7470, a=0x7f4368c71cc0,
msg=0x7f4368cbdc40) at action.c:1583

#20 0x00419dea in do_action (h=0x7fffa03d7470, a=0x7f4368c3bdb8,
msg=0x7f4368cbdc40) at action.c:712

#21 0x00429a7a in run_actions (h=0x7fffa03d7470, a=0x7f4368c33898,
msg=0x7f4368cbdc40) at action.c:1583

#22 0x0042a1a7 in run_top_route (a=0x7f4368c33898,
msg=0x7f4368cbdc40, c=0x0) at action.c:1669

#23 0x0050747e in receive_msg (

buf=0xa6f780 REGISTER sip::5060;transport=tcp
SIP/2.0\r\nVia: SIP/2.0/UDP
X;branch=z9hG4bK242c.26de52a75c8675f6757e0958454a0ad5.0;i=1\r\nv:
SIP/2.0/TCP XX:62051;received=...,

len=1004, rcv_info=0x7fffa03d7760) at receive.c:216

#24 0x00606e76 in udp_rcv_loop () at udp_server.c:521

#25 0x004a5c97 in main_loop () at main.c:1629

#26 0x004aaf2a in main (argc=13, argv=0x7fffa03d7b78) at main.c:2561

 

I tested multiple times, it occurs everytime.

 

Let me know if you need more information.

 

Thanks,

Mickael






___
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





-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
___
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] Core dump while saving user location in mongo

2015-01-29 Thread Mickael Marrache
=0x7f83a32d91f0) at rvalue.c:1918

#18 0x0041ce4e in do_action (h=0x7fff25b774c0, a=0x7f83a32d9d58,
msg=0x7f83a33083e0) at action.c:1064

#19 0x00429a7a in run_actions (h=0x7fff25b774c0, a=0x7f83a32d9d58,
msg=0x7f83a33083e0) at action.c:1583

#20 0x00419dea in do_action (h=0x7fff25b774c0, a=0x7f83a32c9048,
msg=0x7f83a33083e0) at action.c:712

#21 0x00429a7a in run_actions (h=0x7fff25b774c0, a=0x7f83a32c3cd8,
msg=0x7f83a33083e0) at action.c:1583

#22 0x00419dea in do_action (h=0x7fff25b774c0, a=0x7f83a328d418,
msg=0x7f83a33083e0) at action.c:712

#23 0x00429a7a in run_actions (h=0x7fff25b774c0, a=0x7f83a328d418,
msg=0x7f83a33083e0) at action.c:1583

#24 0x0041d2cd in do_action (h=0x7fff25b774c0, a=0x7f83a328d658,
msg=0x7f83a33083e0) at action.c:1079

#25 0x00429a7a in run_actions (h=0x7fff25b774c0, a=0x7f83a327d898,
msg=0x7f83a33083e0) at action.c:1583

#26 0x0042a1a7 in run_top_route (a=0x7f83a327d898,
msg=0x7f83a33083e0, c=0x0) at action.c:1669

#27 0x0050747e in receive_msg (

buf=0xa6f780 INVITE sip:XX@XXX SIP/2.0\r\nRecord-Route:
sip:X;lr\r\nVia: SIP/2.0/UDP
XXX;branch=z9hG4bK2be.f31409f558981039fd70ad46afc97176.0\r\nVia:
SIP/2.0/UDP ...,

len=1151, rcv_info=0x7fff25b777b0) at receive.c:216

#28 0x00606e76 in udp_rcv_loop () at udp_server.c:521

#29 0x004a5c97 in main_loop () at main.c:1629

#30 0x004aaf2a in main (argc=13, argv=0x7fff25b77bc8) at main.c:2561

 

I can try to reproduce the issue with the REGISTER if you need.

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Thursday, January 29, 2015 12:26 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Core dump while saving user location in mongo

 

Also, give the error messages from syslog file.

Cheers,
Daniel

On 29/01/15 11:23, Daniel-Constantin Mierla wrote:

Hello,

can you give the parameters for usrloc module? Are you using DB_ONLY mode?

Cheers,
Daniel

On 29/01/15 08:55, Mickael Marrache wrote:

Hi,

 

When my proxy receives a REGISTER request, it crashes while saving the user
location in MongoDB.

 

This is the backtrace from the core dump:

 

#0  0x003f08e32625 in raise () from /lib64/libc.so.6

#1  0x003f08e33e05 in abort () from /lib64/libc.so.6

#2  0x006196f9 in fm_free (qm=0x7f4368bf7010, p=0x210add0,
file=0x7f4367fd7608 core: db_res.c, func=0x7f4367fd8100
db_free_columns, line=86) at mem/f_malloc.c:588

#3  0x7f4367fc37ab in db_free_columns (_r=0x7f4368ca0430) at db_res.c:86

#4  0x7f4367fc479e in db_free_result (_r=0x7f4368ca0430) at db_res.c:134

#5  0x7f4367da37cb in db_mongodb_free_result (_h=0x7f4368c94718,
_r=0x7f4368ca0430) at mongodb_dbase.c:646

#6  0x7f4367da5d65 in db_mongodb_query (_h=0x7f4368c94718,
_k=0x7fffa03d5550, _op=0x0, _v=0x7fffa03d5510, _c=0x7fffa03d5560, _n=1,
_nc=16, _o=0x7f4365ed2c80, _r=0x7fffa03d5508) at mongodb_dbase.c:783

#7  0x7f4365cac7d2 in db_load_urecord (_c=0x7f4368c94718,
_d=0x7f436154a0e8, _aor=0x7fffa03d59d0) at udomain.c:601

#8  0x7f4365cb1e8e in get_urecord (_d=0x7f436154a0e8,
_aor=0x7fffa03d59d0, _r=0x7fffa03d5760) at udomain.c:1106

#9  0x7f4365a75dea in add_contacts (_m=0x7f4368cbdc40,
_d=0x7f436154a0e8, _a=0x7fffa03d59d0, _mode=1, _use_regid=1) at save.c:832

#10 0x7f4365a77d32 in save (_m=0x7f4368cbdc40, _d=0x7f436154a0e8,
_cflags=4, _uri=0x0) at save.c:986

#11 0x7f4365a606db in w_save2 (_m=0x7f4368cbdc40, _d=0x7f436154a0e8
H\240TaC\177, _cflags=0x4 Address 0x4 out of bounds) at reg_mod.c:447

#12 0x0041d489 in do_action (h=0x7fffa03d6180, a=0x7f4368c71e98,
msg=0x7f4368cbdc40) at action.c:1100

#13 0x00429a7a in run_actions (h=0x7fffa03d6180, a=0x7f4368c71e98,
msg=0x7f4368cbdc40) at action.c:1583

#14 0x0042a0df in run_actions_safe (h=0x7fffa03d7470,
a=0x7f4368c71e98, msg=0x7f4368cbdc40) at action.c:1648

#15 0x00540b7c in rval_get_int (h=0x7fffa03d7470,
msg=0x7f4368cbdc40, i=0x7fffa03d6658, rv=0x7f4368c72830, cache=0x0) at
rvalue.c:924

#16 0x00544db4 in rval_expr_eval_int (h=0x7fffa03d7470,
msg=0x7f4368cbdc40, res=0x7fffa03d6658, rve=0x7f4368c72828) at rvalue.c:1918

#17 0x005451aa in rval_expr_eval_int (h=0x7fffa03d7470,
msg=0x7f4368cbdc40, res=0x7fffa03d6ae0, rve=0x7f4368c72070) at rvalue.c:1926

#18 0x0041ce4e in do_action (h=0x7fffa03d7470, a=0x7f4368c73148,
msg=0x7f4368cbdc40) at action.c:1064

#19 0x00429a7a in run_actions (h=0x7fffa03d7470, a=0x7f4368c71cc0,
msg=0x7f4368cbdc40) at action.c:1583

#20 0x00419dea in do_action (h=0x7fffa03d7470, a=0x7f4368c3bdb8,
msg=0x7f4368cbdc40) at action.c:712

#21 0x00429a7a in run_actions (h=0x7fffa03d7470, a=0x7f4368c33898,
msg=0x7f4368cbdc40) at action.c:1583

#22 0x0042a1a7 in run_top_route (a=0x7f4368c33898,
msg=0x7f4368cbdc40, c=0x0) at action.c:1669

#23 0x0050747e

Re: [SR-Users] CDRs for failed calls

2015-01-28 Thread Mickael Marrache
Hi Will,

 

Thanks for your reply!

 

I finally can create transaction records manually by calling commands like 
acc_db_request.

However, I am forced to use a different schema (CDR schema is different than 
transaction schema) but it may make sense.

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Will 
Ferrer
Sent: Wednesday, January 28, 2015 6:08 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] CDRs for failed calls

 

Hi Mickael

 

Have you tried looking at these examples in the ACC module to see if what you 
are looking for can be accomplished at least as far creating ACC records:

 

http://kamailio.org/docs/modules/4.0.x/modules/acc.html#idp1626120

http://kamailio.org/docs/modules/4.0.x/modules/acc.html#idp1628288

http://kamailio.org/docs/modules/4.0.x/modules/acc.html#idp1632512

http://kamailio.org/docs/modules/4.0.x/modules/acc.html#idp1644232

 

We also use a mysql routine to move ACC into CDRs in the database, so if we 
wan't CDRs for failed calls I would modify our routine to make them.

 

While we do not use it our selves, there is this info here on having the ACC 
module make CDRs: 
http://kamailio.org/docs/modules/4.0.x/modules/acc.html#idp91080

 

I hope that helps.

 

All the best.

 

Will Ferrer

 

Switchsoft

 

On Mon, Jan 26, 2015 at 5:23 AM, Mickael Marrache mickaelmarra...@gmail.com 
wrote:

Hi,

 

Is there a way to write CDRs for failed calls?

 

I tried calling the acc_db_request command from my script, but it inserts a 
transaction log not a CDR.

 

Thanks,

Mickael


___
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] usrloc and MongoDB

2015-01-28 Thread Mickael Marrache
Hi,

 

Is it possible to save user location data in a MongoDB database?

 

If not, are you guys using p_usrloc in your projects? Can you please give me
some feedback?

 

Thanks,

Mickael

___
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] Core dump while saving user location in mongo

2015-01-28 Thread Mickael Marrache
Hi,

 

When my proxy receives a REGISTER request, it crashes while saving the user
location in MongoDB.

 

This is the backtrace from the core dump:

 

#0  0x003f08e32625 in raise () from /lib64/libc.so.6

#1  0x003f08e33e05 in abort () from /lib64/libc.so.6

#2  0x006196f9 in fm_free (qm=0x7f4368bf7010, p=0x210add0,
file=0x7f4367fd7608 core: db_res.c, func=0x7f4367fd8100
db_free_columns, line=86) at mem/f_malloc.c:588

#3  0x7f4367fc37ab in db_free_columns (_r=0x7f4368ca0430) at db_res.c:86

#4  0x7f4367fc479e in db_free_result (_r=0x7f4368ca0430) at db_res.c:134

#5  0x7f4367da37cb in db_mongodb_free_result (_h=0x7f4368c94718,
_r=0x7f4368ca0430) at mongodb_dbase.c:646

#6  0x7f4367da5d65 in db_mongodb_query (_h=0x7f4368c94718,
_k=0x7fffa03d5550, _op=0x0, _v=0x7fffa03d5510, _c=0x7fffa03d5560, _n=1,
_nc=16, _o=0x7f4365ed2c80, _r=0x7fffa03d5508) at mongodb_dbase.c:783

#7  0x7f4365cac7d2 in db_load_urecord (_c=0x7f4368c94718,
_d=0x7f436154a0e8, _aor=0x7fffa03d59d0) at udomain.c:601

#8  0x7f4365cb1e8e in get_urecord (_d=0x7f436154a0e8,
_aor=0x7fffa03d59d0, _r=0x7fffa03d5760) at udomain.c:1106

#9  0x7f4365a75dea in add_contacts (_m=0x7f4368cbdc40,
_d=0x7f436154a0e8, _a=0x7fffa03d59d0, _mode=1, _use_regid=1) at save.c:832

#10 0x7f4365a77d32 in save (_m=0x7f4368cbdc40, _d=0x7f436154a0e8,
_cflags=4, _uri=0x0) at save.c:986

#11 0x7f4365a606db in w_save2 (_m=0x7f4368cbdc40, _d=0x7f436154a0e8
H\240TaC\177, _cflags=0x4 Address 0x4 out of bounds) at reg_mod.c:447

#12 0x0041d489 in do_action (h=0x7fffa03d6180, a=0x7f4368c71e98,
msg=0x7f4368cbdc40) at action.c:1100

#13 0x00429a7a in run_actions (h=0x7fffa03d6180, a=0x7f4368c71e98,
msg=0x7f4368cbdc40) at action.c:1583

#14 0x0042a0df in run_actions_safe (h=0x7fffa03d7470,
a=0x7f4368c71e98, msg=0x7f4368cbdc40) at action.c:1648

#15 0x00540b7c in rval_get_int (h=0x7fffa03d7470,
msg=0x7f4368cbdc40, i=0x7fffa03d6658, rv=0x7f4368c72830, cache=0x0) at
rvalue.c:924

#16 0x00544db4 in rval_expr_eval_int (h=0x7fffa03d7470,
msg=0x7f4368cbdc40, res=0x7fffa03d6658, rve=0x7f4368c72828) at rvalue.c:1918

#17 0x005451aa in rval_expr_eval_int (h=0x7fffa03d7470,
msg=0x7f4368cbdc40, res=0x7fffa03d6ae0, rve=0x7f4368c72070) at rvalue.c:1926

#18 0x0041ce4e in do_action (h=0x7fffa03d7470, a=0x7f4368c73148,
msg=0x7f4368cbdc40) at action.c:1064

#19 0x00429a7a in run_actions (h=0x7fffa03d7470, a=0x7f4368c71cc0,
msg=0x7f4368cbdc40) at action.c:1583

#20 0x00419dea in do_action (h=0x7fffa03d7470, a=0x7f4368c3bdb8,
msg=0x7f4368cbdc40) at action.c:712

#21 0x00429a7a in run_actions (h=0x7fffa03d7470, a=0x7f4368c33898,
msg=0x7f4368cbdc40) at action.c:1583

#22 0x0042a1a7 in run_top_route (a=0x7f4368c33898,
msg=0x7f4368cbdc40, c=0x0) at action.c:1669

#23 0x0050747e in receive_msg (

buf=0xa6f780 REGISTER sip::5060;transport=tcp
SIP/2.0\r\nVia: SIP/2.0/UDP
X;branch=z9hG4bK242c.26de52a75c8675f6757e0958454a0ad5.0;i=1\r\nv:
SIP/2.0/TCP XX:62051;received=...,

len=1004, rcv_info=0x7fffa03d7760) at receive.c:216

#24 0x00606e76 in udp_rcv_loop () at udp_server.c:521

#25 0x004a5c97 in main_loop () at main.c:1629

#26 0x004aaf2a in main (argc=13, argv=0x7fffa03d7b78) at main.c:2561

 

I tested multiple times, it occurs everytime.

 

Let me know if you need more information.

 

Thanks,

Mickael

___
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] usrloc and MongoDB

2015-01-28 Thread Mickael Marrache
Thanks Daniel for your reply, I asked this question because the DB_MONGODB
documentation states queries don't store the result yet, but I guess queries
are now supported?

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Wednesday, January 28, 2015 6:20 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] usrloc and MongoDB

 

Hello,

yes, it is possible by using db_mongodb module for usrloc.

Thinking of it, perhaps there is a limitation on handling natted contacts in
DB_ONLY mode (no cache) if you use nathelper, related to sending options
keepalives. You might need to enable pinging all contact.

Storing and retrieving records in mongodb should work fine -- report any
issue on mailing list and it will be fixed.

Cheers,
Daniel


On 28/01/15 16:37, Mickael Marrache wrote:

Hi,

 

Is it possible to save user location data in a MongoDB database?

 

If not, are you guys using p_usrloc in your projects? Can you please give me
some feedback?

 

Thanks,

Mickael






___
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






-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
___
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] CDRs for failed calls

2015-01-26 Thread Mickael Marrache
Hi,

 

Is there a way to write CDRs for failed calls?

 

I tried calling the acc_db_request command from my script, but it inserts a
transaction log not a CDR.

 

Thanks,

Mickael

___
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] CDRs and MongoDB

2015-01-25 Thread Mickael Marrache
Hi Daniel,

 

Thank you, it works!

 

However, I see both transactions and CDRs accounting. Is there a way to only
enable CDR accounting?

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Friday, January 23, 2015 10:55 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] CDRs and MongoDB

 

Hello,

it should work to write the cdrs to a database. I removed the note from the
readme, it was there from an older version and overlooked when the feature
was implemented.

Cheers,
Daniel

On 23/01/15 08:15, Mickael Marrache wrote:

Hi,

 

Is it possible to write CDRs directly to MongoDB using the new db_mongodb
module?

 

modparam(acc, db_url, DB_MONGO_URL)

modparam(acc, cdr_enable, 1)

modparam(acc, cdr_extra,  . )

modparam(acc, cdr_log_enable, 0)

modparam(acc, cdrs_table, cdrs)

 

 

In the acc module documentation, I found the following statement:

 

Note that CDR generation does not involve any kind of database storage
(yet). In order to persist the CDRs into a database you will have to set up
an exterior process (i.e., a script living outside of Kamailio) and
implement the storage task yourself.

 

Thanks,

Mickael






___
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





-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
___
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] CDRs and MongoDB

2015-01-22 Thread Mickael Marrache
Hi,

 

Is it possible to write CDRs directly to MongoDB using the new db_mongodb
module?

 

modparam(acc, db_url, DB_MONGO_URL)

modparam(acc, cdr_enable, 1)

modparam(acc, cdr_extra,  . )

modparam(acc, cdr_log_enable, 0)

modparam(acc, cdrs_table, cdrs)

 

 

In the acc module documentation, I found the following statement:

 

Note that CDR generation does not involve any kind of database storage
(yet). In order to persist the CDRs into a database you will have to set up
an exterior process (i.e., a script living outside of Kamailio) and
implement the storage task yourself.

 

Thanks,

Mickael

___
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] Load balancer - Path and Route header issue

2015-01-18 Thread Mickael Marrache
Hi,

 

I'm trying to use one Kamailio instance as load balancer for multiple
Kamailio instances. The load balancer only performs NAT handling and
dispatching of messages. The other instances  handle registrations, routing,
RTP proxy, authentication, etc.

 

When a REGISTER request is received by the load balancer, a Path header is
added to the request which is then forwarded to one of the registrars. The
registration request is successfully handled and the Path header is saved in
database. All subscribers register through the load balancer.

 

When an INVITE is received from one subscriber by the load balancer, a
Record-Route header is added by the load balancer which then forwards the
INVITE to one of the other instances. The selected instance authenticates
the subscriber, looks for the callee using the REGISTRAR module, adds a
Record-Route header, adds a Route header according to the Path header
associated with the callee, and forwards the INVITE to the load balancer.
The load balancer performs loose routing (removing the Route header), adds
another Record-Route header, and forwards the INVITE to the callee using the
right transport address (indicated by the received parameter present in the
Route header). The flow is right for the INVITE and its replies. However,
when the caller sends the ACK, the route set is: load balancer, proxy, load
balancer - without any information about how to reach the callee. Therefore,
when the ACK reaches the second load balancer, the latter forwards it
according to the RURI which is the Contact URI present in the 200 OK (which
is not routable because of the NAT). I expected Kamailio to reuse the
information that was present in the Path header to route the ACK correctly.

 

What am I doing wrong?

 

Thanks,

Mickael

___
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