|Summary:||ASTERISK-14638: [patch] Not possible to specify expiry for peer callback|
|Date Opened:||2009-08-12 04:57:05||Date Closed:|
|Environment:||Attachments:||( 0) chan_sip.c-callbackexpiry.patch|
( 1) issue15701.txt
|Description:||It is possible in sip.conf to specify a callback extension for a peer. (This automatically causes a registration to be generated.) However it is not currently possible to control how long the callback extension is active for before it expires and is refreshed. This is a problem particularly when working behind a nat firewall because the nat binding tends to expire before the callback is refreshed causing the callback to fail to work.|
I propose the addition of the callbackexpiry parameter to sip.conf to provide this functionality
|Comments:||By: nick_lewis (nick_lewis) 2009-08-12 05:01:38|
Please find attached a patch to provide callback expiry.
(It is currently untested as trunk does not seem to compile at the moment.)
By: Olle Johansson (oej) 2009-09-03 14:12:51
I don't want to add anything more related to REGISTER with the silly stupid name "callback". That is just going to cause a lot of confusion.
Also, we have the "defaultexpiry" today, which sets reg expiry for outbound for all registrations. We should propably follow that and have "regexpiry" per device. That follows existing naming for expiration settings and makes much more sense.
By: Olle Johansson (oej) 2009-09-03 14:15:11
When you add new configuration options, you need to have a patch for sip.conf.sample too - just to make sure that it is not forgotten! :-)
By: Olle Johansson (oej) 2009-09-03 14:33:16
I am resetting the DEFAULT_CALLBACKEXPIRY to use the default_expiry setting like all outbound registrations. Also I see no point in using the s extension if there's no callback setting in the peer. If they set regexpiry without setting callback, then there's no registration.
Renamed the setting to "regexpiry".
Please test uploaded patch.
By: nick_lewis (nick_lewis) 2009-09-04 03:38:50
I would rather registration be explicitly configured for a peer using register=yes with default values for both callbackexten and regexpiry (s and 3600)
By: Olle Johansson (oej) 2009-09-04 04:06:10
I think we have two separate the issues here. You reported that you could not set expiry - let's solve that now and add the rest later.
I would say that register=yes would work if we have regexten, but on the other hand regexten causes other effects we might not want.
Ouch. sip.conf is really a pain.
Let's see. The hint in the dialplan points from exten to device. We have nothing that points from device to a "default extension" for this device other than regexten. We had to come up with something new, and that's why callbackexten was invented, which is a poor name. It should have been defaultexten or primaryexten or something. A reverse hint could be useful in many situations, like call transfers, forwards an others.
Anyway, let's focus on the expiry.