[OpenSIPS-Devel] Fixing the 200OK - ACK race in OpenSIPS 1.4

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Feb 16 11:48:52 CET 2010


Hi Saúl,

Saúl Ibarra Corretgé wrote:
> Hi Bogdan,
>
> A while ago the race between 200OK and ACK was spotted and fixed 
> according to this ticket: 
> http://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2080954&group_id=232389
>
> That fix was made after version 1.4 was released, so this version 
> doesn't include it. Currently I can't upgrade OpenSIPS from version 1.4 
> and this issue started affecting so I tried backporting the fix myself.
>
> I backported svn revisions 5420 and 5422 but it didn't work :-(
>   
yes, that 2  revs should do it (the TM add on and the DIALOG fix)
> AFAIS in the changes, a new callback was added to the TM module to deal 
> with this situation (TMCP_RESPONSE_PRE_OUT) which should set the proper 
> state when the 200 OK is sent so the race with the ACK is avoided. Is 
> this correct?
>   
Correct
> Then, this callback is registered in the dlg_create_dialog function, but 
> OpenSIPS doesn't have this function and all the functionality seems to 
> be done in dlg_onreq. Because of this, rev 5422 doesn't apply correctly 
> to version 1.4, so I modified dlg_onreq to "match" dlg_create_dialog in 
> the following way:
>
>          if ( d_tmb.register_tmcb( 0, t,
>  
> TMCB_RESPONSE_PRE_OUT|TMCB_TRANS_DELETED|TMCB_RESPONSE_FWDED,
>                                  dlg_onreply, (void*)dlg, 0)<0 ) {
>                  LM_ERR("failed to register TMCB\n");
>                  goto error;
>          }
>   
Again correct.
> After some testing I can see the error is still occurring (I see bogus 
> state 6 for state 1 in the logs) so I'm a bit lost here.
>
> I know it's been long since you did this change but do you recall if 
> some other change needs to be backported or if am in the right path for 
> backporting this?
>   
It may not be an easy task as the dialog state machine was dramatically 
changed from 1.4 to 1.5, so an "adliteram" patch may not be valid for 1.4.

Maybe a solution for you will be trying to grab the whole dialog module 
from 1.5 and "fit" it to 1.4 (of course, you need to backport some TM 
dependencies also)

Best regards,
Bogdan
>
> Thank you in advance, best regards
>
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro




More information about the Devel mailing list