Ms-Diagnostics Header

Microsoft Office Communications Server 2007 and Microsoft Office Communications Server 2007 R2 will reach end of support on January 9, 2018. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.

The Ms-diagnostics header is used to pass diagnostic data between servers and clients within the domain. This header is only included in SIP Responses and not in SIP requests. Existing SIP response codes are NOT required to change in any of the following scenarios.

The format of the Ms-diagnostics header is as follows:

Ms-diagnostics: <ErrorId>[.<Sub Error Code>]5 ;source="<address>";reason="<token>"[;<attribute>="<value>"]*

The error code ranges used in the Ms-diagnostics header are as follows:

  • 0–999   Common error codes (across SIP stack, User Services modules, and so on)

  • 1000–1999   SIP stack

  • 2000–2999   User Services module (Presence)

  • 3000–3999   User Services module (Conferencing) – Focus and Focus Factory

  • 4000–4999   User Services module (Other)

  • 5000–5999   API applications

  • 6000–6999   IM Conferencing Server

  • 7000–7999   A/V Conferencing Server

  • 8000–8999   Telephony Conferencing Server

  • 9000–9999   MRAS

  • 10000–10999   Mediation Server

  • 11000–11999   Metrics Server

  • 12000–12999   VoIP – outbound call routing

  • 13000–13999   VoIP – inbound call routing

  • 14000–14999   VoIP – translation service (dial plans)

  • 15000–15999   Exchange Server UM

  • 16000–16999   Intelligent Instant Message (IM) Filter

  • 17000–17999   Client Version Filter

  • 90000–90999   Specific PIC related error codes if any

The following are server role abbreviations used in the tables:

  • AP   Access Edge Server

  • HS   Home Server

  • ES   Enterprise Store (User Services module)

  • FP   Forwarding Proxy

  • MS   Mediation Server

  • GW   PSTN Gateway

The warning codes are followed by an arbitrary number of parameters. The following parameters are required for use in any Ms-diagnostics header:

  • ErrorId. Identifier mapping to a more detailed explanation of why the error occurred; this explanation is included in the reason attribute. The error ID code can be followed by various sub-error IDs. When parsing the ms-diagnostics header, do not assume that there will only be one error ID and subwarning code.

  • Source. String (quoted) containing the address (IP or FQDN) of the server inserting the Ms-diagnostics header.

  • Reason. Diagnostic string (quoted) intended for troubleshooting. This string is not intended for client consumption, but rather for technical troubleshooting.

The Ms-diagnostics header contains sensitive/private enterprise information that should not be passed across the federation boundary (for example, the source FQDN). To facilitate passing diagnostics information to federated partners, and other such external scenarios, the Ms-diagnostics-public header is used.

The format of the Ms-diagnostics-public header, similar to the Ms-diagnostics header, is as follows:

Ms-diagnostics-public: <ErrorId>[.<Sub Error Code>]5 ; reason="<token>"[;<attribute>="<value>"]*

Important

The Ms-diagnostics-public Header must not contain the source FQDN.

If no ms-diagnostics header exists on the SIP response, SipStack adds a default Ms-diagnostics header with the following information:

  • The header must contain the name of the component from which the response originated.

  • ErrorId must have a value of 2. This error code is reserved for this default / catch-all header scenario.

  • The Reason string should contain the response string that follows the SIP response code.

Sipstack currently adds an Ms-diagnostics-Info header on all error responses. This header contains only the "tag" of the server.

The following two new WMI settings have been added to Access Edge Servers as a result of the Ms-diagnostics header work.

Table 21 WMI Settings for Ms-diagnostics headers

WMI Setting Possible Values

MSFT_SIPDiagnosticHeader:: EnableHeaderForUnAuthenticatedUser

On

Off (default)

MSFT_EnableDiagnosticHeaders: FederatedUsers

On

Off (default)

These settings will control whether the server passes the Ms-diagnostics headers back to users without an Active Directory identity and federated users. If the value is set to On, then the server will pass the Ms-diagnostics headers to users without an Active Directory identity and federated users; if the value is set to Off, then the server will pass the Ms-diagnostics headers only to users with an Active Directory identity.

Tables 22 through 33 list the error codes used in the Ms-diagnostics header and the error code descriptions.

Table 22   Common error codes (0–999)

Code Scenario SIP Response Code Originating Server

0

Server internal error; usually associated with a 500 error.

500

AP, HS (ES)

1

Service unavailable; usually associated with a 503 error.

503

AP, HS

2

Default error code used by a component if it is adding only one ms-diagnostics header for all failure scenarios, to only indicate the component from where it originates.

XXX – could be any SIP error response

Any Server

Table 23   SIP Stack error codes (1000–1999)

Code Scenario SIP Response Code Originating Server

1000

Final Handshake challenge failed; usually associated with a 401 error.

401

HS

1001

From a URI not enabled for PIC federation; usually associated with a 403 error.

403

AP

1002

From a URI not enabled for federation; usually associated with a 403 error.

403

AP

1003

Cannot route to To URI because:

Server receives a message for a user that ES cannot route to (for example, xyz@microsoft.com).

If the default federation route is not enabled, the server returns this error.

If the default federation route is enabled, the AP returns this error.

404

AP

1004

Expired route set signature. Server signs route header so that the client cannot alter routing path for any message inside of the dialog.  The signature is valid for a limited time (8 hours).  After 8 hours the dialog must be re-established); usually associated with a 481 error.

