<div dir="ltr">Have you tried <a href="https://kamailio.org/docs/modules/5.1.x/modules/dialog.html#dialog.p.timeout_avp">timeout_avp</a> to set the timeout per dialog?<br><div><br></div><div>In a state 4, that is confirmed, my understanding i that the lifetime is added on top of start_ts, not init_ts. If so, I don't see why you'd want to go thru the trouble of catching the 200 OK moment to start counting.</div><div><br></div><div>Example: </div><div><br></div><div>      "state":  4,<br>      "start_ts": 1578061585,<br>      "init_ts":  1578061562,<br>      "timeout":  1578083185,<br>      "lifetime": 21600<br></div><div><br></div><div>Cheers.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 3, 2020 at 7:15 AM Pepelux <<a href="mailto:pepeluxx@gmail.com">pepeluxx@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Daniel</div><div><br></div><div>By default the dialog timeout is 2 hours:</div><div>modparam("dialog", "default_timeout", 7200)<br></div><div><br></div><div>But I want to set a different max time for each dialog (depending of the customer). For that I use dlg_set_timeout() when dialog starts. On this case 10 secs is only a test</div><div><br></div><div>If I use this function just after the dlg_manage() I obtain no error, but the goal is to start when the '200 OK' code is received</div><div><br></div><div><div>Cheers</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 3 Jan 2020 at 13:01, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello,</div><div><br></div><div>do you set/update the dialog timeout in other places in the config file? Because you say:</div><div><br></div><div>"But when the time expired I obtain this error ..."</div><div><br></div><div>Cheers,<br></div><div>Daniel<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 3, 2020 at 12:08 PM Pepelux <<a href="mailto:pepeluxx@gmail.com" target="_blank">pepeluxx@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi all<div><br></div><div>I'm trying to set a dialog timeout when a call is established:</div><div><br></div><div>event_route[dialog:start] {<br>     if(dlg_set_timeout("10")) {<br>          xinfo("10 secs");<br>     }<br>}<br></div><div><br></div><div>But when the time expired I obtain this error:</div><div><br></div><div>Jan  3 11:24:20 test /usr/sbin/kamailio[18436]: CRITICAL: dialog [dlg_timer.c:199]: update_dlg_timer(): Trying to update a bogus dlg tl=0x93947b30 tl->next=(nil) tl->prev=(nil)<br>Jan  3 11:24:20 test /usr/sbin/kamailio[18436]: ERROR: dialog [dlg_hash.c:1267]: update_dlg_timeout(): failed to update dialog lifetime<br></div><div><br></div><div># kamailio -v<br>version: kamailio 5.3.1 (i386/linux) <br>flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES<br>ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB<br>poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.<br>id: unknown <br>compiled with gcc 6.3.0<br></div><div><br></div><div>Any idea?</div><div><br></div><div>Thanks and Happy New Year</div><div><br></div></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Daniel-Constantin Mierla - <a href="https://www.asipto.com" target="_blank">https://www.asipto.com</a></div><div><a href="https://twitter.com/miconda" target="_blank">https://twitter.com/miconda</a> - <a href="https://www.linkedin.com/in/miconda" target="_blank">https://www.linkedin.com/in/miconda</a></div><div>Kamailio Advanced Training - <a href="https://www.asipto.com/u/kat" target="_blank">https://www.asipto.com/u/kat</a></div></div></div></div></div></div></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>