[SR-Users] Changing Domain in To URI

2013-04-05 Thread qmail

Hello,

As it happens we run Kamailio 3.2.0 on Debian Lenny which for some  
reason does not support uac_replace_to()!


Anyhoo, we are trying to change the domain part in the To URI. What is  
the best way to do it ?


Thank you!



___
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] sip_trace unable to capture after next_branches()

2013-04-05 Thread Daniel-Constantin Mierla

Hello,

On 3/31/13 4:27 PM, Ramaseshi reddy kolli wrote:

Hi,

I am using sip_trace function after next_branches(), it is not 
capturing outbound SIP INVITE request can anyone please help me.
iirc, you have to set a flag to trace outgoing messages. the sip_trace() 
function just takes the snapshot of processed messages.


Cheers,
Daniel

--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
 - http://conference.kamailio.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] How to tie Registration with Client TCP connection

2013-04-05 Thread Daniel-Constantin Mierla

Hello,

On 4/4/13 10:43 PM, Krishna Kurapati wrote:

Hi,

With TCP, there is no way Server can establish a TCP connection 
through client's Firewall/NAT.
So, when Client connection is disconnected from the server due to 
Network issues, the Registration should be removed.


I tried to handle this with a Event Route in tcp_read.c. However, 
There is not an easy way to find the Registration with TCP socket info 
(IP and Port of the Client).


Could anyone suggest a solution?

you can use set_forward_no_connect

http://www.kamailio.org/wiki/cookbooks/4.0.x/core#set_forward_no_connect

Local branches will be created, but not forwarded if no connection 
matches the destination.


If you follow the code for this functionality, then you should see how 
the connection is associated with a destination.


Cheers,
Daniel

--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
 - http://conference.kamailio.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] mediaproxy-ng Tutorial

2013-04-05 Thread Daniel-Constantin Mierla

Hello,

On 4/4/13 9:15 PM, Richard Fuchs wrote:

Hi,

On 04/04/13 14:58, Daniel-Constantin Mierla wrote:


quite interesting, I didn't know it has two operations modes: user space
forwarding and kernel forwarding.

Is there any plan in supporting more one mode (or dropping the other) in
the future?

Not per se, kernel mode forwarding (at least for the primitive case with
no modifications to the packets) will always be the primary means of
forwarding packets. At the same time, user-space forwarding will also
always be available, since at least the first few packets must always be
processed by the daemon. As such, it doesn't really have two modes of
operation, it will simply fall back to user-space processing if the
kernel modules fails to do its job for whatever reason. It's designed to
use the functionality of the kernel module if possible, but also not to
rely on it.


She fallback to user space can happen even during a call? Or is just 
about when the call is initialized, the application detects is some 
problem when setting up forwarding rules in the kernel and goes for user 
space.





Have you done some measurements to see the benefits of
kernel forwarding vs user space?

I can't quote any specific numbers, but we've seen several times in the
past that the overhead of pushing packets back and forth between kernel
and user space is quite significant. I suppose I could try to set up
some simple tests to get some unscientific ballpark numbers if people
are interested.
Indeed, this is kind of general feeling, at least based on theoretical 
aspects, but I haven't seen any kind of numbers just to compare and see 
how much is worth to go for kernel forwarding.


Cheers,
Daniel

--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
 - http://conference.kamailio.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] Changing Domain in To URI

2013-04-05 Thread Daniel-Constantin Mierla

Hello,

On 4/4/13 2:32 PM, qm...@polarismail.com wrote:

Hello,

As it happens we run Kamailio 3.2.0 on Debian Lenny which for some 
reason does not support uac_replace_to()!


Anyhoo, we are trying to change the domain part in the To URI. What is 
the best way to do it ?


if you don't need to change it back for replies and next requests, try:

$td = "xyz.com";

IIRC, that is available on 3.2.x. If not, either you upgrade or use 
replace functions from textops.


Cheers,
Daniel

