Re: [OpenSIPS-Users] explizit handling auf replyto

2009-09-24 Thread Bogdan-Andrei Iancu
Hi Uwe,

Sorry for the delay - I took a look at the logs and there is what I 
understand from there:
- I guess you do a parallel forking as the 486 comes from a second 
branch (id 1 starting from 0) (see ;branch=z9hG4bK52ad.7d455a97.1 )
- The TM decides to store the reply without relaying 
DBG:tm:relay_reply: branch=1, save=1, relay=-1  TM does not relay it 
as probably there is no final reply on the first branch (id = 0).

So, the final reply is not forwarded because not all branches are 
completed yet, so TM cannot pick yet a final reply to be sent to UAC.

It is a typical behaviour during parallel forking.

Regards,
Bogdan


Uwe Kastens wrote:
 Hello,

 Ok. I need to have that forward() in my configuration the get answers
 like 404, 486, 487 back to my asterisk. Reading your statements this
 should not be possible since I use t_relay for the requests and the
 replys should be routed by default.

 I will make a trace and post it to the list. One with forward and the
 other without.

 BR and Thanks in advance

 Uwe



 Bogdan-Andrei Iancu schrieb:
   
 Uwe,

 forward() is a function exclusivly used for REQUESTS - for replies, 
 nothing needs to be done as OpenSIPS will do it automatically:

 1) if the requests was statefully forwarded (via t_relay() ), the 
 transaction will contain all the info to route back the reply

 2) if the requests was statelessly forwarded (via forward() ), the VIA 
 stack (in received reply) will contain all the info to route back the reply

 Regards,
 Bogdan


 Uwe Kastens wrote:
 
 Hi Bogdan,

   
   
  I need to route this
 replys with an reply_route and forward them explicitly to the pstn 
 gateway.
   
   
   
 and how do you do reply routing ?? replies are automatically routed 
 based on VIA stack and you cannot influence this from script.
 
 
 ...
 if (!t_relay()) {
   sl_reply_error();
  };

 t_on_reply(1);
 }
 onreply_route[1]  {
 xlog(L_DBG,== route [1] t_on_failure msg-len from $si:$sp:
 $ml \n$mb\n ==\n);
 forward(10.20.30.101:5100);
 }

 BR

 Uwe



   
   
 Regards,
 Bogdan
 
 
 This not as it should be?



 BR

 Uwe
   
   
   
 using forward() forces a stateless behaviour of OpenSIPS. To be able to 
 catch replies for a requests (what on_reply route does) it requires a 
 statefull approach. This is the reason it does not work for you.

 If you use t_relay() instead of forward(), you should be able to use 
 failure and onreply routes.

 Regards,
 Bogdan

 Uwe Kastens wrote:
 
 
 
 Hello,

 I am using opensips 1.5.1 and I have the problem, that busy messages are
 not passed to the mediagw. Anything else is working (ACK etc.pp.). If I
 route that message via forward(IP:port) to the media gw in on_replyto,
 busy is processed correctly. If not, the busy is not send to the 
 mediagw.

 So I was wondering if I had to handle some replyto messages?

 BR

 uwe


   
   
  


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] explizit handling auf replyto

2009-09-08 Thread Bogdan-Andrei Iancu
Hi Uwe,


Uwe Kastens wrote:
 Hi Bogdan,

 Seems that my question was not very clear.

 I would expect that reply messages would be handled automatically, if I
 use t_relay.
whatever forwarding function you are using (forward / t_relay), the 
replies are automatically routed back by opensips core without any help 
from script.
  This seems not to happen in my setup.
could you post a sip trace of a failing reply ?

  I need to route this
 replys with an reply_route and forward them explicitly to the pstn gateway.
   
and how do you do reply routing ?? replies are automatically routed 
based on VIA stack and you cannot influence this from script.

