Re: [OpenSIPS-Users] rewrite status-line

2020-02-14 Thread Maxim Sobolev
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  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 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ___
> Users mailing list
> Users@lists.opensips.org
> 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: sa...@sippysoft.com
Skype: SippySoft
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] rewrite status-line

2020-02-14 Thread Антон Ершов
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 :

> 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  on behalf of Антон Ершов
> 
> *Reply-To: *OpenSIPS users mailling list 
> *Date: *Friday, February 14, 2020 at 12:01 PM
> *To: *OpenSIPS users mailling list 
> *Subject: *Re: [OpenSIPS-Users] rewrite status-line
>
>
>
> I understand correctly that on my side I can not fix this problem?
>
>
>
> пт, 14 февр. 2020 г. в 17:17, Антон Ершов :
>
> They can not
>
>
>
> пт, 14 февр. 2020 г., 17:10 johan :
>
> 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
>
> Users@lists.opensips.org
>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] rewrite status-line

2020-02-14 Thread 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  on behalf of Антон Ершов 

Reply-To: OpenSIPS users mailling list 
Date: Friday, February 14, 2020 at 12:01 PM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] rewrite status-line

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

пт, 14 февр. 2020 г. в 17:17, Антон Ершов 
mailto:suhari...@gmail.com>>:
They can not

пт, 14 февр. 2020 г., 17:10 johan mailto:jo...@democon.be>>:

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

Users@lists.opensips.org<mailto:Users@lists.opensips.org>

http://lists.opensips.org/cgi-bin/mailman/listinfo/users<http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
___
Users mailing list
Users@lists.opensips.org<mailto:Users@lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users<http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] rewrite status-line

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

пт, 14 февр. 2020 г. в 17:17, Антон Ершов :

> They can not
>
> пт, 14 февр. 2020 г., 17:10 johan :
>
>> 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 
>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] rewrite status-line

2020-02-14 Thread Антон Ершов
They can not

пт, 14 февр. 2020 г., 17:10 johan :

> 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 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] rewrite status-line

2020-02-14 Thread johan
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
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] rewrite status-line

2020-02-14 Thread Антон Ершов
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
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users