--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
 - http://conference.kamailio.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] mediaproxy-ng Tutorial

2013-04-05 Thread Richard Fuchs
On 04/05/13 03:53, Daniel-Constantin Mierla wrote:

> She fallback to user space can happen even during a call? Or is just
> about when the call is initialized, the application detects is some
> problem when setting up forwarding rules in the kernel and goes for user
> space.

It can happen any time. The socket remains open and the daemon continues
to listen for packets on it. If the daemon receives a packet, it will
process it, which in the normal case will result in it being forwarded.
With the kernel module active and working, the daemon will simply not
see the packets coming in on the socket.

> Indeed, this is kind of general feeling, at least based on theoretical
> aspects, but I haven't seen any kind of numbers just to compare and see
> how much is worth to go for kernel forwarding.

I did a very simple test, one pseudo-call (one port in, one port out)
with about 35,000 UDP packets per second going each way. Each packet had
150 bytes payload and the test was done on an 8-core Xeon 2.53 GHz
machine running kernel 2.6.32. Under this workload, the daemon registers
with about 90% single-CPU load without kernel forwarding. The daemon is
multi-threaded and so can use multiple cores, but if it weren't, then it
would be about maxed out at this point. Averaged over the 8 cores this
leaves the system around 88% idle. With kernel forwarding enabled,
system CPU usage drops to >99% idle.

cheers



signature.asc
Description: OpenPGP digital signature
___
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] Changing Domain in To URI

2013-04-05 Thread qmail

Sorry if I repeat myself - I just subscribed properly to the list:


if you don't need to change it back for replies and next requests, try:

$td = "xyz.com";

IIRC, that is available on 3.2.x. If not, either you upgrade or use  
replace functions from textops.


Cheers,
Daniel


Thank you for replying. We tried the direct assignment of  
$td="xyz.com" but the variable doesn't change. We are doing an xlog  
print right after and an ngrep and we confirmed that the domain part  
of the URI doesn't change. I also tried a subst() and it's the same  
problem. I read on the online documentation that the variable is  
read-only and I figured it can't be changed through these methods.  
That's why I tried uac_replace_to().


To sum it up, is that variable read-only or not ?




___
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] Changing Domain in To URI

2013-04-05 Thread qmail

Let me also explain a bit what I'm trying to fix through this method.

We have an Asterisk box that forwards call through kamailio to one of  
our carriers. That works great. The calls are being forwarded with a  
To of: 5551112...@kamail1.domain.com  towards our carrier


We also added another kamailio 'load-balancer' (using dispatch module  
) box in the middle of all this to try and eventually load balance the  
calls. So the setup looks like this: Asterisk -> Kamailio Load  
Balancer -> Kamailio gateway -> Carrier. The problem with this setup  
is that now our carrier doesn't accept the calls and returns a 500 -  
Internal error message. The only difference I saw is that the To in  
the packets now look like this:

5551112...@kamail-load-balance.domain.com

I'm thinking the carrier is blocking us based on not recognizing the  
domain part in the URI and that's why I'm trying to change it. Does it  
make sense ?


Quoting qm...@polarismail.com:


Sorry if I repeat myself - I just subscribed properly to the list:


if you don't need to change it back for replies and next requests, try:

$td = "xyz.com";

IIRC, that is available on 3.2.x. If not, either you upgrade or use  
replace functions from textops.


Cheers,
Daniel


Thank you for replying. We tried the direct assignment of  
$td="xyz.com" but the variable doesn't change. We are doing an xlog  
print right after and an ngrep and we confirmed that the domain part  
of the URI doesn't change. I also tried a subst() and it's the same  
problem. I read on the online documentation that the variable is  
read-only and I figured it can't be changed through these methods.  
That's why I tried uac_replace_to().


To sum it up, is that variable read-only or not ?




___
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] mediaproxy-ng Tutorial

2013-04-05 Thread aft
fascinating stuff.
On Apr 5, 2013 6:06 PM, "Richard Fuchs"  wrote:

