Dialog timeout_avp and onreply_route

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

Dialog timeout_avp and onreply_route

marianarduini
Hello all,

I know from the docs that dialog module param timeout_avp " ... may be used only in a request (initial or sequential) context", but we have a scenario where the UAS should be the session timer refresher, then we can only set the timeout_avp value when we get the Session-expires header value in 200 OK.

May I ask what would be the best approach to this, like modifying OpenSIPS code to be able to actually set the avp from onreply_route? If this is the case, can you please guide us on what would need to be changed?

Thanks in advance,

Mariana.

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

Re: Dialog timeout_avp and onreply_route

Muhammad Shahzad
Use SST module,


Thank you.


On Tue, Nov 13, 2012 at 8:25 PM, Mariana Arduini <[hidden email]> wrote:
Hello all,

I know from the docs that dialog module param timeout_avp " ... may be used only in a request (initial or sequential) context", but we have a scenario where the UAS should be the session timer refresher, then we can only set the timeout_avp value when we get the Session-expires header value in 200 OK.

May I ask what would be the best approach to this, like modifying OpenSIPS code to be able to actually set the avp from onreply_route? If this is the case, can you please guide us on what would need to be changed?

Thanks in advance,

Mariana.

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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

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

Re: Dialog timeout_avp and onreply_route

marianarduini
Hi Muhammad!

Thanks for replying.

I looked at SST module and, at least from docs, there is no mention to using it for the 200 OK, only for INVITES...

Even so, I think the problem is that the dialog module does not update the timeout value for 200 OK. For example, if you want to refresh the timeout value when you get an UPDATE message, you have to set the avp configured in timeout_avp modparam and then call match_dialog()/loose_route(), because either of these functions will actually update the dialog, and setting the avp without calling them will take no effect. I guess the same thing is happening when I set the avp after receiving the 200 OK.

Any help on what should be changed in OpenSIPS code so that setting the avp in onreply_route will take effect on the dialog timeout?

Thanks!
Mariana


On Wed, Nov 14, 2012 at 1:38 PM, Muhammad Shahzad <[hidden email]> wrote:
Use SST module,


Thank you.


On Tue, Nov 13, 2012 at 8:25 PM, Mariana Arduini <[hidden email]> wrote:
Hello all,

I know from the docs that dialog module param timeout_avp " ... may be used only in a request (initial or sequential) context", but we have a scenario where the UAS should be the session timer refresher, then we can only set the timeout_avp value when we get the Session-expires header value in 200 OK.

May I ask what would be the best approach to this, like modifying OpenSIPS code to be able to actually set the avp from onreply_route? If this is the case, can you please guide us on what would need to be changed?

Thanks in advance,

Mariana.

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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
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: Dialog timeout_avp and onreply_route

Muhammad Shahzad
Well, i think if you have enabled onreply_avp_mode in TM module then you can access and change AVP you set in route block in on_reply block. I don't see any reason why you need to modify opensips source code for this.


Just change value of SST AVP as i mentioned in previous email when you get final reply from upstream. However make sure onreply_avp_mode is set as mentioned in about link.

Thank you.


On Wed, Nov 14, 2012 at 5:37 PM, Mariana Arduini <[hidden email]> wrote:
Hi Muhammad!

Thanks for replying.

I looked at SST module and, at least from docs, there is no mention to using it for the 200 OK, only for INVITES...

Even so, I think the problem is that the dialog module does not update the timeout value for 200 OK. For example, if you want to refresh the timeout value when you get an UPDATE message, you have to set the avp configured in timeout_avp modparam and then call match_dialog()/loose_route(), because either of these functions will actually update the dialog, and setting the avp without calling them will take no effect. I guess the same thing is happening when I set the avp after receiving the 200 OK.

Any help on what should be changed in OpenSIPS code so that setting the avp in onreply_route will take effect on the dialog timeout?

Thanks!
Mariana


