liyuanwei / imsdroid

Automatically exported from code.google.com/p/imsdroid
0 stars 0 forks source link

How to update header of SIP protocol? #120

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.For example,I want to set "Privacy:id"(Default->Privacy:none).
2.Call addHeader("Privacy","id");
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.
Call session.addHeader("Privacy","id");
The SIP message shows that:
Privacy:none
xxxxxxxxxx
Privacy:id

The Privacy header occured twice.And sometimes shows
Privacy:id
xxxxxxxxxx
Privacy:none

The position of two "Privacy" is random.Which is effective?

Original issue reported on code.google.com by yuwenbin...@gmail.com on 10 Dec 2010 at 9:43

GoogleCodeExporter commented 9 years ago
The default Privacy is "none". To set your own privacy value, comment out line 
67 from MySipStack.java.

Original comment by boss...@yahoo.fr on 10 Dec 2010 at 9:51

GoogleCodeExporter commented 9 years ago
Issue 121 has been merged into this issue.

Original comment by boss...@yahoo.fr on 10 Dec 2010 at 11:26

GoogleCodeExporter commented 9 years ago
I mean that message have two "Privacy" header.Will "Privacy:id" be effective 
instead of "Privacy:none"?

Original comment by yuwenbin...@gmail.com on 10 Dec 2010 at 11:44

GoogleCodeExporter commented 9 years ago
If you comment out line 67 non Privacy will be added. You can also change line 
67 to set the privacy value to id.

Original comment by boss...@yahoo.fr on 10 Dec 2010 at 11:58

GoogleCodeExporter commented 9 years ago
Er...In fact,I want to know if message has two "Privacy" header("Privacy:id" 
"Privacy:none"),which "Privacy" header will perform the function to SIP Server?
At first add "Privacy:none",then add "Privacy:id".
I guess "Privacy:id" will be effective.Liking stack operation,the last 
operation is effective.

Original comment by yuwenbin...@gmail.com on 10 Dec 2010 at 12:05

GoogleCodeExporter commented 9 years ago
Both. 
See rfc 3323:
When a Privacy header is constructed, it MUST consist of either the
   value 'none', or one or more of the values 'user', 'header' and
   'session' (each of which MUST appear at most once) which MAY in turn
   be followed by the 'critical' indicator.

Same as "Privacy:none;id".

Original comment by boss...@yahoo.fr on 10 Dec 2010 at 12:13

GoogleCodeExporter commented 9 years ago
Sorry,I cannot understand your meaning.
"Privacy:id" represent anonymous,such as anonymous subscribe.
"Privacy:none" represent contrary meaning.
Both will perform the function to SIP Server?
Then ,for example,a subscribe is anonymous or not?

Original comment by yuwenbin...@gmail.com on 10 Dec 2010 at 12:27