> On 04/05/13 03:53, Daniel-Constantin Mierla wrote:
>
> > She fallback to user space can happen even during a call? Or is just
> > about when the call is initialized, the application detects is some
> > problem when setting up forwarding rules in the kernel and goes for user
> > space.
>
> It can happen any time. The socket remains open and the daemon continues
> to listen for packets on it. If the daemon receives a packet, it will
> process it, which in the normal case will result in it being forwarded.
> With the kernel module active and working, the daemon will simply not
> see the packets coming in on the socket.
>
> > Indeed, this is kind of general feeling, at least based on theoretical
> > aspects, but I haven't seen any kind of numbers just to compare and see
> > how much is worth to go for kernel forwarding.
>
> I did a very simple test, one pseudo-call (one port in, one port out)
> with about 35,000 UDP packets per second going each way. Each packet had
> 150 bytes payload and the test was done on an 8-core Xeon 2.53 GHz
> machine running kernel 2.6.32. Under this workload, the daemon registers
> with about 90% single-CPU load without kernel forwarding. The daemon is
> multi-threaded and so can use multiple cores, but if it weren't, then it
> would be about maxed out at this point. Averaged over the 8 cores this
> leaves the system around 88% idle. With kernel forwarding enabled,
> system CPU usage drops to >99% idle.
>
> cheers
>
>
> ___
> 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] No RTP between rtpproxy and smartphone application

2013-04-05 Thread aft
check sdp's at all pit stops
On Apr 1, 2013 10:24 PM, " "  wrote:

> Hello,
> I have the following topology.
> Kamailio as SIP Proxy and Asterisk as B2BUA. In Kamailio I use rtpproxy
> for NAT users.
> The problem that I have is the following:
> -When the CSipSimple is registered the first call is always unsuccesfull.
> The following calls are always successful. If the application remains idle
> for a while the next call is unsuccessful again. From traces I saw that 
> everything
> is OK in signaling part.
> -When I try with Zoiper and 3CX I have 1/20 successful calls.
>
> In any case from Asterisk side these calls can be seen as active but no
> media.
>
> Thanx,
> Theo
>
> ___
> 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] sip_capture columns

2013-04-05 Thread Alexandr Dubovikov
Hi,

 

PID_user = P-Asserted-Identity, user part

Proto  = type of protocol (UDP, TCP)

Family = protocol family (IPv6, IPv4)

RTP_stat = X-Rtp-Stat / P-Rtp-stat header

Node = capture node ID

 

Wbr,

Alexandr

 

From: sr-users-boun...@lists.sip-router.org
[mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Grant
Bagdasarian
Sent: Thursday, April 04, 2013 4:58 PM
To: sr-users@lists.sip-router.org
Subject: [SR-Users] sip_capture columns

 

Hello,

 

I couldn't find any documentation on what the table columns of the
sip_capture module are used for. Most of them are straightforward, but I
still don't know what the following columns mean and what values to expect:

-  PID_user

-  Proto

-  Family

-  Rtp_stat

-  Type

-  Node

 

Type has for example values 1 and 2. Im guessing 1 is for requests and 2 is
for responses.

 

I hope someone could clear this out for me.

 

Thanks,

 

Grant

___
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] Changing Domain in To URI

2013-04-05 Thread Vitaliy Aleksandrov

http://kamailio.org/docs/modules/3.2.x/modules_k/textops.html#id2495808
I use this subst("/^To:.*$/To: $var(new_to)\r/i") where $var(new_to) is 
a new value of the "To" header and it works fine on kamailio-3.2.4



Sorry if I repeat myself - I just subscribed properly to the list:


if you don't need to change it back for replies and next requests, try:

$td = "xyz.com";

IIRC, that is available on 3.2.x. If not, either you upgrade or use 
replace functions from textops.


Cheers,
Daniel


