> 
> Good day,
> 
> My Sofia-based application is talking to a Microsoft OCS 2007 server
and
> I believe, in true MS fashion, that certain headers are not quite in
> adherence to the RFCs.  Could it be that Sofia is not parsing those
> headers as a result of them not being standard?
> 
> Here is an example of a 200 OK response from a REGISTER sent to my OCS
> server:
> 
> http://dpaste.com/hold/114883/
> 
> 
>    SIP/2.0 200 OK
>    ms-keep-alive: UAS; tcp=no; hop-hop=yes; end-end=no; timeout=300
>    Authentication-Info: NTLM
rspauth="01000000000000002DBA2B7889FDE4C9",
> srand="E8CDC093", snum="1", opaque="F06AE926", qop="auth",
> targetname="OCS1.flux.local", realm="SIP Communications Service"
>    From: "DJ
> Flux"<sip:djf...@flux.local>;epid=010101010101;tag=0D4Zj86tFD0mr
>    To:
>
<sip:djf...@flux.local>;transport=tls;tag=87F67DD92A1B2E9E2A4517BE91E19A
> 17
>    Call-ID: f5a19ca6-69bf-122c-e294-6901e212fe01
>    CSeq: 110558877 REGISTER
>    Via: SIP/2.0/TLS
>
192.168.43.1:5069;branch=z9hG4bK22y3g859yN2QB;received=192.168.43.1;ms-r
> eceived-port=52342;ms-received-cid=2500
>    Contact:
>
<sip:192.168.43.1:52342;transport=tls;ms-opaque=d3470f2e1d;ms-received-c
>
id=2500>;expires=7200;+sip.instance="<urn:uuid:c8c355ae-02d5-5079-a68c-7
>
6b90ab4cb8d>";gruu="sip:djf...@flux.local;opaque=user:epid:rlXDyNUCeVCmj
> Ha5CrTLjQAA;gruu"
>    Expires: 7200
>    Allow-Events:
>
vnd-microsoft-provisioning,vnd-microsoft-roaming-contacts,vnd-microsoft-
>
roaming-ACL,presence,presence.wpending,vnd-microsoft-roaming-self,vnd-mi
> crosoft-provisioning-v2
>    Supported: adhoclist
>    Server: RTC/3.0
>    Supported: com.microsoft.msrtc.presence
>    Content-Length: 0
> 
> Looking in my debugger, I would think
> sip->sip_authentication_info->ai_params should show all of the
> parameters in the Authentication-Info header.  Instead it only shows:
> 
>   NTLM rspauth="01000000000000002DBA2B7889FDE4C9"
> 
> and nothing else (no srand, snum, etc).
> 
> The Allow-Events information in sip->sip_allow_events seems to only
> contain the first entry (in my case I only see
> "vnd-microsoft-provisioning" in the debugger).
> sip->sip_allow_events->k_next is NULL.
> 
> Also, the sip->sip_contact information only has pieces of the full
> contact line listed above.
> 
> BTW, these values I am looking at are in the callback function for my
> Sofia events.
> 
> Is there any way I can retrieve the entirety of any of these headers
> before or after they are parsed?  Or can I add some code to Sofia to
> parse the additional information in the Contact header?  Is this
> additional header information buried somewhere is another structure
and
> I'm missing it?
> 
> In particular I need to keep track of the gruu="*" information in the
> Contact header, and some additional information in the
> Authentication-Info, and Allow-Events headers.
> 

Once again, answering my own question here for posterity's sake.

Looks like the unparsed data is located in sip->sip_*->*_common->h_data
for all parsed SIP headers.  For example, the unparsed
Authentication-Info is located in
sip->sip_authentication_info->ai_common->h_data

I found that out after looking at the tests in sip/torture_sip.c

Thanks again for the great code.

Regards,
Andy.

Confidentiality Notice: This e-mail message including attachments, if any, is 
intended only for the person or entity to which it is addressed and may contain 
confidential and/or privileged material. Any unauthorized review, use, 
disclosure or distribution is prohibited. If you are not the intended 
recipient, please contact the sender by reply e-mail and destroy all copies of 
the original message. If you are the intended recipient, but do not wish to 
receive communications through this medium, please so advise the sender 
immediately.

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to