Regards,
Bogdan
 This not as it should be?



 BR

 Uwe
   
 using forward() forces a stateless behaviour of OpenSIPS. To be able to 
 catch replies for a requests (what on_reply route does) it requires a 
 statefull approach. This is the reason it does not work for you.

 If you use t_relay() instead of forward(), you should be able to use 
 failure and onreply routes.

 Regards,
 Bogdan

 Uwe Kastens wrote:
 
 Hello,

 I am using opensips 1.5.1 and I have the problem, that busy messages are
 not passed to the mediagw. Anything else is working (ACK etc.pp.). If I
 route that message via forward(IP:port) to the media gw in on_replyto,
 busy is processed correctly. If not, the busy is not send to the mediagw.

 So I was wondering if I had to handle some replyto messages?

 BR

 uwe


   
   
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 


   


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] explizit handling auf replyto

2009-09-08 Thread Uwe Kastens
Hi Bogdan,

  I need to route this
 replys with an reply_route and forward them explicitly to the pstn gateway.
   
 and how do you do reply routing ?? replies are automatically routed 
 based on VIA stack and you cannot influence this from script.


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

t_on_reply(1);
}
onreply_route[1]  {
xlog(L_DBG,== route [1] t_on_failure msg-len from $si:$sp:
$ml \n$mb\n ==\n);
forward(10.20.30.101:5100);
}

BR

Uwe



 
 Regards,
 Bogdan
 This not as it should be?



 BR

 Uwe
   
 using forward() forces a stateless behaviour of OpenSIPS. To be able to 
 catch replies for a requests (what on_reply route does) it requires a 
 statefull approach. This is the reason it does not work for you.

 If you use t_relay() instead of forward(), you should be able to use 
 failure and onreply routes.

 Regards,
 Bogdan

 Uwe Kastens wrote:
 
 Hello,

 I am using opensips 1.5.1 and I have the problem, that busy messages are
 not passed to the mediagw. Anything else is working (ACK etc.pp.). If I
 route that message via forward(IP:port) to the media gw in on_replyto,
 busy is processed correctly. If not, the busy is not send to the mediagw.

 So I was wondering if I had to handle some replyto messages?

 BR

 uwe


   
   
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 

   
 
 
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-- 

kiste lat: 54.322684, lon: 10.13586

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] explizit handling auf replyto

2009-09-08 Thread Alex Balashov
Replies are automatically routed only if they are statefully routed.

Uwe Kastens wrote:

 Hi Bogdan,
 
  I need to route this
 replys with an reply_route and forward them explicitly to the pstn gateway.
   
 and how do you do reply routing ?? replies are automatically routed 
 based on VIA stack and you cannot influence this from script.
 
 
 ...
 if (!t_relay()) {
   sl_reply_error();
  };
 
 t_on_reply(1);
 }
 onreply_route[1]  {
 xlog(L_DBG,== route [1] t_on_failure msg-len from $si:$sp:
 $ml \n$mb\n ==\n);
 forward(10.20.30.101:5100);
 }
 
 BR
 
 Uwe
 
 
 
 Regards,
 Bogdan
 This not as it should be?



 BR

 Uwe
   
 using forward() forces a stateless behaviour of OpenSIPS. To be able to 
 catch replies for a requests (what on_reply route does) it requires a 
 statefull approach. This is the reason it does not work for you.

 If you use t_relay() instead of forward(), you should be able to use 
 failure and onreply routes.

 Regards,
 Bogdan

 Uwe Kastens wrote:
 
 Hello,

 I am using opensips 1.5.1 and I have the problem, that busy messages are
 not passed to the mediagw. Anything else is working (ACK etc.pp.). If I
 route that message via forward(IP:port) to the media gw in on_replyto,
 busy is processed correctly. If not, the busy is not send to the mediagw.

 So I was wondering if I had to handle some replyto messages?

 BR

 uwe


   
   
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 
   

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 
 


-- 
Alex Balashov - Principal
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct  : (+1) (678) 954-0671

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] explizit handling auf replyto

2009-09-08 Thread Uwe Kastens
Hi,

 Replies are automatically routed only if they are statefully routed.

Statefull = t_relay() ?

BR

Uwe
-- 

kiste lat: 54.322684, lon: 10.13586

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] explizit handling auf replyto

2009-09-08 Thread Alex Balashov
Uwe Kastens wrote:

 Replies are automatically routed only if they are statefully routed.
 
 Statefull = t_relay() ?

Yes.

-- 
Alex Balashov - Principal
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct  : (+1) (678) 954-0671

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] explizit handling auf replyto