Thank you for replying. We tried the direct assignment of 
$td="xyz.com" but the variable doesn't change. We are doing an xlog 
print right after and an ngrep and we confirmed that the domain part 
of the URI doesn't change. I also tried a subst() and it's the same 
problem. I read on the online documentation that the variable is 
read-only and I figured it can't be changed through these methods. 
That's why I tried uac_replace_to().


To sum it up, is that variable read-only or not ?




___
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] Changing Domain in To URI

2013-04-05 Thread Daniel-Constantin Mierla
Changes are not immediately visible, this is the internal design from 
the time of SER back in 2001 -- I made a FAQ entry with more details:


- 
http://www.kamailio.org/wiki/tutorials/faq/main#why_changes_made_to_headers_or


In short, you have to use msg_apply_changes() function after changing 
headers.


Cheers,
Daniel

On 4/5/13 10:35 PM, Vitaliy Aleksandrov wrote:

http://kamailio.org/docs/modules/3.2.x/modules_k/textops.html#id2495808
I use this subst("/^To:.*$/To: $var(new_to)\r/i") where $var(new_to) 
is a new value of the "To" header and it works fine on kamailio-3.2.4



Sorry if I repeat myself - I just subscribed properly to the list:


if you don't need to change it back for replies and next requests, try:

$td = "xyz.com";

IIRC, that is available on 3.2.x. If not, either you upgrade or use 
replace functions from textops.


Cheers,
Daniel


Thank you for replying. We tried the direct assignment of 
$td="xyz.com" but the variable doesn't change. We are doing an xlog 
print right after and an ngrep and we confirmed that the domain part 
of the URI doesn't change. I also tried a subst() and it's the same 
problem. I read on the online documentation that the variable is 
read-only and I figured it can't be changed through these methods. 
That's why I tried uac_replace_to().


To sum it up, is that variable read-only or not ?




___
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://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
 - http://conference.kamailio.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] Changing Domain in To URI

2013-04-05 Thread qmail

Mersi mult Daniel! It worked but unfortunately it didn't fix the issue.

As I mentioned previously the original setup is like this:

Asterisk -> Kamailio gateway -> carrier. All calls go through just fine

The new setup we are trying is:

Asterisk -> Kamailio load balancer ( dispatch module ) -> Kamailio  
gateway -> carrier


With this setup the calls come back from the carrier with 500 - Internal error

I've looked at the SIP packets in both cases and they look similar.  
The only difference is that when going through the load balancer the  
To is different ( fixed now ) and it has 3 more VIA lines in the  
header. Where can I start looking at what's causing this ?


Thank you!

Quoting Daniel-Constantin Mierla :

Changes are not immediately visible, this is the internal design  
from the time of SER back in 2001 -- I made a FAQ entry with more  
details:


-  
http://www.kamailio.org/wiki/tutorials/faq/main#why_changes_made_to_headers_or


In short, you have to use msg_apply_changes() function after  
changing headers.


Cheers,
Daniel

On 4/5/13 10:35 PM, Vitaliy Aleksandrov wrote:

http://kamailio.org/docs/modules/3.2.x/modules_k/textops.html#id2495808
I use this subst("/^To:.*$/To: $var(new_to)\r/i") where  
$var(new_to) is a new value of the "To" header and it works fine on  
kamailio-3.2.4



Sorry if I repeat myself - I just subscribed properly to the list:


if you don't need to change it back for replies and next requests, try:

$td = "xyz.com";

IIRC, that is available on 3.2.x. If not, either you upgrade or  
use replace functions from textops.


Cheers,
Daniel


Thank you for replying. We tried the direct assignment of  
$td="xyz.com" but the variable doesn't change. We are doing an  
xlog print right after and an ngrep and we confirmed that the  
domain part of the URI doesn't change. I also tried a subst() and  
it's the same problem. I read on the online documentation that the  
variable is read-only and I figured it can't be changed through  
these methods. That's why I tried uac_replace_to().


To sum it up, is that variable read-only or not ?




___
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://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
 - http://conference.kamailio.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