481

AP, HS, FP

1005

Cannot route to the destination domain (domain is either blocked or not configured); usually associated with a 504 error.

504

AP, HS, FP

1006

Cannot route on client connection; usually associated with a 504 error. (Note that a 480 error can result for a call transaction that does exist and will be more probable than a 504).

504 or 480

AP, HS

1007

Temporarily cannot route; usually associated with a 504 error.

504

AP, HS, FP

1008

Unable to resolve DNS SRV records; usually associated with a 504 error.

504

AP, HS, FP

1009

Conflicting SRV and host domains in DNS – not trusted for enhanced federation; usually associated with a 504 error.

504

AP

1010

Certificate trust with the next-hop server could not be established; usually associated with a 504 error.

504

AP

1011

AP receives an error response. In this scenario, we are unable to get more information about the error because it came from a federated partner. Since they will not return any details about the error, we cannot either. The most common error codes that this probably applies to are 404, 480, 481, and 504.

404, 480, 481, 504

Federated peer server

1012

From a User URI not enabled for PIC and Federation. The user tries to send a message to a non-domain user.

404

HS

1013

Server encountered a time-skew during Kerberos authentication; usually associated with a 401 error.

401

HS

1014

Unable to resolve DNS A records; usually associated with a 504 error.

504

AP, HS, FP

1015

Cannot route from message source domain.

 

 

1016

Message asserted domain traffic type does not match source domain.

 

 

1017

Cannot route from external domain to external domain on external edge.

 

 

1018

Parsing failure.

 

 

Table 24   User Services Module (presence) error codes (2000–2999)

Code Error Text

2000

Prompted subscriber does not exist.

2001

Contact does not exist.

2002

Group does not exist.

2003

Category publication failed.

2004

Subscriber is not authorized to subscribe.

2005

The user in the FROM URI is not found.

2006

Container member limit exceeded.

2007

Contact limit exceeded.

2008

Group limit exceeded.

2009

Contact extension too large.

2010

Category size limit exceeded.

2011

Delivery context per subscriber limit exceeded.

2012

Category subscription limit exceeded.

2013

msrtc-event-categories extension required.

2014

Subscription dialog does not exist.

2015

Duplicate group name.

2016

New subscription is required.

2017

Registration expired or unknown.

Table 25   User Services Module (conferencing) error codes (3000–3999)

Code Error Text

3000

From URI not enabled for conferencing with federated users.

Table 26   User Services Module common error codes (4000–4999)

Code Error Text

4000

User services default.

4001

XML parse failure.

4002

Multiple users associated with the source phone number.

4003

From URI not enabled for remote access.

4004

Credentials provided are not authorized to act as specified from URI.

4005

Destination URI either not enabled for SIP or does not exist.

4006

User not found in pool.

4007

Resource is unknown in this deployment.

4008

Input data too large.

4009

Multiple users associated with the destination phone number.

Table 27   Mediation Server error codes (10000–10999)

Code Error Text SIP Response Code Originating Server

10000

Gateway returned error code.

4xx, 5xx, 5xx

GW

10001

Gateway timeout.

408

MS

10002

Gateway empty response.

503

MS

10003

Proxy returned error code.

4xx, 5xx, 6xx

MS

10004

Proxy timeout.

408

MS

10005

Proxy empty response.

503

MS

10006

Media negotiation with the proxy failed.

488

MS

10007

Stream timeout on the proxy call leg.

410

MS

10008

Invalid incoming request.

488

MS

10009

The service is shutting down.

487, Bye

MS

10010

Media negotiation with the gateway failed.

488

MS

10011

Stream timeout on the gateway call leg.

410

MS

Table 28   VoIP (outbound routing) error codes (12000–12999)

Code Error Text

12000

Routes but no hop.

12001

No phone route usage.

12002

Phone number not present or too large.

12003

Inconsistent list state transaction.

12004

No route found.

12005

Error parsing policy.

Table 29   VoIP (inbound routing) error codes (13000–13999)

Code Error Text

13000

Call to self loop.

13001

Request was cancelled.

13002

No suitable final response.

13003

No final response.

Table 30   VoIP (Translation) error codes (14000–14999)

Code Error Text

14000

Translation unknown.

14001

Phone number too long.

14002

Called number not found.

14003

Profile name not found.

14004

Multiple phone contexts.

14005

Profile not found.

14006

Regex matching not found.

14007

Regex replace failure.

14008

Not a phone number.

14009

Tx phone num too long.

14010

Matching rule not found.

Table 31   Exchange Server UM error codes (15000–15999)

Code Error Text

15000

User properties not readable.

15001

Unexpected exception sending to UM.

15002

Unable to determine dial plan.

15003

Dial plan is unknown.

15004

Dial plan has no servers.

15005

UM server 302 with wrong contact count.

15006

UM server sent unexpected 302 response.

15007

UM server did not respond to request.

Table 32   Intelligent Instant Message (IIM) Filter error codes (16000–16999)

Code Error Text

16000

Server over loaded.

16001

Invalid request.

16002

Policy disallows message contents.

Table 33   Client Version Filter error codes (17000–17999)

Code Error Text

17000

Server over loaded.

17001

Invalid request.

17002

Invalid client version.

17003

Declined with URL.