loose_route: loop on ACK requests

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

loose_route: loop on ACK requests

Noel R. Morais
Hi guys,

I'm having problems about loose_route(). Opensips is routing ACK
requests to itself.

I know that posting code and traces are ugly, but I think I do not
have choices. Sorry.

Follow bellow the code regarding loose_route:
if (has_totag()) {
                if (loose_route()) {
                        if(method=="INVITE") {
                                route(5); #Check authentication of re-invites
                        }
                        route(1);
                } else {
                        if ( is_method("ACK") ) {
                                if ( t_check_trans() ) {
                                        route(1);
                                }
                }
        }
}


Follow bellow the trace, 192.168.191.188 is the opensips ip address:
U 2009/03/11 14:46:53.950565 192.168.191.188:5060 -> 192.168.192.233:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac74079177.
Contact: <sip:XXXXXXXXX@192.168.193.20:5060>.
Record-Route: <sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2>.
Call-ID: 74077637112200051548@192.168.192.233.
From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
To: <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
CSeq: 1 INVITE.
Server: Cantata-SIP/10.3.2.51932 IMG 0.
Allow: INVITE, BYE, REGISTER, ACK, OPTIONS, CANCEL, INFO.
Supported: path.
Accept: application/sdp.
Content-Type: application/sdp.
Content-Length: 236.
.
v=0.
o=Cantata_SDP 0 1 IN IP4 192.168.193.20.
s=Cantata-SIP.
c=IN IP4 192.168.193.21.
t=0 0.
m=audio 8944 RTP/AVP 18 101.
a=rtpmap:18 G729/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=silenceSupp:off - - - -.
a=ptime:20.


U 2009/03/11 14:46:53.997019 192.168.192.233:5060 -> 192.168.191.188:5060
ACK sip:XXXXXXXXX@192.168.193.20:5060 SIP/2.0.
Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac82192814.
Max-Forwards: 70.
From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
To: <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
Call-ID: 74077637112200051548@192.168.192.233.
CSeq: 1 ACK.
Contact: <sip:YYYYYYYYYY@192.168.192.233>.
Route: <sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2>.
Supported: em,timer,replaces,path.
Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE.
User-Agent: Audiocodes-Sip-Gateway-MP-102 FXS/v.4.60A.035.001.
Content-Length: 0.
.


U 2009/03/11 14:46:53.998178 192.168.191.188:5060 -> 192.168.191.188:5060
ACK sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2 SIP/2.0.
Record-Route: <sip:192.168.191.188;lr=on;ftag=1c74077990>.
Via: SIP/2.0/UDP 192.168.191.188;branch=z9hG4bKef17.5d8b81f4.2.
Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac82192814.
Max-Forwards: 69.
From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
To: <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
Call-ID: 74077637112200051548@192.168.192.233.
CSeq: 1 ACK.
Supported: em,timer,replaces,path.
Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE.
User-Agent: Audiocodes-Sip-Gateway-MP-102 FXS/v.4.60A.035.001.
Content-Length: 0.

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

Re: loose_route: loop on ACK requests

Vasil Kolev
В 14:57 -0300 на 11.03.2009 (ср), Noel R. Morais написа:
> Hi guys,
>
> I'm having problems about loose_route(). Opensips is routing ACK
> requests to itself.
>
> I know that posting code and traces are ugly, but I think I do not
> have choices. Sorry.
>

Hm. After a month of reading you'll start to love them, trust me on
that :)


Anyway, from the log it seems you're relaying the ACK to you. What does
route(1) do, e.g. you probably need to show that block too...

