OpenSIPS migth be changing CSeq numbers after SIP OPTIONS. How to avoid it?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenSIPS migth be changing CSeq numbers after SIP OPTIONS. How to avoid it?

Rodrigo Pimenta Carvalho

Dear OpenSIPS users,

I'm facing a problem related to CSeq numbers in SIP messages and maybe it is being caused by SIP OPTIONS messages.
When a caller sends a SIP ACK to the callee, the SIP ACK has CSeq = 2. However, after being relayed by OpenSIPS, the CSeq number become 3.
It seems that OpenSIPS decided to change such value on its own. But, maybe it was caused by the previous SIP OPTIONS message receive before.
The diagram bellow shows what is happening.

Can the SIP OPTIONS message cause such issue? If yes, should I give up of using SIP OPTIONS? Can it be a bug in OpenSIPS?
If not, what is happening here??
If that CSeq remains like 3, the callee will simply discard the SIP ACK and send another SIP OK, will not discard?



Caller                        OpenSIPs                          Callee
|                                          |                                        |
|                                          |                                        |
|       INVITE                      |                                        |
|       CSeq = 2                  |                                        |
|------------------------------->|        INVITE                    |
|                                         |        CSeq = 2                |
|                                         |------------------------------->|
|                                         |                                         |
|                                         |         TRYING                 |
|                                         |         CSeq = 2               |
|      TRYING                    |<-------------------------------|
|      CSeq = 2                  |                                         |
|<-------------------------------|                                         |
|                                          |                                        |
|                                          |         RING                     |
|                                          |         CSeq = 2               |
|      RING                          |<-------------------------------|
|      CSeq = 2                  |                                          |
|<-------------------------------|                                          |
|                                         |         SIP OK                   |
|                                         |         CSeq = 2               |
|      SIP OK                      |<-------------------------------|
|      CSeq = 2                  |                                         |
|<-------------------------------|                                         |
|                                         |         SIP OK                   |
|                                         |         CSeq = 2               |
|      SIP OK                     |<-------------------------------|
|      CSeq = 2                  |                                         |
|<-------------------------------|                                         |
|                                         |                                        |
|                                         |        SIP OPTIONS       |
|                                         |        CSeq = 3                |        <<---- new CSeq
|                                         |<-------------------------------|
|                                         |                                         |
|                                         |         SIP 500                  |
|                                         |         CSeq = 3               |
|                                         |------------------------------->|
|       ACK                          |                                        |
|       CSeq = 2                 |                                         |
|------------------------------->|        ACK                        |
|                                         |        CSeq = 3                |      <<---- Cseq of ACK was changed by OpenSIPS.
|                                         |------------------------------->|
|       ACK                         |                                          |
|       CSeq = 2                 |                                         |
|------------------------------->|        ACK                        |
|                                         |        CSeq = 3                |
|                                         |------------------------------->|
|                                         |                                         |
|                                         |         SIP OK                   |
|                                         |         CSeq = 2               |
|      SIP OK                      |<-------------------------------|
|      CSeq = 2                  |                                         |
|<-------------------------------|                                         |
|       ACK                         |                                         |
|       CSeq = 2                 |                                         |
|------------------------------->|        ACK                        |
|                                         |        CSeq = 3                |
|                                         |------------------------------->|
|                                         |                                         |
|                                         |         SIP OK                   |
|                                         |         CSeq = 2               |
|                                         |<-------------------------------|    <<------- This SIP OK never receives a SIP ACK with CSeq = 2...and the problem continues.

Any hint will be very helpful!!
Best regards!


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

OpenSIPS 2.2 changes CSeq numbers after SIP OPTIONS received. Is it a bug?

Rodrigo Pimenta Carvalho

Dear OpenSIPS users,

I'm facing a problem related to CSeq numbers in SIP messages and maybe it is being caused by SIP OPTIONS messages.
When a caller sends a SIP ACK to the callee, the SIP ACK has CSeq = 2. However, after being relayed by OpenSIPS, the CSeq number become 3.
It seems that OpenSIPS decided to change such value on its own. But, maybe it was caused by the previous SIP OPTIONS message receive before.
The diagram bellow shows what is happening.

Can the SIP OPTIONS message cause such issue? If yes, should I give up of using SIP OPTIONS? Can it be a bug in OpenSIPS?
If not, what is happening here??
If that CSeq remains like 3, the callee will simply discard the SIP ACK and send another SIP OK, will not discard?



