[Devel] Notify CSeq number not increased?

sukerry sukerry at 126.com
Tue Mar 27 08:57:20 CEST 2007


Anca-Maria Vamanu,

Thanks a lot, I have tested it again. local cseq is ok now, but remote cseq in active_watchers table is not increased all the time. I modified subscribe.c to remove this bug. 

Howerver, I still find some issues in openser presence code:

1).  In p_tm_callback fuction in notify.c, we should not remove subscription when get 408 (transaction time out) response,which is auto generated by openser uac module when it can not get NOTIFY response from softphone in a certain time. For that due to occasional instant network error or cpu high load, the presence client ( softphone) may not handle NOTIFY  in time, in this case, openser should maintain the subscription to improve interoperatability. Maybe a more suitable way is to add a column named "error times" to active_watchers table to record softphone response time out error, only when time-out times reach a certain number does openser remove the subscription.
I also slightly modified notify.c to remove this "bug"

2).  in publish.c, I have modified the line below to improve interoperatability:
if(strncmp(hdr->name.s, "SIP-If-Match",12)==0 || strncmp(hdr->name.s,"Sip-If-Match",12)==0)//modified by sukerry
 that is because sometimes client message  bears "Sip-If-Match" header but not "SIP-If-Match" header.

After I modified the codes mentioned above, I took a strict test and found that  my clients work well with openser presence module!!
I have posted notify.c, subscribe.c , publish.c as ATTACHED.

By the way, HOW can I apply to submit code to SVN? I am very interested in developing openser with tech fans from all parts of the world!!

	

Best Regards

sukerry

======= 2007-03-27 00:26:07 you wrote=======

>I have just commited the fixup on svn, in devel version.
>Hope it works now.
>I have added new column in active_watcher table so please update your
>database.
>Let me know if you still encounter errors.
>
>Best regards,
>
>Anca
>
>Anca Vamanu wrote:
>
>>Hello,
>>
>>Congrads for finding the sorce of error :) .
>>In the majority of the cases the dialog informations are queried from
>>database. There are some cases in which the subs structure is filled
>>with information from Subscribe message, therefore the cseq is that in
>>Subscribe. Here is when the error takes place.
>>I am fixing it now. I will delimit between local and remote cseq and be
>>sure always to use the local_cseq when sending Notify.
>>Thanks a lot.
>>
>>Best regards,
>>
>>Anca Vamanu
>>
>>
>>sukerry wrote:
>>
>>  
>>
>>>I have resolved this problem! I think in the active_watchers table, the cseq field should record NOTIFY CSEQ (local cseq) but not SUBSCRIBE CSEQ (remote cseq)  .
>>>
>>>I modified notify.c as follows:
>>>
>>>a. before a notify message is sent , we read "atcive_watchers.cseq" and set "active_watchers.cseq+1" as CSEQ number of NOTIFY message ;
>>>b. after notify message is sent, we increased active_watchers.cseq by one ;
>>>
>>>
>>>I have posted modified notify.c as attachment.  all the changes are between lines:
>>>
>>>//////////////////////////added by sukerry/////////////////////  
>>>
>>> or
>>>
>>>/////////////////////////modified by sukerry////////////////////
>>>
>>>
>>>Thanks for your time
>>>
>>>	
>>>
>>>======= 2007-03-24 14:14:40 Kerry wrote:=======
>>>
>>> 
>>>
>>>    
>>>
>>>>Anca-Maria Vamanu,
>>>>
>>>>Thank you very much for your work, but problem still occurs.
>>>>
>>>>Please refer to the attached for my test result (packets captured by ethereal)
>>>>
>>>>	
>>>>
>>>>======= 2007-03-23 20:17:37 =======
>>>>
>>>>   
>>>>
>>>>      
>>>>
>>>>>Hi,
>>>>>
>>>>>It should be fixed now.
>>>>>
>>>>>Best regards,
>>>>>
>>>>>Anca Vamanu
>>>>>
>>>>>Anca-Maria Vamanu wrote:
>>>>>
>>>>>     
>>>>>
>>>>>        
>>>>>
>>>>>>Hello,
>>>>>>
>>>>>>I will look into it and solve the error if there is one.
>>>>>>Thanks for reporting.
>>>>>>
>>>>>>Best regards
>>>>>>
>>>>>>Anca Vamanu
>>>>>>
>>>>>>
>>>>>>sukerry wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>       
>>>>>>
>>>>>>          
>>>>>>
>>>>>>>Hi All,
>>>>>>>
>>>>>>>When I am testing presence service of openser, I find that after the server establishes subscription dialog, it sometimes will not send Notify messages
>>>>>>>in sequence, which means the CSEQ number is not increased while new transaction is created. The result of this problem is that the UA regard new 
>>>>>>>NOTIFY message as mismatched.
>>>>>>>
>>>>>>>
>>>>>>>I am tring to modify notify.c in order to solve this problem, but there still not be any clue yet.
>>>>>>>
>>>>>>>I wish someone will help me or co-work with me!
>>>>>>>
>>>>>>>Thanks.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>				 
>>>>>>>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡sukerry
>>>>>>>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡sukerry at 126.com
>>>>>>>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2007-03-23
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>------------------------------------------------------------------------
>>>>>>>
>>>>>>>_______________________________________________
>>>>>>>Devel mailing list
>>>>>>>Devel at openser.org
>>>>>>>http://openser.org/cgi-bin/mailman/listinfo/devel
>>>>>>>
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>>         
>>>>>>>
>>>>>>>            
>>>>>>>
>>>>>>_______________________________________________
>>>>>>Devel mailing list
>>>>>>Devel at openser.org
>>>>>>http://openser.org/cgi-bin/mailman/listinfo/devel
>>>>>>
>>>>>>
>>>>>>
>>>>>>       
>>>>>>
>>>>>>          
>>>>>>
>>>>>_______________________________________________
>>>>>Devel mailing list
>>>>>Devel at openser.org
>>>>>http://openser.org/cgi-bin/mailman/listinfo/devel
>>>>>
>>>>>     
>>>>>
>>>>>        
>>>>>

>>>>
>>>>_______________________________________________
>>>>Devel mailing list
>>>>Devel at openser.org
>>>>http://openser.org/cgi-bin/mailman/listinfo/devel
>>>>
>>>>   
>>>>
>>>>      
>>>>
>>>				 
>>>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡sukerry
>>>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡sukerry at 126.com
>>>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2007-03-25
>>>
>>> 
>>>
>>>    
>>>
>>
>>
>>_______________________________________________
>>Devel mailing list
>>Devel at openser.org
>>http://openser.org/cgi-bin/mailman/listinfo/devel
>>
>>  
>>
>
>


				 
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡sukerry
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡sukerry at 126.com
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2007-03-27

-------------- next part --------------
A non-text attachment was scrubbed...
Name: notify.c
Type: application/octet-stream
Size: 49981 bytes
Desc: not available
Url : http://openser.org/pipermail/devel/attachments/20070327/51d164aa/notify-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: publish.c
Type: application/octet-stream
Size: 13207 bytes
Desc: not available
Url : http://openser.org/pipermail/devel/attachments/20070327/51d164aa/publish-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: subscribe.c
Type: application/octet-stream
Size: 36608 bytes
Desc: not available
Url : http://openser.org/pipermail/devel/attachments/20070327/51d164aa/subscribe-0001.obj


More information about the Devel mailing list