diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c index 12a2335a321adf5b808ec8f6bdb5ec1fea5f8a50..07dd70c40818fb4e49119868f37caa9e699b42eb 100755 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -1255,14 +1255,15 @@ static void apply_peer(struct dundi_transaction *trans, struct dundi_peer *p) trans->flags |= FLAG_ENCRYPT; if (p->maxms) { trans->autokilltimeout = p->maxms; + trans->retranstimer = DUNDI_DEFAULT_RETRANS_TIMER; if (p->lastms > 1) { trans->retranstimer = p->lastms * 2; - if (trans->retranstimer > DUNDI_DEFAULT_RETRANS_TIMER) - trans->retranstimer = DUNDI_DEFAULT_RETRANS_TIMER; /* Keep it from being silly */ - if (trans->retranstimer < 10) - trans->retranstimer = 10; + if (trans->retranstimer < 150) + trans->retranstimer = 150; } + if (trans->retranstimer > DUNDI_DEFAULT_RETRANS_TIMER) + trans->retranstimer = DUNDI_DEFAULT_RETRANS_TIMER; } else trans->autokilltimeout = global_autokilltimeout; }