listing branches, strange behaviour

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

listing branches, strange behaviour

Stanisław Pitucha
Hi,
I've noticed today some strange behaviour with branches in routing
SUBSCRIBE packets. I'm running a setup like this:

phone -> proxy (opensips 1.5.3) -> presence server (opensips 1.6.0)

The first packet goes through without any problems, presence server
returns 200/ok, proxy does record_route().
The next SUBSCRIBE request is supposed to refresh the watcher entry. It
is sent only once from phone (no retransmissions), hits the proxy, which
does some message checks (no modifications). From the stuff that
"matters", I run loose_route(), t_check_trans(), record_route(),
t_relay() on it.
The problem is that I get 2 branches to the presence server at this point.
I put xlog("branches: $(branch(uri)[*])\n") just before the t_relay(),
but the value seems to be "<null>". What's going on here? What can I be
doing wrong?

(first message doesn't create branches and is sent once only)

Thanks,
Stan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: listing branches, strange behaviour

Bogdan-Andrei Iancu
Hi Stan,

first I would check if the 2 SUBSCRIBES you get on the PA are
retransmissions or branches - check if the top most vias are exactly the
same (especially the last digit in the via branch param)

Regards,
Bogdan

Stanisław Pitucha wrote:

> Hi,
> I've noticed today some strange behaviour with branches in routing
> SUBSCRIBE packets. I'm running a setup like this:
>
> phone -> proxy (opensips 1.5.3) -> presence server (opensips 1.6.0)
>
> The first packet goes through without any problems, presence server
> returns 200/ok, proxy does record_route().
> The next SUBSCRIBE request is supposed to refresh the watcher entry. It
> is sent only once from phone (no retransmissions), hits the proxy, which
> does some message checks (no modifications). From the stuff that
> "matters", I run loose_route(), t_check_trans(), record_route(),
> t_relay() on it.
> The problem is that I get 2 branches to the presence server at this point.
> I put xlog("branches: $(branch(uri)[*])\n") just before the t_relay(),
> but the value seems to be "<null>". What's going on here? What can I be
> doing wrong?
>
> (first message doesn't create branches and is sent once only)
>
> Thanks,
> Stan
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  


--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: listing branches, strange behaviour

Stanisław Pitucha
On 25 February 2010 14:01, Bogdan-Andrei Iancu <[hidden email]> wrote:
> Hi Stan,
>
> first I would check if the 2 SUBSCRIBES you get on the PA are
> retransmissions or branches - check if the top most vias are exactly the
> same (especially the last digit in the via branch param)

They are branches - there's only one branch incoming, but proxy
forwards the message with XXX.0 and XXX.1 branches.

--
KTHXBYE,

Stanisław Pitucha, Gradwell Voip Engineer

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: listing branches, strange behaviour

Bogdan-Andrei Iancu
and printing the $(branch(uri)[*]) just before the t_relay shows
anything (a branch extra to RURI) ?

Regards,
Bogdan

Stanisław Pitucha wrote:

> On 25 February 2010 14:01, Bogdan-Andrei Iancu <[hidden email]> wrote:
>  
>> Hi Stan,
>>
>> first I would check if the 2 SUBSCRIBES you get on the PA are
>> retransmissions or branches - check if the top most vias are exactly the
>> same (especially the last digit in the via branch param)
>>    
>
> They are branches - there's only one branch incoming, but proxy
> forwards the message with XXX.0 and XXX.1 branches.
>
>  


--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: listing branches, strange behaviour

Stanisław Pitucha
On 25.02.2010 14:47, Bogdan-Andrei Iancu wrote:
> and printing the $(branch(uri)[*]) just before the t_relay shows
> anything (a branch extra to RURI) ?

I have this in my config now:

--->8---
                } else if(is_method("SUBSCRIBE")) {
xlog("L_ERR", "subscribe branches1: $(branch(uri)[*])\n");
                        t_check_trans();
                        record_route();
xlog("L_ERR", "subscribe branches2: $(branch(uri)[*])\n");
                        t_relay();
--->8---

In the log I get:
--->8---
subscribe branches1: <null>
subscribe branches2: <null>
--->8---

But still - two messages with different branches are sent.

I'm ok with doing some debugging, but tbh I'm not sure where to look for
the branch behaviour. Is there any obvious place to start poking around?

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: listing branches, strange behaviour

Bogdan-Andrei Iancu
In this case is the destination given as IP ? (just to rule out the DNS
based failover)

also, in the trace, do you see any time difference between the 2
branches? (just to rule out normal failover)

in code, check the t_forward_nonack() from modules/tm/t_fwd.c - line
633, it iterates to add the branches.

Also try to add a branch_route() just to print something and see that
multiple branches are sent out.

Regards,
Bogdan

Stanisław Pitucha wrote:

> On 25.02.2010 14:47, Bogdan-Andrei Iancu wrote:
>  
>> and printing the $(branch(uri)[*]) just before the t_relay shows
>> anything (a branch extra to RURI) ?
>>    
>
> I have this in my config now:
>
> --->8---
>                 } else if(is_method("SUBSCRIBE")) {
> xlog("L_ERR", "subscribe branches1: $(branch(uri)[*])\n");
>                         t_check_trans();
>                         record_route();
> xlog("L_ERR", "subscribe branches2: $(branch(uri)[*])\n");
>                         t_relay();
> --->8---
>
> In the log I get:
> --->8---
> subscribe branches1: <null>
> subscribe branches2: <null>
> --->8---
>
> But still - two messages with different branches are sent.
>
> I'm ok with doing some debugging, but tbh I'm not sure where to look for
> the branch behaviour. Is there any obvious place to start poking around?
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  


--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users