On Wed, Nov 14, 2012 at 1:38 PM, Muhammad Shahzad <[hidden email]> wrote:
Use SST module,


Thank you.


On Tue, Nov 13, 2012 at 8:25 PM, Mariana Arduini <[hidden email]> wrote:
Hello all,

I know from the docs that dialog module param timeout_avp " ... may be used only in a request (initial or sequential) context", but we have a scenario where the UAS should be the session timer refresher, then we can only set the timeout_avp value when we get the Session-expires header value in 200 OK.

May I ask what would be the best approach to this, like modifying OpenSIPS code to be able to actually set the avp from onreply_route? If this is the case, can you please guide us on what would need to be changed?

Thanks in advance,

Mariana.

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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

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

Re: Dialog timeout_avp and onreply_route

marianarduini

Hi Muhammad,

"Well, i think if you have enabled onreply_avp_mode in TM module then you can access and change AVP you set in route block in on_reply block. I don't see any reason why you need to modify opensips source code for this."
Yes, I have that enabled in tm module, and in fact I can change avp values in onreply_route, from what I see in other avps we use.

The problem is that it seems the dialog module cannot apply the new avp value to the dialog timeout. Check dialog module docs:


** It may be used only in a request (initial or sequential) context**

Using opensipsctl fifo dlg_list, I can see that the timeout value is set to 43200 seconds, which is the dafault value, even after setting the timeout avp in onreply_route:

# opensipsctl fifo dlg_list
dialog::  hash=1571:444747590
state:: 4
user_flags:: 0
timestart:: 1352912021
timeout:: 1352955222
callid:: [hidden email]
from_uri:: [hidden email]
to_uri:: [hidden email]
caller_tag:: uac191.190.218.180
caller_contact:: sip:10.22.136.172;transport=tcp;did=326.53fb7ac1
callee_cseq:: 0
caller_route_set:: 
caller_bind_addr:: tcp:10.22.137.64:5060
callee_tag:: uas291.190.218.170
callee_contact:: sip:10.22.136.170;transport=tcp;did=326.7efc7653
caller_cseq:: 1
callee_route_set:: 
callee_bind_addr:: tcp:10.22.137.25:5060

I understand the dialog module won´t apply any change in the avp from onreply_route, doesn´t matter if done manually or through SST module... =/

Thanks again!
Mariana.

On Wed, Nov 14, 2012 at 3:17 PM, Muhammad Shahzad <[hidden email]> wrote:
Well, i think if you have enabled onreply_avp_mode in TM module then you can access and change AVP you set in route block in on_reply block. I don't see any reason why you need to modify opensips source code for this.


Just change value of SST AVP as i mentioned in previous email when you get final reply from upstream. However make sure onreply_avp_mode is set as mentioned in about link.

Thank you.



On Wed, Nov 14, 2012 at 5:37 PM, Mariana Arduini <[hidden email]> wrote:
Hi Muhammad!

Thanks for replying.

I looked at SST module and, at least from docs, there is no mention to using it for the 200 OK, only for INVITES...

Even so, I think the problem is that the dialog module does not update the timeout value for 200 OK. For example, if you want to refresh the timeout value when you get an UPDATE message, you have to set the avp configured in timeout_avp modparam and then call match_dialog()/loose_route(), because either of these functions will actually update the dialog, and setting the avp without calling them will take no effect. I guess the same thing is happening when I set the avp after receiving the 200 OK.

Any help on what should be changed in OpenSIPS code so that setting the avp in onreply_route will take effect on the dialog timeout?

Thanks!
Mariana


On Wed, Nov 14, 2012 at 1:38 PM, Muhammad Shahzad <[hidden email]> wrote:
Use SST module,


Thank you.


On Tue, Nov 13, 2012 at 8:25 PM, Mariana Arduini <[hidden email]> wrote:
Hello all,

I know from the docs that dialog module param timeout_avp " ... may be used only in a request (initial or sequential) context", but we have a scenario where the UAS should be the session timer refresher, then we can only set the timeout_avp value when we get the Session-expires header value in 200 OK.

