[asterisk-bugs] [JIRA] (ASTERISK-24894) [patch] iax2_poke_noanswer expiration timer too short
Rusty Newton (JIRA)
noreply at issues.asterisk.org
Thu Mar 26 18:37:34 CDT 2015
[ https://issues.asterisk.org/jira/browse/ASTERISK-24894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=225636#comment-225636 ]
Rusty Newton commented on ASTERISK-24894:
-----------------------------------------
Thanks [~yateya] , now you can get that patch on reviewboard.asterisk.org to speed it along even faster.
From: https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process
{quote}
At this time, it is appropriate to put your patch up for code review. The Asterisk project uses Review Board for peer review of patches - for instructions on how to submit your patch to Review Board, see Review Board Usage.
All users who have signed a license contributor agreement have access to Review Board and are encouraged to participate in the peer review process. This includes not only review of your patch, but review of other patches as well.
{quote}
> [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
> 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 {{iaxs[peer->callno]->pingtime * 2 * max_retries}} to 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