<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>I found out that asterisk responses a sip endpoint Subscribe msg a 200 OK with Expire set to 0 (the Expire header in the Subscribe msg was 3600). The sip endpoint will resend the subscribe msg when it receives the 200 response because it believes that the subscription has expired on the server. Sip endpoints flush sub. msgs to the server because of this response.</DIV>
<DIV>The problem is in chan_sip.c function sip_alloc. When receiving a Subscribe msg handle_request_subscribe creats a new sip_pvt without setting its member "expiry" - 0 is assumed as default. When custruct 200 OK it set header Expire with the value expiry in the newly construected sip_pvt which is 0. Initiate sip_pvt with its member expiry being set to DEFAULT_MAX_EXPIRY will fix this problem. </DIV>
<DIV>I am using asterisk 1.2.17 but the problem remains in 1.4.4 release. </DIV>
<DIV> </DIV>
<DIV>Should I report this as a bug or this is a configuration issue? </DIV>
<DIV> </DIV>
<DIV>-Ray</DIV><BR>
--
<p>
<a href="http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=en-mail_a_01" target=_blank>
<img alt="" src="http://a8-asy.a8ww.net/a8-ads/adftrview?redirectid=en-mail_i_01" border="0"></a>
</p>