May I ask what would be the best approach to this, like modifying OpenSIPS code to be able to actually set the avp from onreply_route? If this is the case, can you please guide us on what would need to be changed?

Thanks in advance,

Mariana.

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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
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: Dialog timeout_avp and onreply_route

Muhammad Shahzad
Then its a bug and need to be reported at,

http://sourceforge.net/tracker/?group_id=232389&atid=1086410

Thank you.


On Wed, Nov 14, 2012 at 6:43 PM, Mariana Arduini <[hidden email]> wrote:

Hi Muhammad,

"Well, i think if you have enabled onreply_avp_mode in TM module then you can access and change AVP you set in route block in on_reply block. I don't see any reason why you need to modify opensips source code for this."
Yes, I have that enabled in tm module, and in fact I can change avp values in onreply_route, from what I see in other avps we use.

The problem is that it seems the dialog module cannot apply the new avp value to the dialog timeout. Check dialog module docs:


** It may be used only in a request (initial or sequential) context**

Using opensipsctl fifo dlg_list, I can see that the timeout value is set to 43200 seconds, which is the dafault value, even after setting the timeout avp in onreply_route:

# opensipsctl fifo dlg_list
dialog::  hash=1571:444747590
state:: 4
user_flags:: 0
timestart:: 1352912021
timeout:: 1352955222
callid:: [hidden email]
from_uri:: [hidden email]
to_uri:: [hidden email]
caller_tag:: uac191.190.218.180
caller_contact:: sip:10.22.136.172;transport=tcp;did=326.53fb7ac1
callee_cseq:: 0
caller_route_set:: 
caller_bind_addr:: tcp:10.22.137.64:5060
callee_tag:: uas291.190.218.170
callee_contact:: sip:10.22.136.170;transport=tcp;did=326.7efc7653
caller_cseq:: 1
callee_route_set:: 
callee_bind_addr:: tcp:10.22.137.25:5060

I understand the dialog module won´t apply any change in the avp from onreply_route, doesn´t matter if done manually or through SST module... =/

Thanks again!
Mariana.


On Wed, Nov 14, 2012 at 3:17 PM, Muhammad Shahzad <[hidden email]> wrote:
Well, i think if you have enabled onreply_avp_mode in TM module then you can access and change AVP you set in route block in on_reply block. I don't see any reason why you need to modify opensips source code for this.


Just change value of SST AVP as i mentioned in previous email when you get final reply from upstream. However make sure onreply_avp_mode is set as mentioned in about link.

Thank you.



On Wed, Nov 14, 2012 at 5:37 PM, Mariana Arduini <[hidden email]> wrote:
Hi Muhammad!

Thanks for replying.

I looked at SST module and, at least from docs, there is no mention to using it for the 200 OK, only for INVITES...

Even so, I think the problem is that the dialog module does not update the timeout value for 200 OK. For example, if you want to refresh the timeout value when you get an UPDATE message, you have to set the avp configured in timeout_avp modparam and then call match_dialog()/loose_route(), because either of these functions will actually update the dialog, and setting the avp without calling them will take no effect. I guess the same thing is happening when I set the avp after receiving the 200 OK.

Any help on what should be changed in OpenSIPS code so that setting the avp in onreply_route will take effect on the dialog timeout?

Thanks!
Mariana


On Wed, Nov 14, 2012 at 1:38 PM, Muhammad Shahzad <[hidden email]> wrote:
Use SST module,


Thank you.


On Tue, Nov 13, 2012 at 8:25 PM, Mariana Arduini <[hidden email]> wrote:
Hello all,

I know from the docs that dialog module param timeout_avp " ... may be used only in a request (initial or sequential) context", but we have a scenario where the UAS should be the session timer refresher, then we can only set the timeout_avp value when we get the Session-expires header value in 200 OK.

