[OpenSER-Users] How to expose the expires value in REGISTER
Christian Schlatter
cs at unc.edu
Thu Nov 1 04:45:34 CET 2007
Christian Schlatter wrote:
> Robert Dyck wrote:
>> I am wondering how to expose and test the value of the expires parameter in a
>> REGISTER request.
>>
>> I am experimenting with openser as the basis for a home phone network. I use
>> multiple devices with the same user ID. They register locally ( with no
>> reply ) and with an external service provider. The contacts are mangled to
>> show the public address of openser. Multiple registrations result in a single
>> AOR at the external registrar. Incoming calls from the outside are forked and
>> ring the local phones. Local phones can also call each other without the
>> hairpin problem associated with STUN enabled phones.
>>
>> The problem is that a softphone will deregister when it is closed or its
>> profile changes. This would deregister the AOR at the external registrar. The
>> remaining phones could not receive calls from the outside until they
>> refreshed their registrations.
>>
>> I would like to prevent deregistration at the external registrar unless the
>> phone that was deregistering was the only remaining one. The first step would
>> be to identify REGISTER messages where the expires value is equal to zero.
>
> Both 'Expires' header and 'expires' contact uri parameter have to be
> checked like e.g.
>
> if ((is_present_hf("Expires") && $(hdr(Expires){s.int}) == 0) ||
> ($(ct{param.value,expires}) == '0'))
> {
> # someone tries to unregister
> }
Of course this only makes sense for REGISTER messages:
if (is_method("REGISTER")) ...
/Christian
>
> Have a look at
> http://www.openser.org/dokuwiki/doku.php/transformations:1.2.x if you're
> not familiar with the PV transformations introduced with 1.2.
>
> /Christian
>
>> Any thoughts?
>> Thanks Rob
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.openser.org
>> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
More information about the Users
mailing list