By Date: <-- -->
By Thread: <-- -->

OPAL: TransmitSIPInfo() method



Hello,

You are not supposed to call Register with an expire field of 0.
However, I have added a guard against this.


Le samedi 28 janvier 2006 à 00:44 +0100, Jacek Stobnicki a écrit :
> Hello,
>  
> I've got a problem with SIPEndPoint::TransmitSIPInfo() function. It
> occurs when I call Register() - actually TransmitSIPInfo() - with
> timeout set to default value 0 (in my case - always). For the first
> time, when there is no active SIPRegisterInfo yet, all works ok -
> because constructor of that SIPRegisterInfo checks timeout, and if 0,
> it is set to default registrar TTL value from SIPEndPoint.
> But: when I call Register() again, with the same parameters (without
> corresponding Unregister()), TransmitSIPInfo() function checks list of
> active SIPInfo's. It finds one, and .... writes the timeout value of 0
> to "expires" field in SIP PDU. Because of this endpoint... unregisters
> from registrar (expires = 0 causes this).
>  
> I don't know is this intended behaviour, in my opinion not. 
>  
> So I changed code in this function (sipep.cxx, revision 2.97, line
> 1529) from:
>  
> info->SetExpire(timeout); // Adjust the expire field
>  
> to:
>  
> // Adjust the expire field
> if (!timeout) {
>   // get default values from endpoint
>   if (m == SIP_PDU::Method_REGISTER)
>     timeout = registrarTimeToLive.GetSeconds();
>   else if (m == SIP_PDU::Method_SUBSCRIBE)
>     timeout = notifierTimeToLive.GetSeconds();
> }
> info->SetExpire(timeout);
>  
> It seems to work correctly now.
>  
> Regards:
> Jacek Stobnicki
>  
-- 
 _      Damien Sandras
(o-     
//\     GnomeMeeting: http://www.gnomemeeting.org/
v_/_    FOSDEM 2006 : http://www.fosdem.org
        SIP Phone   : sip:dsandras (at) gnomemeeting.net 
                      sip:600000 (at) gnomemeeting.net

------------------------------------------------------------------------
Check the FAQ before asking! - http://www.openh323.org/~openh323/fom.cgi
The OpenH323 Project mailing list, using Mailman. To unsubscribe or
change your subscription options, goto
http://www.openh323.org/mailman/listinfo/openh323
Maintained by Quicknet Technologies, Inc - http://www.quicknet.net
------------------------------------------------------------------------