May I ask what would be the best approach to this, like modifying OpenSIPS code to be able to actually set the avp from onreply_route? If this is the case, can you please guide us on what would need to be changed?

Thanks in advance,

Mariana.

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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

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

Re: Dialog timeout_avp and onreply_route

Vlad Paiu
Hello,

When using the SST module, refreshing in-dialog replies should work, since the internal callbacks are called before the dialog module updates it's timeout values.
Still, is you set the AVP in the onreply_route, that is known not to work since the updating of timeout values is done before the onreply_route is triggered.

indeed  this is some sort of bug, that we intend to fix in the future 1.9 release, by triggering event routes for different events that occur for the dialog module.

Regards,
Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com 

On 11/14/2012 07:59 PM, Muhammad Shahzad wrote:
Then its a bug and need to be reported at,

http://sourceforge.net/tracker/?group_id=232389&atid=1086410

Thank you.


On Wed, Nov 14, 2012 at 6:43 PM, Mariana Arduini <[hidden email]> wrote:

Hi Muhammad,

"Well, i think if you have enabled onreply_avp_mode in TM module then you can access and change AVP you set in route block in on_reply block. I don't see any reason why you need to modify opensips source code for this."
Yes, I have that enabled in tm module, and in fact I can change avp values in onreply_route, from what I see in other avps we use.

The problem is that it seems the dialog module cannot apply the new avp value to the dialog timeout. Check dialog module docs:


** It may be used only in a request (initial or sequential) context**

Using opensipsctl fifo dlg_list, I can see that the timeout value is set to 43200 seconds, which is the dafault value, even after setting the timeout avp in onreply_route:

# opensipsctl fifo dlg_list
dialog::  hash=1571:444747590
state:: 4
user_flags:: 0
timestart:: 1352912021
timeout:: 1352955222
callid:: [hidden email]
from_uri:: [hidden email]
to_uri:: [hidden email]
caller_tag:: uac191.190.218.180
caller_contact:: sip:10.22.136.172;transport=tcp;did=326.53fb7ac1
callee_cseq:: 0
caller_route_set:: 
caller_bind_addr:: tcp:10.22.137.64:5060
callee_tag:: uas291.190.218.170
callee_contact:: sip:10.22.136.170;transport=tcp;did=326.7efc7653
caller_cseq:: 1
callee_route_set:: 
callee_bind_addr:: tcp:10.22.137.25:5060

I understand the dialog module won´t apply any change in the avp from onreply_route, doesn´t matter if done manually or through SST module... =/

Thanks again!
Mariana.


On Wed, Nov 14, 2012 at 3:17 PM, Muhammad Shahzad <[hidden email]> wrote:
Well, i think if you have enabled onreply_avp_mode in TM module then you can access and change AVP you set in route block in on_reply block. I don't see any reason why you need to modify opensips source code for this.


Just change value of SST AVP as i mentioned in previous email when you get final reply from upstream. However make sure onreply_avp_mode is set as mentioned in about link.

Thank you.



On Wed, Nov 14, 2012 at 5:37 PM, Mariana Arduini <[hidden email]> wrote:
Hi Muhammad!

Thanks for replying.

I looked at SST module and, at least from docs, there is no mention to using it for the 200 OK, only for INVITES...

Even so, I think the problem is that the dialog module does not update the timeout value for 200 OK. For example, if you want to refresh the timeout value when you get an UPDATE message, you have to set the avp configured in timeout_avp modparam and then call match_dialog()/loose_route(), because either of these functions will actually update the dialog, and setting the avp without calling them will take no effect. I guess the same thing is happening when I set the avp after receiving the 200 OK.

Any help on what should be changed in OpenSIPS code so that setting the avp in onreply_route will take effect on the dialog timeout?

Thanks!
Mariana


On Wed, Nov 14, 2012 at 1:38 PM, Muhammad Shahzad <[hidden email]> wrote:
Use SST module,


Thank you.


On Tue, Nov 13, 2012 at 8:25 PM, Mariana Arduini <[hidden email]> wrote:
Hello all,

