Good day,

I'd like to add some code to Sofia so that it has the ability to lookup
SRV records for Microsoft Office Communications Servers.  Of course MS
doesn't use the standard for SIP TLS (_sips._tcp.example.com) by
default.  They created their own DNS records.

Here are the SRV records for a MS OCS 2007 internal server:

  _sipinternaltls._tcp.example.com.  3600 IN SRV 0 0 5061
myocs.example.com.

For an externally facing Edge server (MS term):

  _sipfederationtls._tcp.example.com. 3600 IN SRV 0 0 5061
myedge.example.com.
  _sip._tls.example.com.  3600 IN SRV 0 0 443 myedge.example.com.

Yes, that's a _tls, not _tcp :)

I'm wondering how I should add this code to Sofia.  I think I should be
adding it to nta.c in const sip_dnstports[] and possibly in
tports_sips[].

Anywhere else I need to add code?  Any suggestions on what I should add?
Can I add things like:

{ "tls-ms-i", "5061", "_sipinternaltls._tcp.", "SIPS+D2T" }

Or should I just add another "tls" entry with the _sipinternaltls
portion?


I played around with sip-dig.c and got it working with some small
additions, but I'm not sure if it was the "proper" way of getting it to
work.  Here's a diff of what I did to sip-dig.c:

--- sip-dig.c.ms        2009-01-29 13:10:52.000000000 -0500
+++ sip-dig.c   2009-01-29 13:23:19.000000000 -0500
@@ -254,6 +254,8 @@
       prepare_transport(dig, "tls-sctp");
     else if (strcmp(argv[1], "--tls-udp") == 0)
       prepare_transport(dig, "tls-udp");
+    else if (strcmp(argv[1], "--tls-ms") == 0)
+      prepare_transport(dig, "tls-ms");
     else if (strcmp(argv[1], "--no-sctp") == 0)
       o_sctp = 0, o_tls_sctp = 0;
     else if (strcmp(argv[1], "--help") == 0)
@@ -427,6 +429,11 @@
     tports[j].service = "SIPS+D2S";
     tports[j].srv = "_sips._sctp.";
   }
+  else if (strcasecmp(tport, "tls-ms") == 0) {
+    tports[j].name = "tls-ms";
+    tports[j].service = "SIPS+D2T";
+    tports[j].srv = "_sipinternaltls._tcp.";
+  }  
   else {
     fprintf(stderr, "%s: unknown transport \"%s\"\n", name, tport);
     return -1;

Thanks for your help,
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.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to