2009-09-08 Thread Alex Balashov
Uwe Kastens wrote:
 Hi,
 
 Replies are automatically routed only if they are statefully routed.
 
 Statefull = t_relay() ?

Keep in mind, you can't really mix stateful and stateless handling for 
what are hopefully obvious reasons.  If you statelessly direct a reply, 
the stateful transaction layer used to open the transaction from the 
initial request will not know that you did so, and vice versa, etc etc.

-- 
Alex Balashov - Principal
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct  : (+1) (678) 954-0671

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] explizit handling auf replyto

2009-09-08 Thread Uwe Kastens
Hello,

Ok. I need to have that forward() in my configuration the get answers
like 404, 486, 487 back to my asterisk. Reading your statements this
should not be possible since I use t_relay for the requests and the
replys should be routed by default.

I will make a trace and post it to the list. One with forward and the
other without.

BR and Thanks in advance

Uwe



Bogdan-Andrei Iancu schrieb:
 Uwe,
 
 forward() is a function exclusivly used for REQUESTS - for replies, 
 nothing needs to be done as OpenSIPS will do it automatically:
 
 1) if the requests was statefully forwarded (via t_relay() ), the 
 transaction will contain all the info to route back the reply
 
 2) if the requests was statelessly forwarded (via forward() ), the VIA 
 stack (in received reply) will contain all the info to route back the reply
 
 Regards,
 Bogdan
 
 
 Uwe Kastens wrote:
 Hi Bogdan,

   
  I need to route this
 replys with an reply_route and forward them explicitly to the pstn gateway.
   
   
 and how do you do reply routing ?? replies are automatically routed 
 based on VIA stack and you cannot influence this from script.
 

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

 t_on_reply(1);
 }
 onreply_route[1]  {
 xlog(L_DBG,== route [1] t_on_failure msg-len from $si:$sp:
 $ml \n$mb\n ==\n);
 forward(10.20.30.101:5100);
 }

 BR

 Uwe



   
 Regards,
 Bogdan
 
 This not as it should be?



 BR

 Uwe
   
   
 using forward() forces a stateless behaviour of OpenSIPS. To be able to 
 catch replies for a requests (what on_reply route does) it requires a 
 statefull approach. This is the reason it does not work for you.

 If you use t_relay() instead of forward(), you should be able to use 
 failure and onreply routes.

 Regards,
 Bogdan

 Uwe Kastens wrote:
 
 
 Hello,

 I am using opensips 1.5.1 and I have the problem, that busy messages are
 not passed to the mediagw. Anything else is working (ACK etc.pp.). If I
 route that message via forward(IP:port) to the media gw in on_replyto,
 busy is processed correctly. If not, the busy is not send to the mediagw.

 So I was wondering if I had to handle some replyto messages?

 BR

 uwe


   
   
   
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 
 
   
   
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 

   
 
 
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-- 

kiste lat: 54.322684, lon: 10.13586

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] explizit handling auf replyto

2009-09-08 Thread Bogdan-Andrei Iancu
Uwe,

forward() is a function exclusivly used for REQUESTS - for replies, 
nothing needs to be done as OpenSIPS will do it automatically:

1) if the requests was statefully forwarded (via t_relay() ), the 
transaction will contain all the info to route back the reply

2) if the requests was statelessly forwarded (via forward() ), the VIA 
stack (in received reply) will contain all the info to route back the reply

Regards,
Bogdan


Uwe Kastens wrote:
 Hi Bogdan,

   
  I need to route this
 replys with an reply_route and forward them explicitly to the pstn gateway.
   
   
 and how do you do reply routing ?? replies are automatically routed 
 based on VIA stack and you cannot influence this from script.
 


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

 t_on_reply(1);
 }
 onreply_route[1]  {
 xlog(L_DBG,== route [1] t_on_failure msg-len from $si:$sp:
 $ml \n$mb\n ==\n);
 forward(10.20.30.101:5100);
 }

 BR

 Uwe



   
 Regards,
 Bogdan
 
 This not as it should be?



 BR

 Uwe
   
   
 using forward() forces a stateless behaviour of OpenSIPS. To be able to 
 catch replies for a requests (what on_reply route does) it requires a 
 statefull approach. This is the reason it does not work for you.

 If you use t_relay() instead of forward(), you should be able to use 
 failure and onreply routes.

 Regards,
 Bogdan

 Uwe Kastens wrote:
 
 
 Hello,

 I am using opensips 1.5.1 and I have the problem, that busy messages are
 not passed to the mediagw. Anything else is working (ACK etc.pp.). If I
 route that message via forward(IP:port) to the media gw in on_replyto,
 busy is processed correctly. If not, the busy is not send to the mediagw.

 So I was wondering if I had to handle some replyto messages?

 BR

 uwe


   
   
   
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 
 
   
   
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 


   


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] explizit handling auf replyto