I know from the docs that dialog module param timeout_avp " ... may be used only in a request (initial or sequential) context", but we have a scenario where the UAS should be the session timer refresher, then we can only set the timeout_avp value when we get the Session-expires header value in 200 OK.

May I ask what would be the best approach to this, like modifying OpenSIPS code to be able to actually set the avp from onreply_route? If this is the case, can you please guide us on what would need to be changed?

Thanks in advance,

Mariana.

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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: <a moz-do-not-send="true" href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: <a moz-do-not-send="true" href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]
_______________________________________________ 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: Dialog timeout_avp and onreply_route

marianarduini
Hello Vlad,

Thanks for explaining, I will try to use sst module then!

Regards,
Mariana.


On Thu, Nov 15, 2012 at 8:28 AM, Vlad Paiu <[hidden email]> wrote:
Hello,

When using the SST module, refreshing in-dialog replies should work, since the internal callbacks are called before the dialog module updates it's timeout values.
Still, is you set the AVP in the onreply_route, that is known not to work since the updating of timeout values is done before the onreply_route is triggered.

indeed  this is some sort of bug, that we intend to fix in the future 1.9 release, by triggering event routes for different events that occur for the dialog module.

Regards,
Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com 

On 11/14/2012 07:59 PM, Muhammad Shahzad wrote:
Then its a bug and need to be reported at,

http://sourceforge.net/tracker/?group_id=232389&atid=1086410

Thank you.


On Wed, Nov 14, 2012 at 6:43 PM, Mariana Arduini <[hidden email]> wrote:

Hi Muhammad,

"Well, i think if you have enabled onreply_avp_mode in TM module then you can access and change AVP you set in route block in on_reply block. I don't see any reason why you need to modify opensips source code for this."
Yes, I have that enabled in tm module, and in fact I can change avp values in onreply_route, from what I see in other avps we use.

The problem is that it seems the dialog module cannot apply the new avp value to the dialog timeout. Check dialog module docs:


** It may be used only in a request (initial or sequential) context**

Using opensipsctl fifo dlg_list, I can see that the timeout value is set to 43200 seconds, which is the dafault value, even after setting the timeout avp in onreply_route:

# opensipsctl fifo dlg_list
dialog::  hash=1571:444747590
state:: 4
user_flags:: 0
timestart:: 1352912021
timeout:: 1352955222
callid:: [hidden email]
from_uri:: [hidden email]
to_uri:: [hidden email]
caller_tag:: uac191.190.218.180
caller_contact:: sip:10.22.136.172;transport=tcp;did=326.53fb7ac1
callee_cseq:: 0
caller_route_set:: 
caller_bind_addr:: tcp:10.22.137.64:5060
callee_tag:: uas291.190.218.170
callee_contact:: sip:10.22.136.170;transport=tcp;did=326.7efc7653
caller_cseq:: 1
callee_route_set:: 
callee_bind_addr:: tcp:10.22.137.25:5060

I understand the dialog module won´t apply any change in the avp from onreply_route, doesn´t matter if done manually or through SST module... =/

Thanks again!
Mariana.


On Wed, Nov 14, 2012 at 3:17 PM, Muhammad Shahzad <[hidden email]> wrote:
Well, i think if you have enabled onreply_avp_mode in TM module then you can access and change AVP you set in route block in on_reply block. I don't see any reason why you need to modify opensips source code for this.


Just change value of SST AVP as i mentioned in previous email when you get final reply from upstream. However make sure onreply_avp_mode is set as mentioned in about link.

Thank you.



On Wed, Nov 14, 2012 at 5:37 PM, Mariana Arduini <[hidden email]> wrote:
Hi Muhammad!

Thanks for replying.

I looked at SST module and, at least from docs, there is no mention to using it for the 200 OK, only for INVITES...

