rewrite status-line

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

rewrite status-line

Антон Ершов
Hello friends!
we have final equipment that does not meet 200OK correctly. it adds an extra space between 200 and OK. from the point of view of rfc is not very scary. but there is an operator that cannot handle the given 200OK. I tried to fix it with change_reply_status in module sipmsgops.
but it rewrites the status-line with the same extra space. 
Is this a bug?

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

Re: rewrite status-line

Johan De Clercq

To me 200 OK is perfectly valid.   The operator should fix this at his side.

On 14.02.20 15:01, Антон Ершов wrote:
Hello friends!
we have final equipment that does not meet 200OK correctly. it adds an extra space between 200 and OK. from the point of view of rfc is not very scary. but there is an operator that cannot handle the given 200OK. I tried to fix it with change_reply_status in module sipmsgops.
but it rewrites the status-line with the same extra space. 
Is this a bug?

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: rewrite status-line

Антон Ершов
They can not

пт, 14 февр. 2020 г., 17:10 johan <[hidden email]>:

To me 200 OK is perfectly valid.   The operator should fix this at his side.

On 14.02.20 15:01, Антон Ершов wrote:
Hello friends!
we have final equipment that does not meet 200OK correctly. it adds an extra space between 200 and OK. from the point of view of rfc is not very scary. but there is an operator that cannot handle the given 200OK. I tried to fix it with change_reply_status in module sipmsgops.
but it rewrites the status-line with the same extra space. 
Is this a bug?

_______________________________________________
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

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

Re: rewrite status-line

Антон Ершов
I understand correctly that on my side I can not fix this problem?

пт, 14 февр. 2020 г. в 17:17, Антон Ершов <[hidden email]>:
They can not

пт, 14 февр. 2020 г., 17:10 johan <[hidden email]>:

To me 200 OK is perfectly valid.   The operator should fix this at his side.

On 14.02.20 15:01, Антон Ершов wrote:
Hello friends!
we have final equipment that does not meet 200OK correctly. it adds an extra space between 200 and OK. from the point of view of rfc is not very scary. but there is an operator that cannot handle the given 200OK. I tried to fix it with change_reply_status in module sipmsgops.
but it rewrites the status-line with the same extra space. 
Is this a bug?

_______________________________________________
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

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

Re: rewrite status-line

Ben Newlin

I couldn’t find it in the documentation, but I am pretty sure that change_reply_status will not work on a 2xx response as a proxy cannot change those types of responses. You would have to be using B2BUA to do that.

 

I think your best bet would be to try one of the functions in the textops module [1], possibly replace() [2].

 

[1] - https://opensips.org/docs/modules/2.4.x/textops.html

[2] - https://opensips.org/docs/modules/2.4.x/textops.html#func_replace

 

 

Ben Newlin

 

From: Users <[hidden email]> on behalf of Антон Ершов <[hidden email]>
Reply-To: OpenSIPS users mailling list <[hidden email]>
Date: Friday, February 14, 2020 at 12:01 PM
To: OpenSIPS users mailling list <[hidden email]>
Subject: Re: [OpenSIPS-Users] rewrite status-line

 

I understand correctly that on my side I can not fix this problem?

 

пт, 14 февр. 2020 г. в 17:17, Антон Ершов <[hidden email]>:

They can not

 

пт, 14 февр. 2020 г., 17:10 johan <[hidden email]>:

To me 200 OK is perfectly valid.   The operator should fix this at his side.

On 14.02.20 15:01, Антон Ершов wrote:

Hello friends!

we have final equipment that does not meet 200OK correctly. it adds an extra space between 200 and OK. from the point of view of rfc is not very scary. but there is an operator that cannot handle the given 200OK. I tried to fix it with change_reply_status in module sipmsgops.

but it rewrites the status-line with the same extra space. 

Is this a bug?



_______________________________________________
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


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

Re: rewrite status-line

Антон Ершов
change_reply_status works. I managed to change the code. e.g. 200 to 201
it turned out to change Reason. but two spaces still remain. 
func_replace will check the whole message every time. How will this affect productivity?
and whether it will check the status-line?

пт, 14 февр. 2020 г. в 20:11, Ben Newlin <[hidden email]>:

I couldn’t find it in the documentation, but I am pretty sure that change_reply_status will not work on a 2xx response as a proxy cannot change those types of responses. You would have to be using B2BUA to do that.

 

I think your best bet would be to try one of the functions in the textops module [1], possibly replace() [2].

 

[1] - https://opensips.org/docs/modules/2.4.x/textops.html

[2] - https://opensips.org/docs/modules/2.4.x/textops.html#func_replace

 

 

Ben Newlin

 

From: Users <[hidden email]> on behalf of Антон Ершов <[hidden email]>
Reply-To: OpenSIPS users mailling list <[hidden email]>
Date: Friday, February 14, 2020 at 12:01 PM
To: OpenSIPS users mailling list <[hidden email]>
Subject: Re: [OpenSIPS-Users] rewrite status-line

 

I understand correctly that on my side I can not fix this problem?

 

пт, 14 февр. 2020 г. в 17:17, Антон Ершов <[hidden email]>:

They can not

 

пт, 14 февр. 2020 г., 17:10 johan <[hidden email]>:

To me 200 OK is perfectly valid.   The operator should fix this at his side.

On 14.02.20 15:01, Антон Ершов wrote:

Hello friends!

we have final equipment that does not meet 200OK correctly. it adds an extra space between 200 and OK. from the point of view of rfc is not very scary. but there is an operator that cannot handle the given 200OK. I tried to fix it with change_reply_status in module sipmsgops.

but it rewrites the status-line with the same extra space. 

Is this a bug?



_______________________________________________
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

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: rewrite status-line

Maxim Sobolev
In reply to this post by Johan De Clercq
I think this response is borderline. RFC3261 specifically mandates SINGLE character to be used, however the reason phrase might contain as many spaces as needed, so that it can be argued that in this particular case the reason phrase is " OK" versus "OK" normally.

---

7.2 Responses

SIP responses are distinguished from requests by having a Status-Line as their start-line. A Status-Line consists of the protocol version followed by a numeric Status-Code and its associated textual phrase, with each element separated by a
single SP character. No CR or LF is allowed except in the final CRLF sequence. Status-Line = SIP-Version SP Status-Code SP Reason-Phrase CRLF
[...]
Reason-Phrase   =  *(reserved / unreserved / escaped
                   / UTF8-NONASCII / UTF8-CONT / SP / HTAB)
---

Technically speaking changing JUST reason phrase in SIP proxy should not break anything. You don't really need B2BUA to replace say "200 OK" with "200 Have a Good Day" so it's just a matter of nobody having this need. 

-Max

On Fri, Feb 14, 2020 at 6:09 AM johan <[hidden email]> wrote:

To me 200 OK is perfectly valid.   The operator should fix this at his side.

On 14.02.20 15:01, Антон Ершов wrote:
Hello friends!
we have final equipment that does not meet 200OK correctly. it adds an extra space between 200 and OK. from the point of view of rfc is not very scary. but there is an operator that cannot handle the given 200OK. I tried to fix it with change_reply_status in module sipmsgops.
but it rewrites the status-line with the same extra space. 
Is this a bug?

_______________________________________________
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


--
Maksym Sobolyev
Sippy Software, Inc.
Internet Telephony (VoIP) Experts
Tel (Canada): +1-778-783-0474
Tel (Toll-Free): +1-855-747-7779
Fax: +1-866-857-6942
Web: http://www.sippysoft.com
MSN: [hidden email]
Skype: SippySoft

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