Thanks Sergiu

I'll try it

Cheers

On Fri, 3 Jan 2020 at 15:39, Sergiu Pojoga <pojogas@gmail.com> wrote:
Have you tried timeout_avp to set the timeout per dialog?

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.

Example: 

      "state":  4,
      "start_ts": 1578061585,
      "init_ts":  1578061562,
      "timeout":  1578083185,
      "lifetime": 21600

Cheers.

On Fri, Jan 3, 2020 at 7:15 AM Pepelux <pepeluxx@gmail.com> wrote:
Hi Daniel

By default the dialog timeout is 2 hours:
modparam("dialog", "default_timeout", 7200)

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

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

Cheers

On Fri, 3 Jan 2020 at 13:01, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
Hello,

do you set/update the dialog timeout in other places in the config file? Because you say:

"But when the time expired I obtain this error ..."

Cheers,
Daniel

On Fri, Jan 3, 2020 at 12:08 PM Pepelux <pepeluxx@gmail.com> wrote:
Hi all

I'm trying to set a dialog timeout when a call is established:

event_route[dialog:start] {
     if(dlg_set_timeout("10")) {
          xinfo("10 secs");
     }
}

But when the time expired I obtain this error:

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)
Jan 3 11:24:20 test /usr/sbin/kamailio[18436]: ERROR: dialog [dlg_hash.c:1267]: update_dlg_timeout(): failed to update dialog lifetime

# kamailio -v
version: kamailio 5.3.1 (i386/linux)
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
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 6.3.0

Any idea?

Thanks and Happy New Year

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users