2009-09-08 Thread Uwe Kastens
Hi,

   
 you do not need to do any routing in onreply route at all, in none of 
 the case (stateless or statefull)
 I will make a trace and post it to the list. One with forward and the
 other without.
   
 make a trace and opensips logs.
 

I have attached opensips.log with debug=9.
w_forward_an.gz = with forward
wo_forward_an.gz = without forward

BR

Uwe

-- 

kiste lat: 54.322684, lon: 10.13586


w_forward_an.gz
Description: GNU Zip compressed data


wo_forward_an.gz
Description: GNU Zip compressed data
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] explizit handling auf replyto

2009-09-08 Thread Alex Balashov
Bogdan-Andrei Iancu wrote:

 2) if the requests was statelessly forwarded (via forward() ), the VIA 
 stack (in received reply) will contain all the info to route back the reply

I think the question is whether stateless forwarding can be used to 
override default processing of Via and route the reply somewhere else.

You can, for example, do this (whether in stateless or stateful request 
forwarding mode):

onreply_route[1] {
drop;
}

... I think it's along that general train of thought.

-- 
Alex Balashov - Principal
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct  : (+1) (678) 954-0671

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] explizit handling auf replyto

2009-09-07 Thread Uwe Kastens
Hi Bogdan,

Seems that my question was not very clear.

I would expect that reply messages would be handled automatically, if I
use t_relay. This seems not to happen in my setup. I need to route this
replys with an reply_route and forward them explicitly to the pstn gateway.

This not as it should be?



BR

Uwe
 
 using forward() forces a stateless behaviour of OpenSIPS. To be able to 
 catch replies for a requests (what on_reply route does) it requires a 
 statefull approach. This is the reason it does not work for you.
 
 If you use t_relay() instead of forward(), you should be able to use 
 failure and onreply routes.
 
 Regards,
 Bogdan
 
 Uwe Kastens wrote:
 Hello,

 I am using opensips 1.5.1 and I have the problem, that busy messages are
 not passed to the mediagw. Anything else is working (ACK etc.pp.). If I
 route that message via forward(IP:port) to the media gw in on_replyto,
 busy is processed correctly. If not, the busy is not send to the mediagw.

 So I was wondering if I had to handle some replyto messages?

 BR

 uwe


   
 
 
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-- 

kiste lat: 54.322684, lon: 10.13586

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] explizit handling auf replyto

2009-09-03 Thread Uwe Kastens
Hello,

I am using opensips 1.5.1 and I have the problem, that busy messages are
not passed to the mediagw. Anything else is working (ACK etc.pp.). If I
route that message via forward(IP:port) to the media gw in on_replyto,
busy is processed correctly. If not, the busy is not send to the mediagw.

So I was wondering if I had to handle some replyto messages?

BR

uwe


-- 

kiste lat: 54.322684, lon: 10.13586

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] explizit handling auf replyto

2009-09-03 Thread Bogdan-Andrei Iancu
Hi Uwe,

using forward() forces a stateless behaviour of OpenSIPS. To be able to 
catch replies for a requests (what on_reply route does) it requires a 
statefull approach. This is the reason it does not work for you.

If you use t_relay() instead of forward(), you should be able to use 
failure and onreply routes.

Regards,
Bogdan

Uwe Kastens wrote:
 Hello,

 I am using opensips 1.5.1 and I have the problem, that busy messages are
 not passed to the mediagw. Anything else is working (ACK etc.pp.). If I
 route that message via forward(IP:port) to the media gw in on_replyto,
 busy is processed correctly. If not, the busy is not send to the mediagw.

 So I was wondering if I had to handle some replyto messages?

 BR

 uwe


   


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users