[asterisk-bugs] [JIRA] (ASTERISK-24894) [patch] iax2_poke_noanswer expiration timer too short
Asterisk Team (JIRA)
noreply at issues.asterisk.org
Thu May 21 15:26:34 CDT 2015
[ https://issues.asterisk.org/jira/browse/ASTERISK-24894?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Asterisk Team updated ASTERISK-24894:
-------------------------------------
Target Release Version/s: 11.18.0
> [patch] iax2_poke_noanswer expiration timer too short
> -----------------------------------------------------
>
> Key: ASTERISK-24894
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-24894
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Channels/chan_iax2
> Affects Versions: 13.2.0
> Reporter: Y Ateya
> Target Release: 11.18.0, 13.4.0
>
> Attachments: poke_noanswer_duration.diff
>
>
> POKE is used to check for peer availability, but it is not given enough time to retry in case of packet loss (if qualify time is high).
> If qualify time is set to 10 seconds ({{qualify = 1000}} in iax.conf); peer will be UNREACHABLE due to single packet loss.
> Here is the code snippet which start timer for poke_noasnwer
> {code}
> /* Speed up retransmission times for this qualify call */
> iaxs[peer->callno]->pingtime = peer->maxms / 4 + 1;
> iaxs[peer->callno]->peerpoke = peer;
> if (peer->pokeexpire > -1) {
> if (!AST_SCHED_DEL(sched, peer->pokeexpire)) {
> peer->pokeexpire = -1;
> peer_unref(peer);
> }
> }
> /* Queue up a new task to handle no reply */
> /* If the host is already unreachable then use the unreachable interval instead */
> if (peer->lastms < 0)
> peer->pokeexpire = iax2_sched_add(sched, peer->pokefreqnotok, iax2_poke_noanswer, peer_ref(peer));
> else
> peer->pokeexpire = iax2_sched_add(sched, DEFAULT_MAXMS * 2, iax2_poke_noanswer, peer_ref(peer));
> {code}
> In this code, if {{peer->lastms}} is more than 0 (i.e last ping or poke succeeded), {{iax2_poke_noanswer}} will be called if we didn't get POKE reply before {{DEFAULT_MAXMS * 2}} (i.e. 4 seconds).
> ping time value {noformat}iaxs[peer->callno]->pingtime = peer->maxms / 4 + 1;{noformat} will be {{10000 / 4 + 1}} (i.e 2.5 seconds).
> Since IAX frames are retried {{fr->retrytime = pvt->pingtime * 2;}}, so POKE frame will be retried every 5 seconds!
> So a single POKE packet loss will make the peer UNREACHABLE.
> To fix this, iax2_poke_noanswer timer shall be long enough allow for proper retries for POKE packet.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list