Even so, I think the problem is that the dialog module does not update the timeout value for 200 OK. For example, if you want to refresh the timeout value when you get an UPDATE message, you have to set the avp configured in timeout_avp modparam and then call match_dialog()/loose_route(), because either of these functions will actually update the dialog, and setting the avp without calling them will take no effect. I guess the same thing is happening when I set the avp after receiving the 200 OK.

Any help on what should be changed in OpenSIPS code so that setting the avp in onreply_route will take effect on the dialog timeout?

Thanks!
Mariana


On Wed, Nov 14, 2012 at 1:38 PM, Muhammad Shahzad <[hidden email]> wrote:
Use SST module,


Thank you.


On Tue, Nov 13, 2012 at 8:25 PM, Mariana Arduini <[hidden email]> wrote:
Hello all,

I know from the docs that dialog module param timeout_avp " ... may be used only in a request (initial or sequential) context", but we have a scenario where the UAS should be the session timer refresher, then we can only set the timeout_avp value when we get the Session-expires header value in 200 OK.

May I ask what would be the best approach to this, like modifying OpenSIPS code to be able to actually set the avp from onreply_route? If this is the case, can you please guide us on what would need to be changed?

Thanks in advance,

Mariana.

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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]
_______________________________________________ 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: Dialog timeout_avp and onreply_route

marianarduini
So, I tried this:

modparam("dialog", "timeout_avp", "$avp(session_expires)")
...
modparam("sst", "min_se", 90)
modparam("sst", "timeout_avp", "$avp(session_expires)")
modparam("sst", "sst_flag", 6)

and in onreply_route:

    if (t_check_status("200")) {   
        if ($(hdr(Session-Expires))) {
            sstCheckMin("0");
            setflag(6);
        }
    }

Still I see the dialog timeout set to 43200 seconds, instead of the value sent in header Session-Expires in the 200 OK.

Am I using SST module properly? Please advise.

Thanks,
Mariana.


On Thu, Nov 15, 2012 at 9:29 AM, Mariana Arduini <[hidden email]> wrote:
Hello Vlad,

Thanks for explaining, I will try to use sst module then!

Regards,
Mariana.


On Thu, Nov 15, 2012 at 8:28 AM, Vlad Paiu <[hidden email]> wrote:
Hello,

When using the SST module, refreshing in-dialog replies should work, since the internal callbacks are called before the dialog module updates it's timeout values.
Still, is you set the AVP in the onreply_route, that is known not to work since the updating of timeout values is done before the onreply_route is triggered.

indeed  this is some sort of bug, that we intend to fix in the future 1.9 release, by triggering event routes for different events that occur for the dialog module.

Regards,
Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com 

On 11/14/2012 07:59 PM, Muhammad Shahzad wrote:
Then its a bug and need to be reported at,

http://sourceforge.net/tracker/?group_id=232389&atid=1086410

Thank you.


On Wed, Nov 14, 2012 at 6:43 PM, Mariana Arduini <[hidden email]> wrote:

Hi Muhammad,

"Well, i think if you have enabled onreply_avp_mode in TM module then you can access and change AVP you set in route block in on_reply block. I don't see any reason why you need to modify opensips source code for this."
Yes, I have that enabled in tm module, and in fact I can change avp values in onreply_route, from what I see in other avps we use.

The problem is that it seems the dialog module cannot apply the new avp value to the dialog timeout. Check dialog module docs:


** It may be used only in a request (initial or sequential) context**

Using opensipsctl fifo dlg_list, I can see that the timeout value is set to 43200 seconds, which is the dafault value, even after setting the timeout avp in onreply_route:

# opensipsctl fifo dlg_list
dialog::  hash=1571:444747590
state:: 4
user_flags:: 0
timestart:: 1352912021
timeout:: 1352955222
callid:: [hidden email]
from_uri:: [hidden email]
to_uri:: [hidden email]
caller_tag:: uac191.190.218.180
caller_contact:: sip:10.22.136.172;transport=tcp;did=326.53fb7ac1
callee_cseq:: 0
caller_route_set:: 
caller_bind_addr:: tcp:10.22.137.64:5060
callee_tag:: uas291.190.218.170
callee_contact:: sip:10.22.136.170;transport=tcp;did=326.7efc7653
caller_cseq:: 1
callee_route_set:: 
callee_bind_addr:: tcp:10.22.137.25:5060

