[OpenSIPS-Devel] [ opensips-Bugs-3317402 ] b2b calls out of sync after server restart

SourceForge.net noreply at sourceforge.net
Thu Jun 16 23:52:25 CEST 2011


Bugs item #3317402, was opened at 2011-06-16 12:53
Message generated for change (Comment added) made by osas
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3317402&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: trunk
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ovidiu Sas (osas)
Assigned to: Nobody/Anonymous (nobody)
Summary: b2b calls out of sync after server restart

Initial Comment:
If a server is restarted while a b2b call is active, the b2b call is restored from the db.
The issue is that subsequent in-dialog requests are having the Cseq reseted and this is causing rejections from the far end.

How to reproduce:
 - initiate a b2b call,
 - answer the b2b call,
 - send a reINVITE,
 - restart opensips,
 - send a reINVITE from one of the participants and check the CSeq number

It seems that the CSeq fields are not updated into the db.


Regards,
Ovidiu Sas

----------------------------------------------------------------------

>Comment By: Ovidiu Sas (osas)
Date: 2011-06-16 17:52

Message:
Hello Anca,


Here are the SQL logs for:
reINVITE (hold):

110616 18:07:38   64367 Query       update b2b_logic set
sstate=-3,next_sstate=0,lifetime=1308298047,e1_type=0,e1_sid='',e1_to='<sip:248 at 192.168.2.20>',e1_from='sip:osas at 192.168.2.20',e1_key='bk2bk.421.328',e2_type=1,e2_sid='',e2_to='<sip:248 at 192.168.2.20>',e2_from='sip:osas at 192.168.2.20',e2_key='bk2bk.49.3932322'
where si_key='561.0'
                  64367 Query       update b2b_entities set
state=6,cseq0=101,cseq1=1,lm=0,lrc=200,lic=101,contact0='sip:0026998D2646-1 at 192.168.2.93:5060',contact1='sip:192.168.2.2:5080'
where type=0 AND tag0='43df5fc486f6e51ao0' AND tag1='bk2bk.421.328' AND
callid='8bd9ac8c-1e6fbef2 at 192.168.2.93'
110616 18:07:39   64366 Query       update b2b_logic set
sstate=-3,next_sstate=0,lifetime=1308298048,e1_type=0,e1_sid='',e1_to='<sip:248 at 192.168.2.20>',e1_from='sip:osas at 192.168.2.20',e1_key='bk2bk.421.328',e2_type=1,e2_sid='',e2_to='<sip:248 at 192.168.2.20>',e2_from='sip:osas at 192.168.2.20',e2_key='bk2bk.49.3932322'
where si_key='561.0'
                  64368 Query       update b2b_logic set
sstate=-3,next_sstate=0,lifetime=1308298048,e1_type=0,e1_sid='',e1_to='<sip:248 at 192.168.2.20>',e1_from='sip:osas at 192.168.2.20',e1_key='bk2bk.421.328',e2_type=1,e2_sid='',e2_to='<sip:248 at 192.168.2.20>',e2_from='sip:osas at 192.168.2.20',e2_key='bk2bk.49.3932322'
where si_key='561.0'

                  64368 Query       update b2b_entities set
state=5,cseq0=101,cseq1=1,lm=0,lrc=200,lic=101,contact0='sip:0026998D2646-1 at 192.168.2.93:5060',contact1='sip:192.168.2.2:5080'
where type=0 AND tag0='43df5fc486f6e51ao0' AND tag1='bk2bk.421.328' AND
callid='8bd9ac8c-1e6fbef2 at 192.168.2.93'


reINVITE (active):

110616 18:07:49   64367 Query       update b2b_logic set
sstate=-3,next_sstate=0,lifetime=1308298047,e1_type=0,e1_sid='',e1_to='<sip:248 at 192.168.2.20>',e1_from='sip:osas at 192.168.2.20',e1_key='bk2bk.421.328',e2_type=1,e2_sid='',e2_to='<sip:248 at 192.168.2.20>',e2_from='sip:osas at 192.168.2.20',e2_key='bk2bk.49.3932322'
where si_key='561.0'
                  64367 Query       update b2b_entities set
state=6,cseq0=101,cseq1=1,lm=0,lrc=200,lic=101,contact0='sip:0026998D2646-1 at 192.168.2.93:5060',contact1='sip:192.168.2.2:5080'
where type=0 AND tag0='43df5fc486f6e51ao0' AND tag1='bk2bk.421.328' AND
callid='8bd9ac8c-1e6fbef2 at 192.168.2.93'
                  64368 Query       update b2b_logic set
sstate=-3,next_sstate=0,lifetime=1308298047,e1_type=0,e1_sid='',e1_to='<sip:248 at 192.168.2.20>',e1_from='sip:osas at 192.168.2.20',e1_key='bk2bk.421.328',e2_type=1,e2_sid='',e2_to='<sip:248 at 192.168.2.20>',e2_from='sip:osas at 192.168.2.20',e2_key='bk2bk.49.3932322'
where si_key='561.0'
                  64366 Query       update b2b_logic set
sstate=-3,next_sstate=0,lifetime=1308298047,e1_type=0,e1_sid='',e1_to='<sip:248 at 192.168.2.20>',e1_from='sip:osas at 192.168.2.20',e1_key='bk2bk.421.328',e2_type=1,e2_sid='',e2_to='<sip:248 at 192.168.2.20>',e2_from='sip:osas at 192.168.2.20',e2_key='bk2bk.49.3932322'
where si_key='561.0'
                  64366 Query       update b2b_entities set
state=5,cseq0=101,cseq1=1,lm=0,lrc=200,lic=101,contact0='sip:0026998D2646-1 at 192.168.2.93:5060',contact1='sip:192.168.2.2:5080'
where type=0 AND tag0='43df5fc486f6e51ao0' AND tag1='bk2bk.421.328' AND
callid='8bd9ac8c-1e6fbef2 at 192.168.2.93'


Regards,
Ovidiu Sas

----------------------------------------------------------------------

Comment By: Anca Vamanu (anca_vamanu)
Date: 2011-06-16 15:50

Message:
Hi Ovidiu,

The code shows that the update function is called, but maybe there is
something with the query. Can you please investigate by watching the sql
query traces in your sql server?

Regards,
Anca

----------------------------------------------------------------------

Comment By: Ovidiu Sas (osas)
Date: 2011-06-16 14:06

Message:
Hello Anca,

I uploaded a file wilth the b2b logs and the SIP requests.

Thanks,
Ovidiu

----------------------------------------------------------------------

Comment By: Anca Vamanu (anca_vamanu)
Date: 2011-06-16 13:51

Message:
Hi Ovidiu,

The db update function in b2b_entities modules does update the cseq -
check b2be_db_update function. And for reInvite this function should be
called by the b2b_prescript_f function. Please check in the logs which are
the messages printed for the processing of the reInvite ( note that in the
b2be_db_update a DBG is printed starting with b2be_db_update:UPDATED )

Regards,
Anca

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3317402&group_id=232389



More information about the Devel mailing list