[Home]

Summary:ASTERISK-11079: Parametrized DEFAULT_FREQ_OK (Qualification: How often to check for the host to be up)
Reporter:Pavol Luptak (wilder)Labels:
Date Opened:2007-12-18 18:03:04.000-0600Date Closed:2008-01-10 18:36:22.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) qualifyfreq5.patch
( 1) qualityfreq3.patch
Description:I have made the simple patch that allows dynamically change DEFAULT_FREQ_OK parameter in sip.conf that is currently static constant in chan_sip.c.
I really needed this option for my 3G Internet connection and it was quite annoying to recompile all Asterisk sources still again and again.

The new parameter in sip.conf is called "qualifyfreq". The value of this parameter is in seconds. Each peer can have different value "qualifyfreq" - the default value is 60 seconds. The current value of "qualifyfreq" can be shown using "sip show peer XYZ".

The patch (for the latest Asterisk Trunk) can be found here:
http://hq.sk/~wilder/qualifyfreq3.patch

I tested it with my colleague and it works without problem (it's too simple to have bugs :-)
Comments:By: Olle Johansson (oej) 2007-12-19 01:01:00.000-0600

Ok, waiting for your license to clear, then we'll go ahead.

By: Russell Bryant (russell) 2007-12-27 15:40:58.000-0600

This is almost ready.  Just a couple comments ...

1) I would keep the DEFAULT_FREQ_OK constant, and use that to initialize the default value.

2) sip.conf.sample needs to be updated for the new option.

By: Olle Johansson (oej) 2007-12-27 16:20:00.000-0600

...and we need a global setting too, which is the default for all devices, in the current trunk both users and peers.

By: Pavol Luptak (wilder) 2007-12-27 16:25:06.000-0600

No problem - I will write the patch that will include DEFAULT_FREQ_OK constant, updated sip.conf.sample and also "global setting" possibility as soon as I come back home (currently I am at CCC in Berlin).

By: Pavol Luptak (wilder) 2008-01-03 04:41:02.000-0600

Look for uploaded qualifyfreq5.patch (http://hq.sk/~wilder/qualifyfreq5.patch), md5sum is "94676916244c2175bea2ebbdd91be2ba" that fixes all above-mentioned issues:

- global setting is possible (if not set, it is derived from DEFAULT_FREQ_OK constant)
- local setting per each peer is possible (if not set, it is derived from global setting)
- sip.conf.sample is updated for the new option
- the patch has been thoroughly tested

By: Digium Subversion (svnbot) 2008-01-10 18:36:21.000-0600

Repository: asterisk
Revision: 98027

U   trunk/CHANGES
U   trunk/channels/chan_sip.c
U   trunk/configs/sip.conf.sample

------------------------------------------------------------------------
r98027 | russell | 2008-01-10 18:36:18 -0600 (Thu, 10 Jan 2008) | 9 lines

Add a new global and per-peer option to chan_sip, qualifyfreq, which allows you
to set the qualify frequency.

(closes issue ASTERISK-11079)
Reported by: wilder
Patches:
     qualifyfreq5.patch uploaded by wilder (license 362)
  -- with some mods by me

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=98027