{"id":482,"date":"2016-05-28T18:17:55","date_gmt":"2016-05-28T10:17:55","guid":{"rendered":"https:\/\/www.myvoipapp.com\/blog\/?p=482"},"modified":"2016-05-28T18:18:37","modified_gmt":"2016-05-28T10:18:37","slug":"invalid-cseq-number","status":"publish","type":"post","link":"https:\/\/www.myvoipapp.com\/blog\/2016\/05\/28\/invalid-cseq-number\/","title":{"rendered":"Invalid CSeq number"},"content":{"rendered":"<p>One of our customers reported a problem that his external line was always offline with a voip provider. That&#8217;s very strange because &#8220;external line&#8221; is a very basic function of MSS and it works perfectly with lots of voip providers.<\/p>\n<p>We captured the log and found the voip provider returned &#8220;400 Bad Request&#8221; message with following cause:<\/p>\n<pre>P-Registrar-Error: Invalid CSeq number<\/pre>\n<p>We checked the REGISTER messages, and think it is no problem in CSeq header. Following items are from MSS:<\/p>\n<pre><span style=\"color: #0000ff;\">==&gt;<\/span>\r\nREGISTER sip:sip.xxx.com SIP\/2.0\r\n...\r\nCall-ID: 18BF67854AE23D6D2CD772AFMSS002A0001.\r\nCSeq: 13 REGISTER\r\n...\r\n\r\n<span style=\"color: #0000ff;\">&lt;==<\/span>\r\nSIP\/2.0 401 Unauthorized\r\n...\r\nCall-ID: 18BF67854AE23D6D2CD772AFMSS002A0001.\r\nCSeq: 13 REGISTER\r\n...\r\n\r\n<span style=\"color: #0000ff;\">==&gt;<\/span>\r\nREGISTER sip:sip.xxx.com SIP\/2.0\r\n...\r\nCall-ID: 18BF67854AE23D6D2CD772AFMSS002A0001.\r\nCSeq: 14 REGISTER\r\n...\r\n\r\n<span style=\"color: #0000ff;\">&lt;==<\/span>\r\nSIP\/2.0 400 Bad Request\r\n...\r\nCall-ID: 18BF67854AE23D6D2CD772AFMSS002A0001.\r\nCSeq: 14 REGISTER\r\n<span style=\"color: #ff0000;\">P-Registrar-Error: Invalid CSeq number<\/span>\r\n...<\/pre>\n<p>We checked RFC3261 to find &#8220;CSeq&#8221; in SIP-REGISTER procedures:<\/p>\n<pre>A UA MUST increment the CSeq value by one for each REGISTER request with the same Call-ID.<\/pre>\n<p>Obviously we are right. But why did peer side reject MSS&#8217; messages?<\/p>\n<p>Finally, we tried to send SIP-REGISTER with different &#8216;call-id&#8217;, and the problem was resolved! That made us confused again because in RFC3261 we can find the details of &#8220;call-id&#8221; in SIP-REGISTER procedures:<\/p>\n<pre>All registrations from a UAC SHOULD use the same Call-ID header field value for registrations sent to a particular registrar.<\/pre>\n<p>We think the voip provider is unprofessional. Unfortunally, it is hard for them to upgrade their system. So we have to add a switch varant to control MSS to fit this kind of situation.<\/p>\n<pre>[sip]\r\ngVarSipRegSameDialog=0<\/pre>\n<p>If you have the same problem with some voip providers, please add above parameter into &#8220;<a href=\"https:\/\/www.myvoipapp.com\/docs\/mss_services\/manual\/index.html#appendix2\" target=\"_blank\">mss_var_param.ini<\/a>&#8221; file and restart your MSS to enable it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of our customers reported a problem that his external line was always offline with a voip provider. That&#8217;s very strange because &#8220;external line&#8221; is a very basic function of MSS and it works perfectly with lots of voip providers. We captured the log and found the voip provider returned &#8220;400 Bad Request&#8221; message with following cause: P-Registrar-Error: Invalid CSeq number We checked the REGISTER messages, and think it is no problem in CSeq header. Following items are from MSS:&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/www.myvoipapp.com\/blog\/2016\/05\/28\/invalid-cseq-number\/\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,35,34,137],"tags":[201,200,113,124,11],"class_list":["post-482","post","type-post","status-publish","format-standard","hentry","category-how_to","category-minisipserver","category-minisipserver_cloud","category-tech-documents","tag-call-id","tag-cseq","tag-offline","tag-register","tag-sip"],"_links":{"self":[{"href":"https:\/\/www.myvoipapp.com\/blog\/wp-json\/wp\/v2\/posts\/482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.myvoipapp.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myvoipapp.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myvoipapp.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myvoipapp.com\/blog\/wp-json\/wp\/v2\/comments?post=482"}],"version-history":[{"count":2,"href":"https:\/\/www.myvoipapp.com\/blog\/wp-json\/wp\/v2\/posts\/482\/revisions"}],"predecessor-version":[{"id":484,"href":"https:\/\/www.myvoipapp.com\/blog\/wp-json\/wp\/v2\/posts\/482\/revisions\/484"}],"wp:attachment":[{"href":"https:\/\/www.myvoipapp.com\/blog\/wp-json\/wp\/v2\/media?parent=482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myvoipapp.com\/blog\/wp-json\/wp\/v2\/categories?post=482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myvoipapp.com\/blog\/wp-json\/wp\/v2\/tags?post=482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}