Caller                        OpenSIPs                          Callee
|                                          |                                        |
|                                          |                                        |
|       INVITE                      |                                        |
|       CSeq = 2                  |                                        |
|------------------------------->|        INVITE                    |
|                                         |        CSeq = 2                |
|                                         |------------------------------->|
|                                         |                                         |
|                                         |         TRYING                 |
|                                         |         CSeq = 2               |
|      TRYING                    |<-------------------------------|
|      CSeq = 2                  |                                         |
|<-------------------------------|                                         |
|                                          |                                        |
|                                          |         RING                     |
|                                          |         CSeq = 2               |
|      RING                          |<-------------------------------|
|      CSeq = 2                  |                                          |
|<-------------------------------|                                          |
|                                         |         SIP OK                   |
|                                         |         CSeq = 2               |
|      SIP OK                      |<-------------------------------|
|      CSeq = 2                  |                                         |
|<-------------------------------|                                         |
|                                         |         SIP OK                   |
|                                         |         CSeq = 2               |
|      SIP OK                     |<-------------------------------|
|      CSeq = 2                  |                                         |
|<-------------------------------|                                         |
|                                         |                                        |
|                                         |        SIP OPTIONS       |
|                                         |        CSeq = 3                |        <<---- new CSeq
|                                         |<-------------------------------|
|                                         |                                         |
|                                         |         SIP 500                  |
|                                         |         CSeq = 3               |
|                                         |------------------------------->|
|       ACK                          |                                        |
|       CSeq = 2                 |                                         |
|------------------------------->|        ACK                        |
|                                         |        CSeq = 3                |      <<---- Cseq of ACK was changed by OpenSIPS.
|                                         |------------------------------->|
|       ACK                         |                                          |
|       CSeq = 2                 |                                         |
|------------------------------->|        ACK                        |
|                                         |        CSeq = 3                |
|                                         |------------------------------->|
|                                         |                                         |
|                                         |         SIP OK                   |
|                                         |         CSeq = 2               |
|      SIP OK                      |<-------------------------------|
|      CSeq = 2                  |                                         |
|<-------------------------------|                                         |
|       ACK                         |                                         |
|       CSeq = 2                 |                                         |
|------------------------------->|        ACK                        |
|                                         |        CSeq = 3                |
|                                         |------------------------------->|
|                                         |                                         |
|                                         |         SIP OK                   |
|                                         |         CSeq = 2               |
|                                         |<-------------------------------|    <<------- This SIP OK never receives a SIP ACK with CSeq = 2...and the problem continues.

Any hint will be very helpful!!
Best regards!


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: OpenSIPS 2.2 changes CSeq numbers after SIP OPTIONS received. Is it a bug?

Bogdan-Andrei Iancu-2
Hi Rodrigo,

That OPTIONS (even if it is really weird to have that OPTIONS inserted between 200OK and ACK) should not affect the cseq numbering in ACK as it is in opposite direction.

If you manage to get rid of that OPTION, is the ACK cseq correct ?

With this bogus scenario, can you run in log_level 4 (debug) and post the opensips logs (covering the whole call) for inspection ?

Best regards,
Bogdan-Andrei Iancu
  OpenSIPS Founder and Developer
  http://www.opensips-solutions.com

OpenSIPS Bootcamp 2017, Houston, US
  http://opensips.org/training/OpenSIPS_Bootcamp_2017.html
On 06/26/2017 03:18 PM, Rodrigo Pimenta Carvalho wrote:

Dear OpenSIPS users,

I'm facing a problem related to CSeq numbers in SIP messages and maybe it is being caused by SIP OPTIONS messages.
When a caller sends a SIP ACK to the callee, the SIP ACK has CSeq = 2. However, after being relayed by OpenSIPS, the CSeq number become 3.
It seems that OpenSIPS decided to change such value on its own. But, maybe it was caused by the previous SIP OPTIONS message receive before.
The diagram bellow shows what is happening.

Can the SIP OPTIONS message cause such issue? If yes, should I give up of using SIP OPTIONS? Can it be a bug in OpenSIPS?
If not, what is happening here??
If that CSeq remains like 3, the callee will simply discard the SIP ACK and send another SIP OK, will not discard?



Caller                        OpenSIPs                          Callee
|                                          |                                        |
|                                          |                                        |
|       INVITE                      |                                        |
|       CSeq = 2                  |                                        |
|------------------------------->|        INVITE                    |
|                                         |        CSeq = 2                |
|                                         |------------------------------->|
|                                         |                                         |
|                                         |         TRYING                 |
|                                         |         CSeq = 2               |
|      TRYING                    |<-------------------------------|
|      CSeq = 2                  |                                         |
|<-------------------------------|                                         |
|                                          |                                        |
|                                          |         RING                     |
|                                          |         CSeq = 2               |
|      RING                          |<-------------------------------|
|      CSeq = 2                  |                                          |
|<-------------------------------|                                          |
|                                         |         SIP OK                   |
|                                         |         CSeq = 2               |
|      SIP OK                      |<-------------------------------|
|      CSeq = 2                  |                                         |
|<-------------------------------|                                         |
|                                         |         SIP OK                   |
|                                         |         CSeq = 2               |
|      SIP OK                     |<-------------------------------|
|      CSeq = 2                  |                                         |
|<-------------------------------|                                         |
|                                         |                                        |
|                                         |        SIP OPTIONS       |
|                                         |        CSeq = 3                |        <<---- new CSeq
|                                         |<-------------------------------|
|                                         |                                         |
|                                         |         SIP 500                  |
|                                         |         CSeq = 3               |
|                                         |------------------------------->|
|       ACK                          |                                        |
|       CSeq = 2                 |                                         |
|------------------------------->|        ACK                        |
|                                         |        CSeq = 3                |      <<---- Cseq of ACK was changed by OpenSIPS.
|                                         |------------------------------->|
|       ACK                         |                                          |
|       CSeq = 2                 |                                         |
|------------------------------->|        ACK                        |
|                                         |        CSeq = 3                |
|                                         |------------------------------->|
|                                         |                                         |
|                                         |         SIP OK                   |
|                                         |         CSeq = 2               |
|      SIP OK                      |<-------------------------------|
|      CSeq = 2                  |                                         |
|<-------------------------------|                                         |
|       ACK                         |                                         |
|       CSeq = 2                 |                                         |
|------------------------------->|        ACK                        |
|                                         |        CSeq = 3                |
|                                         |------------------------------->|
|                                         |                                         |
|                                         |         SIP OK                   |
|                                         |         CSeq = 2               |
|                                         |<-------------------------------|    <<------- This SIP OK never receives a SIP ACK with CSeq = 2...and the problem continues.

Any hint will be very helpful!!
Best regards!


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users