I understand the dialog module won´t apply any change in the avp from onreply_route, doesn´t matter if done manually or through SST module... =/

Thanks again!
Mariana.


On Wed, Nov 14, 2012 at 3:17 PM, Muhammad Shahzad <[hidden email]> wrote:
Well, i think if you have enabled onreply_avp_mode in TM module then you can access and change AVP you set in route block in on_reply block. I don't see any reason why you need to modify opensips source code for this.


Just change value of SST AVP as i mentioned in previous email when you get final reply from upstream. However make sure onreply_avp_mode is set as mentioned in about link.

Thank you.



On Wed, Nov 14, 2012 at 5:37 PM, Mariana Arduini <[hidden email]> wrote:
Hi Muhammad!

Thanks for replying.

I looked at SST module and, at least from docs, there is no mention to using it for the 200 OK, only for INVITES...

Even so, I think the problem is that the dialog module does not update the timeout value for 200 OK. For example, if you want to refresh the timeout value when you get an UPDATE message, you have to set the avp configured in timeout_avp modparam and then call match_dialog()/loose_route(), because either of these functions will actually update the dialog, and setting the avp without calling them will take no effect. I guess the same thing is happening when I set the avp after receiving the 200 OK.

Any help on what should be changed in OpenSIPS code so that setting the avp in onreply_route will take effect on the dialog timeout?

Thanks!
Mariana


On Wed, Nov 14, 2012 at 1:38 PM, Muhammad Shahzad <[hidden email]> wrote:
Use SST module,


Thank you.


On Tue, Nov 13, 2012 at 8:25 PM, Mariana Arduini <[hidden email]> wrote:
Hello all,

I know from the docs that dialog module param timeout_avp " ... may be used only in a request (initial or sequential) context", but we have a scenario where the UAS should be the session timer refresher, then we can only set the timeout_avp value when we get the Session-expires header value in 200 OK.

May I ask what would be the best approach to this, like modifying OpenSIPS code to be able to actually set the avp from onreply_route? If this is the case, can you please guide us on what would need to be changed?

Thanks in advance,

Mariana.

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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]
_______________________________________________ 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: Dialog timeout_avp and onreply_route

marianarduini
Hello all,

Any hint on this issue, please?

Thanks in advance.
Mariana.


On Fri, Nov 16, 2012 at 11:33 AM, Mariana Arduini <[hidden email]> wrote:
So, I tried this:

modparam("dialog", "timeout_avp", "$avp(session_expires)")
...
modparam("sst", "min_se", 90)
modparam("sst", "timeout_avp", "$avp(session_expires)")
modparam("sst", "sst_flag", 6)

and in onreply_route:

    if (t_check_status("200")) {   
        if ($(hdr(Session-Expires))) {
            sstCheckMin("0");
            setflag(6);
        }
    }

Still I see the dialog timeout set to 43200 seconds, instead of the value sent in header Session-Expires in the 200 OK.

Am I using SST module properly? Please advise.

Thanks,
Mariana.


On Thu, Nov 15, 2012 at 9:29 AM, Mariana Arduini <[hidden email]> wrote:
Hello Vlad,

Thanks for explaining, I will try to use sst module then!

Regards,
Mariana.


On Thu, Nov 15, 2012 at 8:28 AM, Vlad Paiu <[hidden email]> wrote:
Hello,

When using the SST module, refreshing in-dialog replies should work, since the internal callbacks are called before the dialog module updates it's timeout values.
Still, is you set the AVP in the onreply_route, that is known not to work since the updating of timeout values is done before the onreply_route is triggered.

