Discussion:
[Sip-implementors] sip info message body CRLF
iancu laura
2013-12-18 09:51:22 UTC
Permalink
Hi,

I am a newcomer to Sip and i want to clarify something from RFC 3261.

I would like to know if,for a SIP INFO method, CRLF is mandatory at the end of each line. Should the syntax of Info be with or without CRLF at the end of message body?

To be more clear, on the sip info there is no "0a 0d" at the end of the message body and, for this reason from peer side we receive 400 bad request with the reason "syntax error".is this a problem at the peer side with the parser?or we should add 0a 0d at the end of message body line?
From my point of view, if this is not very clear mentioned in the protocol, a vendor can have it.s own design.
Thank you in advance,
Laura
Paul Kyzivat
2013-12-18 15:54:38 UTC
Permalink
Post by iancu laura
Hi,
I am a newcomer to Sip and i want to clarify something from RFC 3261.
I would like to know if,for a SIP INFO method, CRLF is mandatory at the end of each line. Should the syntax of Info be with or without CRLF at the end of message body?
To be more clear, on the sip info there is no "0a 0d" at the end of the message body and, for this reason from peer side we receive 400 bad request with the reason "syntax error".is this a problem at the peer side with the parser?or we should add 0a 0d at the end of message body line?
From my point of view, if this is not very clear mentioned in the protocol, a vendor can have it.s own design.
Thank you in advance,
Laura
This depends on the Content-Type of the body.
The body must conform to the Content-Type declared for it.
Some content types may require CRLF and others may not.

Thanks,
Paul
brez
2013-12-18 20:31:21 UTC
Permalink
Post by iancu laura
Hi,
I am a newcomer to Sip and i want to clarify something from RFC 3261.
I would like to know if,for a SIP INFO method, CRLF is mandatory at the end of each line. Should the syntax of Info be with or without CRLF at the end of message body?
To be more clear, on the sip info there is no "0a 0d" at the end of the message body and, for this reason from peer side we receive 400 bad request with the reason "syntax error".is this a problem at the peer side with the parser?or we should add 0a 0d at the end of message body line?
From my point of view, if this is not very clear mentioned in the protocol, a vendor can have it.s own design.
You have to have CRLF at the end of each line in the message envelope
(headers). For message body, it depends on the type of content used
(Content-Type header). Each content type has it's own syntax defined.

Regards,

Brez
brez
2013-12-19 14:17:25 UTC
Permalink
Content-type: application/dtmf-relay<CR><LF>
Content-length:26<CR><LF>
<CR><LF>
Signal=2<CR><LF>
Duration=250<CR><LF>
Is <cr><lf> absolutely mandatory after Duration=250??
And if it really is, in which RFC is this mentioned?
Syntax defined in Section 5.2. INFO Bodies, of
draft-kaplan-dispatch-info-dtmf-package-00, does not require CRLF after
the duration.

But there is a thing to be noted regarding the particular example you
give above. The Content-Length is 26, but in the message body you have
only 24 characters - you miss 2 characters as there are no SP between
"=" and the values. Your example is similar to that in Section 6.
Example Exchange, where total body length is 26 with <CRLF>'s and SP
between "=" characters:

Content-Type: application/dtmf-relay<CR/LF>
Content-Length: 26<CR/LF>
<CR/LF>
<CR/LF>
Signal= 6<CR/LF>
Duration= 100<CR/LF>


Regards,

Brez
Brett Tate
2013-12-19 15:00:57 UTC
Permalink
Hi,

Draft-kaplan-dispatch-info-dtmf-package-00's ABNF conflicts with the example. Based upon 2008 email discussion with Hadriel (when it was draft-kaplan-sipping-dtmf-package-00), my understanding is that the ABNF would be fixed (instead of the example) to include CRLF after duration.

"D'oh! Ya well, the example is the normative part. :)

(will fix it for the update... if info ever gets on the docket)"
-----Original Message-----
From: brez [mailto:brezden at gmail.com]
Sent: Thursday, December 19, 2013 9:17 AM
To: iancu laura; sip-implementors at lists.cs.columbia.edu
Subject: Re: [Sip-implementors] sip info message body CRLF
Content-type: application/dtmf-relay<CR><LF>
Content-length:26<CR><LF>
<CR><LF>
Signal=2<CR><LF>
Duration=250<CR><LF>
Is <cr><lf> absolutely mandatory after Duration=250??
And if it really is, in which RFC is this mentioned?
Syntax defined in Section 5.2. INFO Bodies, of
draft-kaplan-dispatch-info-dtmf-package-00, does not require CRLF after
the duration.
But there is a thing to be noted regarding the particular example you
give above. The Content-Length is 26, but in the message body you have
only 24 characters - you miss 2 characters as there are no SP between
"=" and the values. Your example is similar to that in Section 6.
Example Exchange, where total body length is 26 with <CRLF>'s and SP
Content-Type: application/dtmf-relay<CR/LF>
Content-Length: 26<CR/LF>
<CR/LF>
<CR/LF>
Signal= 6<CR/LF>
Duration= 100<CR/LF>
Regards,
Brez
_______________________________________________
Sip-implementors mailing list
Sip-implementors at lists.cs.columbia.edu
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors
iancu laura
2013-12-19 12:47:31 UTC
Permalink
Dear Brez,

Thank you very much for your prompt answer.

So, you are saying that the syntax should be as follows,for example:

Content-type: application/dtmf-relay<CR><LF>
Content-length:26<CR><LF>
<CR><LF>
Signal=2<CR><LF>
Duration=250<CR><LF>

Is <cr><lf> absolutely mandatory after Duration=250??
And if it really is, in which RFC is this mentioned?

Thank you and wish a great day!
Laura


------------------------------
Post by iancu laura
Hi,
I am a newcomer to Sip and i want to clarify something from RFC 3261.
I would like to know if,for a SIP INFO method, CRLF is mandatory at the end of each line. Should the syntax of Info be with or without CRLF at the end of message body?
To be more clear, on the sip info there is no "0a 0d" at the end of the message body and, for this reason from peer side we receive 400 bad request with the reason "syntax error".is this a problem at the peer side with the parser?or we should add 0a 0d at the end of message body line?
From my point of view, if this is not very clear mentioned in the protocol, a vendor can have it.s own design.
You have to have CRLF at the end of each line in the message envelope (headers). For message body, it depends on the type of content used (Content-Type header). Each content type has it's own syntax defined.
Regards,
Brez
Loading...