Also, there was something that made the transaction to just eat up the
ACK, but I can't remember it right now, probably that's what you're
looking for in this case (or if not, you'll have to draw a picture on
what you're trying to accomplish :) )


> Follow bellow the code regarding loose_route:
> if (has_totag()) {
>                 if (loose_route()) {
>                         if(method=="INVITE") {
>                                 route(5); #Check authentication of re-invites
>                         }
>                         route(1);
>                 } else {
>                         if ( is_method("ACK") ) {
>                                 if ( t_check_trans() ) {
>                                         route(1);
>                                 }
>                 }
>         }
> }
>
>
> Follow bellow the trace, 192.168.191.188 is the opensips ip address:
> U 2009/03/11 14:46:53.950565 192.168.191.188:5060 -> 192.168.192.233:5060
> SIP/2.0 200 OK.
> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac74079177.
> Contact: <sip:XXXXXXXXX@192.168.193.20:5060>.
> Record-Route: <sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2>.
> Call-ID: 74077637112200051548@192.168.192.233.
> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
> To: <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
> CSeq: 1 INVITE.
> Server: Cantata-SIP/10.3.2.51932 IMG 0.
> Allow: INVITE, BYE, REGISTER, ACK, OPTIONS, CANCEL, INFO.
> Supported: path.
> Accept: application/sdp.
> Content-Type: application/sdp.
> Content-Length: 236.
> .
> v=0.
> o=Cantata_SDP 0 1 IN IP4 192.168.193.20.
> s=Cantata-SIP.
> c=IN IP4 192.168.193.21.
> t=0 0.
> m=audio 8944 RTP/AVP 18 101.
> a=rtpmap:18 G729/8000.
> a=rtpmap:101 telephone-event/8000.
> a=fmtp:101 0-15.
> a=silenceSupp:off - - - -.
> a=ptime:20.
>
>
> U 2009/03/11 14:46:53.997019 192.168.192.233:5060 -> 192.168.191.188:5060
> ACK sip:XXXXXXXXX@192.168.193.20:5060 SIP/2.0.
> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac82192814.
> Max-Forwards: 70.
> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
> To: <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
> Call-ID: 74077637112200051548@192.168.192.233.
> CSeq: 1 ACK.
> Contact: <sip:YYYYYYYYYY@192.168.192.233>.
> Route: <sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2>.
> Supported: em,timer,replaces,path.
> Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE.
> User-Agent: Audiocodes-Sip-Gateway-MP-102 FXS/v.4.60A.035.001.
> Content-Length: 0.
> .
>
>
> U 2009/03/11 14:46:53.998178 192.168.191.188:5060 -> 192.168.191.188:5060
> ACK sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2 SIP/2.0.
> Record-Route: <sip:192.168.191.188;lr=on;ftag=1c74077990>.
> Via: SIP/2.0/UDP 192.168.191.188;branch=z9hG4bKef17.5d8b81f4.2.
> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac82192814.
> Max-Forwards: 69.
> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
> To: <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
> Call-ID: 74077637112200051548@192.168.192.233.
> CSeq: 1 ACK.
> Supported: em,timer,replaces,path.
> Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE.
> User-Agent: Audiocodes-Sip-Gateway-MP-102 FXS/v.4.60A.035.001.
> Content-Length: 0.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Regards,
Vasil Kolev
Attractel NV
dCAP #1324, LPIC2


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

Re: loose_route: loop on ACK requests

Noel R. Morais
Sorry.

I forgot the route(1). Follow bellow:
route[1] {
        if (!t_relay()) {
                sl_reply_error();
        };
        exit;
}

I think that my problem is regarding the loose_route() function. I
just don't know why it doesn't "realize" that the Route: header is to
itself. :(

Thanks,


Noel

On Wed, Mar 11, 2009 at 7:21 PM, Vasil Kolev <[hidden email]> wrote:

> В 14:57 -0300 на 11.03.2009 (ср), Noel R. Morais написа:
>> Hi guys,
>>
>> I'm having problems about loose_route(). Opensips is routing ACK
>> requests to itself.
>>
>> I know that posting code and traces are ugly, but I think I do not
>> have choices. Sorry.
>>
>
> Hm. After a month of reading you'll start to love them, trust me on
> that :)
>
>
> Anyway, from the log it seems you're relaying the ACK to you. What does
> route(1) do, e.g. you probably need to show that block too...
>
> Also, there was something that made the transaction to just eat up the
> ACK, but I can't remember it right now, probably that's what you're
> looking for in this case (or if not, you'll have to draw a picture on
> what you're trying to accomplish :) )
>
>
>> Follow bellow the code regarding loose_route:
>> if (has_totag()) {
>>                 if (loose_route()) {
>>                         if(method=="INVITE") {
>>                                 route(5); #Check authentication of re-invites
>>                         }
>>                         route(1);
>>                 } else {
>>                         if ( is_method("ACK") ) {
>>                                 if ( t_check_trans() ) {
>>                                         route(1);
>>                                 }
>>                 }
>>         }
>> }
>>
>>
>> Follow bellow the trace, 192.168.191.188 is the opensips ip address:
>> U 2009/03/11 14:46:53.950565 192.168.191.188:5060 -> 192.168.192.233:5060
>> SIP/2.0 200 OK.
>> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac74079177.
>> Contact: <sip:XXXXXXXXX@192.168.193.20:5060>.
>> Record-Route: <sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2>.
>> Call-ID: 74077637112200051548@192.168.192.233.
>> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
>> To: <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
>> CSeq: 1 INVITE.
>> Server: Cantata-SIP/10.3.2.51932 IMG 0.
>> Allow: INVITE, BYE, REGISTER, ACK, OPTIONS, CANCEL, INFO.
>> Supported: path.
>> Accept: application/sdp.
>> Content-Type: application/sdp.
>> Content-Length: 236.
>> .
>> v=0.
>> o=Cantata_SDP 0 1 IN IP4 192.168.193.20.
>> s=Cantata-SIP.
>> c=IN IP4 192.168.193.21.
>> t=0 0.
>> m=audio 8944 RTP/AVP 18 101.
>> a=rtpmap:18 G729/8000.
>> a=rtpmap:101 telephone-event/8000.
>> a=fmtp:101 0-15.
>> a=silenceSupp:off - - - -.
>> a=ptime:20.
>>
>>
>> U 2009/03/11 14:46:53.997019 192.168.192.233:5060 -> 192.168.191.188:5060
>> ACK sip:XXXXXXXXX@192.168.193.20:5060 SIP/2.0.
>> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac82192814.
>> Max-Forwards: 70.
>> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
>> To: <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
>> Call-ID: 74077637112200051548@192.168.192.233.
>> CSeq: 1 ACK.
>> Contact: <sip:YYYYYYYYYY@192.168.192.233>.
>> Route: <sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2>.
>> Supported: em,timer,replaces,path.
>> Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE.
>> User-Agent: Audiocodes-Sip-Gateway-MP-102 FXS/v.4.60A.035.001.
>> Content-Length: 0.
>> .
>>
>>
>> U 2009/03/11 14:46:53.998178 192.168.191.188:5060 -> 192.168.191.188:5060
>> ACK sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2 SIP/2.0.
>> Record-Route: <sip:192.168.191.188;lr=on;ftag=1c74077990>.
>> Via: SIP/2.0/UDP 192.168.191.188;branch=z9hG4bKef17.5d8b81f4.2.
>> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac82192814.
>> Max-Forwards: 69.
>> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
>> To: <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
>> Call-ID: 74077637112200051548@192.168.192.233.
>> CSeq: 1 ACK.
>> Supported: em,timer,replaces,path.
>> Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE.
>> User-Agent: Audiocodes-Sip-Gateway-MP-102 FXS/v.4.60A.035.001.
>> Content-Length: 0.
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> --
> Regards,
> Vasil Kolev
> Attractel NV
> dCAP #1324, LPIC2
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

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

Re: loose_route: loop on ACK requests

Noel R. Morais
Nobody have had this kind of problem? Of a ACK message being routed to
itself? :(

On Wed, Mar 11, 2009 at 7:53 PM, Noel R. Morais <[hidden email]> wrote:

> Sorry.
>
> I forgot the route(1). Follow bellow:
> route[1] {
>        if (!t_relay()) {
>                sl_reply_error();
>        };
>        exit;
> }
>
> I think that my problem is regarding the loose_route() function. I
> just don't know why it doesn't "realize" that the Route: header is to
> itself. :(
>
> Thanks,
>
>
> Noel
>
> On Wed, Mar 11, 2009 at 7:21 PM, Vasil Kolev <[hidden email]> wrote:
>> В 14:57 -0300 на 11.03.2009 (ср), Noel R. Morais написа:
>>> Hi guys,
>>>
>>> I'm having problems about loose_route(). Opensips is routing ACK
>>> requests to itself.
>>>
>>> I know that posting code and traces are ugly, but I think I do not
>>> have choices. Sorry.
>>>
>>
>> Hm. After a month of reading you'll start to love them, trust me on
>> that :)
>>
>>
>> Anyway, from the log it seems you're relaying the ACK to you. What does
>> route(1) do, e.g. you probably need to show that block too...
>>
>> Also, there was something that made the transaction to just eat up the
>> ACK, but I can't remember it right now, probably that's what you're
>> looking for in this case (or if not, you'll have to draw a picture on
>> what you're trying to accomplish :) )
>>
>>
>>> Follow bellow the code regarding loose_route:
>>> if (has_totag()) {
>>>                 if (loose_route()) {
>>>                         if(method=="INVITE") {
>>>                                 route(5); #Check authentication of re-invites
>>>                         }
>>>                         route(1);
>>>                 } else {
>>>                         if ( is_method("ACK") ) {
>>>                                 if ( t_check_trans() ) {
>>>                                         route(1);
>>>                                 }
>>>                 }
>>>         }
>>> }
>>>
>>>
>>> Follow bellow the trace, 192.168.191.188 is the opensips ip address:
>>> U 2009/03/11 14:46:53.950565 192.168.191.188:5060 -> 192.168.192.233:5060
>>> SIP/2.0 200 OK.
>>> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac74079177.
>>> Contact: <sip:XXXXXXXXX@192.168.193.20:5060>.
>>> Record-Route: <sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2>.
>>> Call-ID: 74077637112200051548@192.168.192.233.
>>> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
>>> To: <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
>>> CSeq: 1 INVITE.
>>> Server: Cantata-SIP/10.3.2.51932 IMG 0.
>>> Allow: INVITE, BYE, REGISTER, ACK, OPTIONS, CANCEL, INFO.
>>> Supported: path.
>>> Accept: application/sdp.
>>> Content-Type: application/sdp.
>>> Content-Length: 236.
>>> .
>>> v=0.
>>> o=Cantata_SDP 0 1 IN IP4 192.168.193.20.
>>> s=Cantata-SIP.
>>> c=IN IP4 192.168.193.21.
>>> t=0 0.
>>> m=audio 8944 RTP/AVP 18 101.
>>> a=rtpmap:18 G729/8000.
>>> a=rtpmap:101 telephone-event/8000.
>>> a=fmtp:101 0-15.
>>> a=silenceSupp:off - - - -.
>>> a=ptime:20.
>>>
>>>
>>> U 2009/03/11 14:46:53.997019 192.168.192.233:5060 -> 192.168.191.188:5060
>>> ACK sip:XXXXXXXXX@192.168.193.20:5060 SIP/2.0.
>>> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac82192814.
>>> Max-Forwards: 70.
>>> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
>>> To: <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
>>> Call-ID: 74077637112200051548@192.168.192.233.
>>> CSeq: 1 ACK.
>>> Contact: <sip:YYYYYYYYYY@192.168.192.233>.
>>> Route: <sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2>.
>>> Supported: em,timer,replaces,path.
>>> Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE.
>>> User-Agent: Audiocodes-Sip-Gateway-MP-102 FXS/v.4.60A.035.001.
>>> Content-Length: 0.
>>> .
>>>
>>>
>>> U 2009/03/11 14:46:53.998178 192.168.191.188:5060 -> 192.168.191.188:5060
>>> ACK sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2 SIP/2.0.
>>> Record-Route: <sip:192.168.191.188;lr=on;ftag=1c74077990>.
>>> Via: SIP/2.0/UDP 192.168.191.188;branch=z9hG4bKef17.5d8b81f4.2.
>>> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac82192814.
>>> Max-Forwards: 69.
>>> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
>>> To: <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
>>> Call-ID: 74077637112200051548@192.168.192.233.
>>> CSeq: 1 ACK.
>>> Supported: em,timer,replaces,path.
>>> Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE.
>>> User-Agent: Audiocodes-Sip-Gateway-MP-102 FXS/v.4.60A.035.001.
>>> Content-Length: 0.
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> --
>> Regards,
>> Vasil Kolev
>> Attractel NV
>> dCAP #1324, LPIC2
>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>

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

Re: loose_route: loop on ACK requests

Robert Dyck
Very peculiar. The RURI was rewritten with the URI in the Route header. Does
your script rewrite it? This usually only happens when the route set shows a
next hop and the next hop is a strict router. If loose routing is in effect
all the way, the RURI does not change.

On Thursday 12 March 2009, Noel R. Morais wrote:

> Nobody have had this kind of problem? Of a ACK message being routed to
> itself? :(
>
> On Wed, Mar 11, 2009 at 7:53 PM, Noel R. Morais <[hidden email]> wrote:
> > Sorry.
> >
> > I forgot the route(1). Follow bellow:
> > route[1] {
> >        if (!t_relay()) {
> >                sl_reply_error();
> >        };
> >        exit;
> > }
> >
> > I think that my problem is regarding the loose_route() function. I
> > just don't know why it doesn't "realize" that the Route: header is to
> > itself. :(
> >
> > Thanks,
> >
> >
> > Noel
> >
> > On Wed, Mar 11, 2009 at 7:21 PM, Vasil Kolev <[hidden email]>
wrote:

> >> В 14:57 -0300 на 11.03.2009 (ср), Noel R. Morais написа:
> >>> Hi guys,
> >>>
> >>> I'm having problems about loose_route(). Opensips is routing ACK
> >>> requests to itself.
> >>>
> >>> I know that posting code and traces are ugly, but I think I do not
> >>> have choices. Sorry.
> >>
> >> Hm. After a month of reading you'll start to love them, trust me on
> >> that :)
> >>
> >>
> >> Anyway, from the log it seems you're relaying the ACK to you. What does
> >> route(1) do, e.g. you probably need to show that block too...
> >>
> >> Also, there was something that made the transaction to just eat up the
> >> ACK, but I can't remember it right now, probably that's what you're
> >> looking for in this case (or if not, you'll have to draw a picture on
> >> what you're trying to accomplish :) )
> >>
> >>> Follow bellow the code regarding loose_route:
> >>> if (has_totag()) {
> >>>                 if (loose_route()) {
> >>>                         if(method=="INVITE") {
> >>>                                 route(5); #Check authentication of
> >>> re-invites }
> >>>                         route(1);
> >>>                 } else {
> >>>                         if ( is_method("ACK") ) {
> >>>                                 if ( t_check_trans() ) {
> >>>                                         route(1);
> >>>                                 }
> >>>                 }
> >>>         }
> >>> }
> >>>
> >>>
> >>> Follow bellow the trace, 192.168.191.188 is the opensips ip address:
> >>> U 2009/03/11 14:46:53.950565 192.168.191.188:5060 ->
> >>> 192.168.192.233:5060 SIP/2.0 200 OK.
> >>> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac74079177.
> >>> Contact: <sip:XXXXXXXXX@192.168.193.20:5060>.
> >>> Record-Route:
> >>> <sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2>. Call-ID:
> >>> 74077637112200051548@192.168.192.233.
> >>> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
> >>> To:
> >>> <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a
> >>>785a9c8469ec. CSeq: 1 INVITE.
> >>> Server: Cantata-SIP/10.3.2.51932 IMG 0.
> >>> Allow: INVITE, BYE, REGISTER, ACK, OPTIONS, CANCEL, INFO.
> >>> Supported: path.
> >>> Accept: application/sdp.
> >>> Content-Type: application/sdp.
> >>> Content-Length: 236.
> >>> .
> >>> v=0.
> >>> o=Cantata_SDP 0 1 IN IP4 192.168.193.20.
> >>> s=Cantata-SIP.
> >>> c=IN IP4 192.168.193.21.
> >>> t=0 0.
> >>> m=audio 8944 RTP/AVP 18 101.
> >>> a=rtpmap:18 G729/8000.
> >>> a=rtpmap:101 telephone-event/8000.
> >>> a=fmtp:101 0-15.
> >>> a=silenceSupp:off - - - -.
> >>> a=ptime:20.
> >>>
> >>>
> >>> U 2009/03/11 14:46:53.997019 192.168.192.233:5060 ->
> >>> 192.168.191.188:5060 ACK sip:XXXXXXXXX@192.168.193.20:5060 SIP/2.0.
> >>> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac82192814.
> >>> Max-Forwards: 70.
> >>> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
> >>> To:
> >>> <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a
> >>>785a9c8469ec. Call-ID: 74077637112200051548@192.168.192.233.
> >>> CSeq: 1 ACK.
> >>> Contact: <sip:YYYYYYYYYY@192.168.192.233>.
> >>> Route: <sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2>.
> >>> Supported: em,timer,replaces,path.
> >>> Allow:
> >>> REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIB
> >>>E,UPDATE. User-Agent: Audiocodes-Sip-Gateway-MP-102 FXS/v.4.60A.035.001.
> >>> Content-Length: 0.
> >>> .
> >>>
> >>>
> >>> U 2009/03/11 14:46:53.998178 192.168.191.188:5060 ->
> >>> 192.168.191.188:5060 ACK
> >>> sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2 SIP/2.0.
> >>> Record-Route: <sip:192.168.191.188;lr=on;ftag=1c74077990>.
> >>> Via: SIP/2.0/UDP 192.168.191.188;branch=z9hG4bKef17.5d8b81f4.2.
> >>> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac82192814.
> >>> Max-Forwards: 69.
> >>> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
> >>> To:
> >>> <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a
> >>>785a9c8469ec. Call-ID: 74077637112200051548@192.168.192.233.
> >>> CSeq: 1 ACK.
> >>> Supported: em,timer,replaces,path.
> >>> Allow:
> >>> REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIB
> >>>E,UPDATE. User-Agent: Audiocodes-Sip-Gateway-MP-102 FXS/v.4.60A.035.001.
> >>> Content-Length: 0.
> >>>
> >>> _______________________________________________
> >>> Users mailing list
> >>> [hidden email]
> >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >>
> >> --
> >> Regards,
> >> Vasil Kolev
> >> Attractel NV
> >> dCAP #1324, LPIC2
> >>
> >>
> >> _______________________________________________
> >> Users mailing list
> >> [hidden email]
> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



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

Re: loose_route: loop on ACK requests

Noel R. Morais
Robert, you are right.

I'm using loose routing all the way but for some reason the
loose_route function for the ACK is acting as a strict router.

follow bellow the debug code regarding this ACK. 192.168.191.188 is
the opensips ip address:


Mar 16 17:18:00 openser opensips[9057]: ***BEFORE loose_route: ACK
ruri:[sip:6715551131062860@192.168.193.20:5060]
from:[sip:551135880091@192.168.193.20]
to:[sip:6715551131062860@192.168.191.188;user=phone]
Mar 16 17:18:00 openser opensips[9057]: DBG:core:parse_headers: flags=200
Mar 16 17:18:00 openser opensips[9057]: params (0x81a7a00, 36), called
from parser/parse_rr.c: do_parse_rr_body(63)
Mar 16 17:18:00 openser opensips[9057]: params (0x81a7a00, 36),
returns address 0x81f4a14 frag. 0x81f49fc (size=44) on 1 -th hit
Mar 16 17:18:00 openser opensips[9057]: DBG:rr:is_preloaded: is_preloaded: No
Mar 16 17:18:00 openser opensips[9057]: DBG:core:grep_sock_info:
checking if host==us: 14==15 &&  [192.168.193.20] == [192.168.191.188]
Mar 16 17:18:00 openser opensips[9057]: DBG:core:grep_sock_info:
checking if port 5060 matches port 5060
Mar 16 17:18:00 openser opensips[9057]: DBG:rr:after_strict: Next hop:
'sip:192.168.191.188;lr=on;ftag=1c1682753440;did=043.0c936ea3' is
loose router
Mar 16 17:18:00 openser opensips[9057]: params (0x81a7a00, 60), called
from parser/msg_parser.c: set_dst_uri(738)
Mar 16 17:18:00 openser opensips[9057]: params (0x81a7a00, 60),
returns address 0x81f3b48 frag. 0x81f3b30 (size=68) on 1 -th hit
Mar 16 17:18:00 openser opensips[9057]: DBG:core:parse_headers:
flags=ffffffffffffffff
Mar 16 17:18:00 openser opensips[9057]: params (0x81a7a00, 60), called
from parser/msg_parser.c: set_ruri(705)
Mar 16 17:18:00 openser opensips[9057]: params (0x81a7a00, 60),
returns address 0x81f4ba0 frag. 0x81f4b88 (size=72) on 1 -th hit
Mar 16 17:18:00 openser opensips[9057]: DBG:rr:after_strict: The last
route URI: 'sip:192.168.191.188;lr=on;ftag=1c1682753440;did=043.0c936ea3'
Mar 16 17:18:00 openser opensips[9057]: params (0x81a7a00, 32), called
from data_lump.c: del_lump(298)
Mar 16 17:18:00 openser opensips[9057]: params (0x81a7a00, 32),
returns address 0x81f3ae8 frag. 0x81f3ad0 (size=48) on 1 -th hit
Mar 16 17:18:00 openser opensips[9057]: DBG:rr:run_rr_callbacks:
callback id 1 entered with <>
Mar 16 17:18:00 openser opensips[9057]: DBG:core:parse_headers: flags=48
Mar 16 17:18:00 openser opensips[9057]: DBG:rr:run_rr_callbacks:
callback id 0 entered with <>
Mar 16 17:18:00 openser opensips[9057]: DBG:uac:restore_from: getting
'vsf' Route param
Mar 16 17:18:00 openser opensips[9057]: DBG:uac:restore_from: route
param 'vsf' not found
Mar 16 17:18:00 openser opensips[9057]: ***AFTER loose_route=TRUE: ACK
ruri:[sip:192.168.191.188;lr=on;ftag=1c1682753440;did=043.0c936ea3]
from:[sip:551135880091@192.168.193.20]
to:[sip:6715551131062860@192.168.191.188;user=phone]


On Fri, Mar 13, 2009 at 2:27 AM, Robert Dyck <[hidden email]> wrote:
> Very peculiar. The RURI was rewritten with the URI in the Route header. Does
> your script rewrite it? This usually only happens when the route set shows a
> next hop and the next hop is a strict router. If loose routing is in effect
> all the way, the RURI does not change.
>

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

Re: loose_route: loop on ACK requests

Noel R. Morais
No, it doesn't appear :(

for some reason the code

modules/rr/loose.c linha 905:
 if (is_myself(&_m->parsed_uri.host, _m->parsed_uri.port_no))

returns true and it acts as a strict router but it is a loose route :(

I'm crazy here, tree days trying to find a solution without success .....

Thanks

On Mon, Mar 16, 2009 at 10:29 PM, Robert Dyck <[hidden email]> wrote:

> Does "rewriting Request-URI with blahblah" appear anywhere in your debug?
> This would be the output from the rewrite_uri function in dset.c file.
>
> On Monday 16 March 2009, you wrote:
>> Robert, you are right.
>>
>> I'm using loose routing all the way but for some reason the
>> loose_route function for the ACK is acting as a strict router.
>>
>> follow bellow the debug code regarding this ACK. 192.168.191.188 is
>> the opensips ip address:
>>
>>
>> Mar 16 17:18:00 openser opensips[9057]: ***BEFORE loose_route: ACK
>> ruri:[sip:6715551131062860@192.168.193.20:5060]
>> from:[sip:551135880091@192.168.193.20]
>> to:[sip:6715551131062860@192.168.191.188;user=phone]
>> Mar 16 17:18:00 openser opensips[9057]: DBG:core:parse_headers: flags=200
>> Mar 16 17:18:00 openser opensips[9057]: params (0x81a7a00, 36), called
>> from parser/parse_rr.c: do_parse_rr_body(63)
>> Mar 16 17:18:00 openser opensips[9057]: params (0x81a7a00, 36),
>> returns address 0x81f4a14 frag. 0x81f49fc (size=44) on 1 -th hit
>> Mar 16 17:18:00 openser opensips[9057]: DBG:rr:is_preloaded: is_preloaded:
>> No Mar 16 17:18:00 openser opensips[9057]: DBG:core:grep_sock_info:
>> checking if host==us: 14==15 &&  [192.168.193.20] == [192.168.191.188]
>> Mar 16 17:18:00 openser opensips[9057]: DBG:core:grep_sock_info:
>> checking if port 5060 matches port 5060
>> Mar 16 17:18:00 openser opensips[9057]: DBG:rr:after_strict: Next hop:
>> 'sip:192.168.191.188;lr=on;ftag=1c1682753440;did=043.0c936ea3' is
>> loose router
>> Mar 16 17:18:00 openser opensips[9057]: params (0x81a7a00, 60), called
>> from parser/msg_parser.c: set_dst_uri(738)
>> Mar 16 17:18:00 openser opensips[9057]: params (0x81a7a00, 60),
>> returns address 0x81f3b48 frag. 0x81f3b30 (size=68) on 1 -th hit
>> Mar 16 17:18:00 openser opensips[9057]: DBG:core:parse_headers:
>> flags=ffffffffffffffff
>> Mar 16 17:18:00 openser opensips[9057]: params (0x81a7a00, 60), called
>> from parser/msg_parser.c: set_ruri(705)
>> Mar 16 17:18:00 openser opensips[9057]: params (0x81a7a00, 60),
>> returns address 0x81f4ba0 frag. 0x81f4b88 (size=72) on 1 -th hit
>> Mar 16 17:18:00 openser opensips[9057]: DBG:rr:after_strict: The last
>> route URI: 'sip:192.168.191.188;lr=on;ftag=1c1682753440;did=043.0c936ea3'
>> Mar 16 17:18:00 openser opensips[9057]: params (0x81a7a00, 32), called
>> from data_lump.c: del_lump(298)
>> Mar 16 17:18:00 openser opensips[9057]: params (0x81a7a00, 32),
>> returns address 0x81f3ae8 frag. 0x81f3ad0 (size=48) on 1 -th hit
>> Mar 16 17:18:00 openser opensips[9057]: DBG:rr:run_rr_callbacks:
>> callback id 1 entered with <>
>> Mar 16 17:18:00 openser opensips[9057]: DBG:core:parse_headers: flags=48
>> Mar 16 17:18:00 openser opensips[9057]: DBG:rr:run_rr_callbacks:
>> callback id 0 entered with <>
>> Mar 16 17:18:00 openser opensips[9057]: DBG:uac:restore_from: getting
>> 'vsf' Route param
>> Mar 16 17:18:00 openser opensips[9057]: DBG:uac:restore_from: route
>> param 'vsf' not found
>> Mar 16 17:18:00 openser opensips[9057]: ***AFTER loose_route=TRUE: ACK
>> ruri:[sip:192.168.191.188;lr=on;ftag=1c1682753440;did=043.0c936ea3]
>> from:[sip:551135880091@192.168.193.20]
>> to:[sip:6715551131062860@192.168.191.188;user=phone]
>>
>> On Fri, Mar 13, 2009 at 2:27 AM, Robert Dyck <[hidden email]> wrote:
>> > Very peculiar. The RURI was rewritten with the URI in the Route header.
>> > Does your script rewrite it? This usually only happens when the route set
>> > shows a next hop and the next hop is a strict router. If loose routing is
>> > in effect all the way, the RURI does not change.
>
>
>

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

Re: loose_route: loop on ACK requests

Bogdan-Andrei Iancu
In reply to this post by Noel R. Morais
Hi Noel,

it looks like OpenSIPS is doing strict routing on the received ACK.

This happens if it finds out in RURI an IP/address which is considered
local - in the case the RURI will be consumed and use the Route as new
RURI...


So are you sure there is no misconfiguration in the alias params ?

Regards,
Bogdan

Noel R. Morais wrote:

> Hi guys,
>
> I'm having problems about loose_route(). Opensips is routing ACK
> requests to itself.
>
> I know that posting code and traces are ugly, but I think I do not
> have choices. Sorry.
>
> Follow bellow the code regarding loose_route:
> if (has_totag()) {
>                 if (loose_route()) {
>                         if(method=="INVITE") {
>                                 route(5); #Check authentication of re-invites
>                         }
>                         route(1);
>                 } else {
>                         if ( is_method("ACK") ) {
>                                 if ( t_check_trans() ) {
>                                         route(1);
>                                 }
>                 }
>         }
> }
>
>
> Follow bellow the trace, 192.168.191.188 is the opensips ip address:
> U 2009/03/11 14:46:53.950565 192.168.191.188:5060 -> 192.168.192.233:5060
> SIP/2.0 200 OK.
> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac74079177.
> Contact: <sip:XXXXXXXXX@192.168.193.20:5060>.
> Record-Route: <sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2>.
> Call-ID: 74077637112200051548@192.168.192.233.
> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
> To: <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
> CSeq: 1 INVITE.
> Server: Cantata-SIP/10.3.2.51932 IMG 0.
> Allow: INVITE, BYE, REGISTER, ACK, OPTIONS, CANCEL, INFO.
> Supported: path.
> Accept: application/sdp.
> Content-Type: application/sdp.
> Content-Length: 236.
> .
> v=0.
> o=Cantata_SDP 0 1 IN IP4 192.168.193.20.
> s=Cantata-SIP.
> c=IN IP4 192.168.193.21.
> t=0 0.
> m=audio 8944 RTP/AVP 18 101.
> a=rtpmap:18 G729/8000.
> a=rtpmap:101 telephone-event/8000.
> a=fmtp:101 0-15.
> a=silenceSupp:off - - - -.
> a=ptime:20.
>
>
> U 2009/03/11 14:46:53.997019 192.168.192.233:5060 -> 192.168.191.188:5060
> ACK sip:XXXXXXXXX@192.168.193.20:5060 SIP/2.0.
> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac82192814.
> Max-Forwards: 70.
> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
> To: <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
> Call-ID: 74077637112200051548@192.168.192.233.
> CSeq: 1 ACK.
> Contact: <sip:YYYYYYYYYY@192.168.192.233>.
> Route: <sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2>.
> Supported: em,timer,replaces,path.
> Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE.
> User-Agent: Audiocodes-Sip-Gateway-MP-102 FXS/v.4.60A.035.001.
> Content-Length: 0.
> .
>
>
> U 2009/03/11 14:46:53.998178 192.168.191.188:5060 -> 192.168.191.188:5060
> ACK sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2 SIP/2.0.
> Record-Route: <sip:192.168.191.188;lr=on;ftag=1c74077990>.
> Via: SIP/2.0/UDP 192.168.191.188;branch=z9hG4bKef17.5d8b81f4.2.
> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac82192814.
> Max-Forwards: 69.
> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
> To: <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
> Call-ID: 74077637112200051548@192.168.192.233.
> CSeq: 1 ACK.
> Supported: em,timer,replaces,path.
> Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE.
> User-Agent: Audiocodes-Sip-Gateway-MP-102 FXS/v.4.60A.035.001.
> Content-Length: 0.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  


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

Re: loose_route: loop on ACK requests

Noel R. Morais
Hi Bogdan,

I'm not using alias.

I've realized that if I request authorization for the initial INVITE,
everything works like a charm.

If I just by pass (using allow_trusted) it doesn't work and opensips
route the ACK to itself.

If you don't mind follow attached my cfg. It's "simple".

Thanks,

Noel

On Fri, Mar 20, 2009 at 2:54 PM, Bogdan-Andrei Iancu
<[hidden email]> wrote:

> Hi Noel,
>
> it looks like OpenSIPS is doing strict routing on the received ACK.
>
> This happens if it finds out in RURI an IP/address which is considered local
> - in the case the RURI will be consumed and use the Route as new RURI...
>
>
> So are you sure there is no misconfiguration in the alias params ?
>
> Regards,
> Bogdan
>
> Noel R. Morais wrote:
>>
>> Hi guys,
>>
>> I'm having problems about loose_route(). Opensips is routing ACK
>> requests to itself.
>>
>> I know that posting code and traces are ugly, but I think I do not
>> have choices. Sorry.
>>
>> Follow bellow the code regarding loose_route:
>> if (has_totag()) {
>>                if (loose_route()) {
>>                        if(method=="INVITE") {
>>                                route(5); #Check authentication of
>> re-invites
>>                        }
>>                        route(1);
>>                } else {
>>                        if ( is_method("ACK") ) {
>>                                if ( t_check_trans() ) {
>>                                        route(1);
>>                                }
>>                }
>>        }
>> }
>>
>>
>> Follow bellow the trace, 192.168.191.188 is the opensips ip address:
>> U 2009/03/11 14:46:53.950565 192.168.191.188:5060 -> 192.168.192.233:5060
>> SIP/2.0 200 OK.
>> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac74079177.
>> Contact: <sip:XXXXXXXXX@192.168.193.20:5060>.
>> Record-Route:
>> <sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2>.
>> Call-ID: 74077637112200051548@192.168.192.233.
>> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
>> To:
>> <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
>> CSeq: 1 INVITE.
>> Server: Cantata-SIP/10.3.2.51932 IMG 0.
>> Allow: INVITE, BYE, REGISTER, ACK, OPTIONS, CANCEL, INFO.
>> Supported: path.
>> Accept: application/sdp.
>> Content-Type: application/sdp.
>> Content-Length: 236.
>> .
>> v=0.
>> o=Cantata_SDP 0 1 IN IP4 192.168.193.20.
>> s=Cantata-SIP.
>> c=IN IP4 192.168.193.21.
>> t=0 0.
>> m=audio 8944 RTP/AVP 18 101.
>> a=rtpmap:18 G729/8000.
>> a=rtpmap:101 telephone-event/8000.
>> a=fmtp:101 0-15.
>> a=silenceSupp:off - - - -.
>> a=ptime:20.
>>
>>
>> U 2009/03/11 14:46:53.997019 192.168.192.233:5060 -> 192.168.191.188:5060
>> ACK sip:XXXXXXXXX@192.168.193.20:5060 SIP/2.0.
>> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac82192814.
>> Max-Forwards: 70.
>> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
>> To:
>> <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
>> Call-ID: 74077637112200051548@192.168.192.233.
>> CSeq: 1 ACK.
>> Contact: <sip:YYYYYYYYYY@192.168.192.233>.
>> Route: <sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2>.
>> Supported: em,timer,replaces,path.
>> Allow:
>> REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE.
>> User-Agent: Audiocodes-Sip-Gateway-MP-102 FXS/v.4.60A.035.001.
>> Content-Length: 0.
>> .
>>
>>
>> U 2009/03/11 14:46:53.998178 192.168.191.188:5060 -> 192.168.191.188:5060
>> ACK sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2 SIP/2.0.
>> Record-Route: <sip:192.168.191.188;lr=on;ftag=1c74077990>.
>> Via: SIP/2.0/UDP 192.168.191.188;branch=z9hG4bKef17.5d8b81f4.2.
>> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac82192814.
>> Max-Forwards: 69.
>> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
>> To:
>> <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
>> Call-ID: 74077637112200051548@192.168.192.233.
>> CSeq: 1 ACK.
>> Supported: em,timer,replaces,path.
>> Allow:
>> REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE.
>> User-Agent: Audiocodes-Sip-Gateway-MP-102 FXS/v.4.60A.035.001.
>> Content-Length: 0.
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>

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

opensips.m4 (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: loose_route: loop on ACK requests

Bogdan-Andrei Iancu
Hi Noel,

maybe you have the same issue as Jeff - maybe you have the  
92.168.193.20 IP in domain table, as local domain.....

Regards,
Bogdan


Noel R. Morais wrote:

> Hi Bogdan,
>
> I'm not using alias.
>
> I've realized that if I request authorization for the initial INVITE,
> everything works like a charm.
>
> If I just by pass (using allow_trusted) it doesn't work and opensips
> route the ACK to itself.
>
> If you don't mind follow attached my cfg. It's "simple".
>
> Thanks,
>
> Noel
>
> On Fri, Mar 20, 2009 at 2:54 PM, Bogdan-Andrei Iancu
> <[hidden email]> wrote:
>  
>> Hi Noel,
>>
>> it looks like OpenSIPS is doing strict routing on the received ACK.
>>
>> This happens if it finds out in RURI an IP/address which is considered local
>> - in the case the RURI will be consumed and use the Route as new RURI...
>>
>>
>> So are you sure there is no misconfiguration in the alias params ?
>>
>> Regards,
>> Bogdan
>>
>> Noel R. Morais wrote:
>>    
>>> Hi guys,
>>>
>>> I'm having problems about loose_route(). Opensips is routing ACK
>>> requests to itself.
>>>
>>> I know that posting code and traces are ugly, but I think I do not
>>> have choices. Sorry.
>>>
>>> Follow bellow the code regarding loose_route:
>>> if (has_totag()) {
>>>                if (loose_route()) {
>>>                        if(method=="INVITE") {
>>>                                route(5); #Check authentication of
>>> re-invites
>>>                        }
>>>                        route(1);
>>>                } else {
>>>                        if ( is_method("ACK") ) {
>>>                                if ( t_check_trans() ) {
>>>                                        route(1);
>>>                                }
>>>                }
>>>        }
>>> }
>>>
>>>
>>> Follow bellow the trace, 192.168.191.188 is the opensips ip address:
>>> U 2009/03/11 14:46:53.950565 192.168.191.188:5060 -> 192.168.192.233:5060
>>> SIP/2.0 200 OK.
>>> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac74079177.
>>> Contact: <sip:XXXXXXXXX@192.168.193.20:5060>.
>>> Record-Route:
>>> <sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2>.
>>> Call-ID: 74077637112200051548@192.168.192.233.
>>> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
>>> To:
>>> <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
>>> CSeq: 1 INVITE.
>>> Server: Cantata-SIP/10.3.2.51932 IMG 0.
>>> Allow: INVITE, BYE, REGISTER, ACK, OPTIONS, CANCEL, INFO.
>>> Supported: path.
>>> Accept: application/sdp.
>>> Content-Type: application/sdp.
>>> Content-Length: 236.
>>> .
>>> v=0.
>>> o=Cantata_SDP 0 1 IN IP4 192.168.193.20.
>>> s=Cantata-SIP.
>>> c=IN IP4 192.168.193.21.
>>> t=0 0.
>>> m=audio 8944 RTP/AVP 18 101.
>>> a=rtpmap:18 G729/8000.
>>> a=rtpmap:101 telephone-event/8000.
>>> a=fmtp:101 0-15.
>>> a=silenceSupp:off - - - -.
>>> a=ptime:20.
>>>
>>>
>>> U 2009/03/11 14:46:53.997019 192.168.192.233:5060 -> 192.168.191.188:5060
>>> ACK sip:XXXXXXXXX@192.168.193.20:5060 SIP/2.0.
>>> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac82192814.
>>> Max-Forwards: 70.
>>> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
>>> To:
>>> <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
>>> Call-ID: 74077637112200051548@192.168.192.233.
>>> CSeq: 1 ACK.
>>> Contact: <sip:YYYYYYYYYY@192.168.192.233>.
>>> Route: <sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2>.
>>> Supported: em,timer,replaces,path.
>>> Allow:
>>> REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE.
>>> User-Agent: Audiocodes-Sip-Gateway-MP-102 FXS/v.4.60A.035.001.
>>> Content-Length: 0.
>>> .
>>>
>>>
>>> U 2009/03/11 14:46:53.998178 192.168.191.188:5060 -> 192.168.191.188:5060
>>> ACK sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2 SIP/2.0.
>>> Record-Route: <sip:192.168.191.188;lr=on;ftag=1c74077990>.
>>> Via: SIP/2.0/UDP 192.168.191.188;branch=z9hG4bKef17.5d8b81f4.2.
>>> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac82192814.
>>> Max-Forwards: 69.
>>> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
>>> To:
>>> <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
>>> Call-ID: 74077637112200051548@192.168.192.233.
>>> CSeq: 1 ACK.
>>> Supported: em,timer,replaces,path.
>>> Allow:
>>> REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE.
>>> User-Agent: Audiocodes-Sip-Gateway-MP-102 FXS/v.4.60A.035.001.
>>> Content-Length: 0.
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>>      
>>    


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

Re: loose_route: loop on ACK requests

Noel R. Morais
Hi Bogdan,

You are right. I had the same issue as Jeff. The IP was in the domain table :(.

Thanks again,

Noel

On Mon, Mar 23, 2009 at 12:03 PM, Bogdan-Andrei Iancu
<[hidden email]> wrote:

> Hi Noel,
>
> maybe you have the same issue as Jeff - maybe you have the  92.168.193.20 IP
> in domain table, as local domain.....
>
> Regards,
> Bogdan
>
>
> Noel R. Morais wrote:
>>
>> Hi Bogdan,
>>
>> I'm not using alias.
>>
>> I've realized that if I request authorization for the initial INVITE,
>> everything works like a charm.
>>
>> If I just by pass (using allow_trusted) it doesn't work and opensips
>> route the ACK to itself.
>>
>> If you don't mind follow attached my cfg. It's "simple".
>>
>> Thanks,
>>
>> Noel
>>
>> On Fri, Mar 20, 2009 at 2:54 PM, Bogdan-Andrei Iancu
>> <[hidden email]> wrote:
>>
>>>
>>> Hi Noel,
>>>
>>> it looks like OpenSIPS is doing strict routing on the received ACK.
>>>
>>> This happens if it finds out in RURI an IP/address which is considered
>>> local
>>> - in the case the RURI will be consumed and use the Route as new RURI...
>>>
>>>
>>> So are you sure there is no misconfiguration in the alias params ?
>>>
>>> Regards,
>>> Bogdan
>>>
>>> Noel R. Morais wrote:
>>>
>>>>
>>>> Hi guys,
>>>>
>>>> I'm having problems about loose_route(). Opensips is routing ACK
>>>> requests to itself.
>>>>
>>>> I know that posting code and traces are ugly, but I think I do not
>>>> have choices. Sorry.
>>>>
>>>> Follow bellow the code regarding loose_route:
>>>> if (has_totag()) {
>>>>               if (loose_route()) {
>>>>                       if(method=="INVITE") {
>>>>                               route(5); #Check authentication of
>>>> re-invites
>>>>                       }
>>>>                       route(1);
>>>>               } else {
>>>>                       if ( is_method("ACK") ) {
>>>>                               if ( t_check_trans() ) {
>>>>                                       route(1);
>>>>                               }
>>>>               }
>>>>       }
>>>> }
>>>>
>>>>
>>>> Follow bellow the trace, 192.168.191.188 is the opensips ip address:
>>>> U 2009/03/11 14:46:53.950565 192.168.191.188:5060 ->
>>>> 192.168.192.233:5060
>>>> SIP/2.0 200 OK.
>>>> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac74079177.
>>>> Contact: <sip:XXXXXXXXX@192.168.193.20:5060>.
>>>> Record-Route:
>>>> <sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2>.
>>>> Call-ID: 74077637112200051548@192.168.192.233.
>>>> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
>>>> To:
>>>>
>>>> <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
>>>> CSeq: 1 INVITE.
>>>> Server: Cantata-SIP/10.3.2.51932 IMG 0.
>>>> Allow: INVITE, BYE, REGISTER, ACK, OPTIONS, CANCEL, INFO.
>>>> Supported: path.
>>>> Accept: application/sdp.
>>>> Content-Type: application/sdp.
>>>> Content-Length: 236.
>>>> .
>>>> v=0.
>>>> o=Cantata_SDP 0 1 IN IP4 192.168.193.20.
>>>> s=Cantata-SIP.
>>>> c=IN IP4 192.168.193.21.
>>>> t=0 0.
>>>> m=audio 8944 RTP/AVP 18 101.
>>>> a=rtpmap:18 G729/8000.
>>>> a=rtpmap:101 telephone-event/8000.
>>>> a=fmtp:101 0-15.
>>>> a=silenceSupp:off - - - -.
>>>> a=ptime:20.
>>>>
>>>>
>>>> U 2009/03/11 14:46:53.997019 192.168.192.233:5060 ->
>>>> 192.168.191.188:5060
>>>> ACK sip:XXXXXXXXX@192.168.193.20:5060 SIP/2.0.
>>>> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac82192814.
>>>> Max-Forwards: 70.
>>>> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
>>>> To:
>>>>
>>>> <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
>>>> Call-ID: 74077637112200051548@192.168.192.233.
>>>> CSeq: 1 ACK.
>>>> Contact: <sip:YYYYYYYYYY@192.168.192.233>.
>>>> Route: <sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2>.
>>>> Supported: em,timer,replaces,path.
>>>> Allow:
>>>>
>>>> REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE.
>>>> User-Agent: Audiocodes-Sip-Gateway-MP-102 FXS/v.4.60A.035.001.
>>>> Content-Length: 0.
>>>> .
>>>>
>>>>
>>>> U 2009/03/11 14:46:53.998178 192.168.191.188:5060 ->
>>>> 192.168.191.188:5060
>>>> ACK sip:192.168.191.188;lr=on;ftag=1c74077990;did=f9e.d32b00d2 SIP/2.0.
>>>> Record-Route: <sip:192.168.191.188;lr=on;ftag=1c74077990>.
>>>> Via: SIP/2.0/UDP 192.168.191.188;branch=z9hG4bKef17.5d8b81f4.2.
>>>> Via: SIP/2.0/UDP 192.168.192.233;branch=z9hG4bKac82192814.
>>>> Max-Forwards: 69.
>>>> From: "Jeff002" <sip:YYYYYYYYYY@192.168.193.20>;tag=1c74077990.
>>>> To:
>>>>
>>>> <sip:XXXXXXXXX@192.168.191.188;user=phone>;tag=a94c095b773be1dd6e8d668a785a9c8469ec.
>>>> Call-ID: 74077637112200051548@192.168.192.233.
>>>> CSeq: 1 ACK.
>>>> Supported: em,timer,replaces,path.
>>>> Allow:
>>>>
>>>> REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE.
>>>> User-Agent: Audiocodes-Sip-Gateway-MP-102 FXS/v.4.60A.035.001.
>>>> Content-Length: 0.
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> [hidden email]
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>>
>>>
>>>
>
>

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