indeed  this is some sort of bug, that we intend to fix in the future 1.9 release, by triggering event routes for different events that occur for the dialog module.

Regards,
Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com 

On 11/14/2012 07:59 PM, Muhammad Shahzad wrote:
Then its a bug and need to be reported at,

http://sourceforge.net/tracker/?group_id=232389&atid=1086410

Thank you.


On Wed, Nov 14, 2012 at 6:43 PM, Mariana Arduini <[hidden email]> wrote:

Hi Muhammad,

"Well, i think if you have enabled onreply_avp_mode in TM module then you can access and change AVP you set in route block in on_reply block. I don't see any reason why you need to modify opensips source code for this."
Yes, I have that enabled in tm module, and in fact I can change avp values in onreply_route, from what I see in other avps we use.

The problem is that it seems the dialog module cannot apply the new avp value to the dialog timeout. Check dialog module docs:


** It may be used only in a request (initial or sequential) context**

Using opensipsctl fifo dlg_list, I can see that the timeout value is set to 43200 seconds, which is the dafault value, even after setting the timeout avp in onreply_route:

# opensipsctl fifo dlg_list
dialog::  hash=1571:444747590
state:: 4
user_flags:: 0
timestart:: 1352912021
timeout:: 1352955222
callid:: [hidden email]
from_uri:: [hidden email]
to_uri:: [hidden email]
caller_tag:: uac191.190.218.180
caller_contact:: sip:10.22.136.172;transport=tcp;did=326.53fb7ac1
callee_cseq:: 0
caller_route_set:: 
caller_bind_addr:: tcp:10.22.137.64:5060
callee_tag:: uas291.190.218.170
callee_contact:: sip:10.22.136.170;transport=tcp;did=326.7efc7653
caller_cseq:: 1
callee_route_set:: 
callee_bind_addr:: tcp:10.22.137.25:5060

I understand the dialog module won´t apply any change in the avp from onreply_route, doesn´t matter if done manually or through SST module... =/

Thanks again!
Mariana.


On Wed, Nov 14, 2012 at 3:17 PM, Muhammad Shahzad <[hidden email]> wrote:
Well, i think if you have enabled onreply_avp_mode in TM module then you can access and change AVP you set in route block in on_reply block. I don't see any reason why you need to modify opensips source code for this.


Just change value of SST AVP as i mentioned in previous email when you get final reply from upstream. However make sure onreply_avp_mode is set as mentioned in about link.

Thank you.



On Wed, Nov 14, 2012 at 5:37 PM, Mariana Arduini <[hidden email]> wrote:
Hi Muhammad!

Thanks for replying.

I looked at SST module and, at least from docs, there is no mention to using it for the 200 OK, only for INVITES...

Even so, I think the problem is that the dialog module does not update the timeout value for 200 OK. For example, if you want to refresh the timeout value when you get an UPDATE message, you have to set the avp configured in timeout_avp modparam and then call match_dialog()/loose_route(), because either of these functions will actually update the dialog, and setting the avp without calling them will take no effect. I guess the same thing is happening when I set the avp after receiving the 200 OK.

Any help on what should be changed in OpenSIPS code so that setting the avp in onreply_route will take effect on the dialog timeout?

Thanks!
Mariana


On Wed, Nov 14, 2012 at 1:38 PM, Muhammad Shahzad <[hidden email]> wrote:
Use SST module,


Thank you.


On Tue, Nov 13, 2012 at 8:25 PM, Mariana Arduini <[hidden email]> wrote:
Hello all,

I know from the docs that dialog module param timeout_avp " ... may be used only in a request (initial or sequential) context", but we have a scenario where the UAS should be the session timer refresher, then we can only set the timeout_avp value when we get the Session-expires header value in 200 OK.

May I ask what would be the best approach to this, like modifying OpenSIPS code to be able to actually set the avp from onreply_route? If this is the case, can you please guide us on what would need to be changed?

Thanks in advance,

Mariana.

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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
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




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]
_______________________________________________ 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