[asterisk-dev] [Code Review] 4536: iax2_poke_noanswer expiration timer too short

Y Ateya reviewboard at asterisk.org
Thu Apr 2 17:00:18 CDT 2015



> On April 1, 2015, 1:07 a.m., Matt Jordan wrote:
> > trunk/channels/chan_iax2.c, line 12370
> > <https://reviewboard.asterisk.org/r/4536/diff/1/?file=72980#file72980line12370>
> >
> >     The usage of max_retries here feels arbitrary. I'm not against this being controlled more dynamically based on the last known qualify time, but I'd rather just see that be 4 or 8 here, as appropriate.
> 
> Mark Michelson wrote:
>     Just going to chime in with my agreement here. I'm not sure how max_retries fits into this.

The purpose of dependence on max_retries (and qualify) was to allow for POKE to be retried max_retries time (based on qualify value); Using a magic number (ex. multiply by 8) don't give any insight about why did you do this.

NOTE: As retry time changes after consecutive retries it will do less than max_retries retries before iax2_poke_noanswer expiration. For example: If retry time is 500ms, first retry will be after 500ms, second retry will be 5 seconds (500ms * 10), third retry after 10seconds (5 seconds * 10, cieled to MAX_RETRY_TIME -10s-), fourth retry after 10s.


- Y


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4536/#review15007
-----------------------------------------------------------


On March 26, 2015, 11:42 p.m., Y Ateya wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4536/
> -----------------------------------------------------------
> 
> (Updated March 26, 2015, 11:42 p.m.)
> 
> 
> Review request for Asterisk Developers and rnewton.
> 
> 
> Bugs: ASTERISK-24894
>     https://issues.asterisk.org/jira/browse/ASTERISK-24894
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Increase POKE retry window from DEFAULT_MAXMS * 2 (4 seconds) to bigger number (derived from qualify time; which control POKE retry time).
> 
> 
> Diffs
> -----
> 
>   trunk/channels/chan_iax2.c 432806 
> 
> Diff: https://reviewboard.asterisk.org/r/4536/diff/
> 
> 
> Testing
> -------
> 
> - Tried test with multiple qualify values (2 and 10 seconds).
> - Tried test with 100% packets loss to ensure that when a POKE packet is dropped it will be retried couple of time before declaring client disconnected.
> 
> 
> Thanks,
> 
> Y Ateya
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150402/9167024a/attachment.html>


More information about the asterisk-dev mailing list