جستجو
این کادر جستجو را ببندید.
جستجو
این کادر جستجو را ببندید.

آشنایی با کد های پاسخ در پروتکل SIP

 پروتکل SIP در واقع تبادل پیام ها است، هر پیامی که ارسال می شود یک پاسخی را در بر خواهد داشت، این پاسخ ها با کد های مشخصی بررسی و مشخص می شوند، این کد های پاسخ در پروتکل SIP بسیار شبیه و همانند پروتکل HTTP است با این تفاوت عمده که در پروتکل SIP پاسخ هایی در محدوده 6xx نیز وجود دارد.

حال چرا لازم است با این کد ها آشنا شوید؟ خب در ابتدا اگر می خواهید یک ویپ کار حرفه ای شوید قطعا نیاز به بررسی بسته ها و ارتباطات روی پروتکل SIP خواهید بود، حتی اگر یک کاربر ساده ویپ نیز هستید با این کد ها در کار با Softphone و یا Ipphone ها سر و کار خواهید داشت، به طور مثال هر گاه یک سافت فون برای رجیستر شدن به مشکل می خورد کد خطای SIP را به شما نمایش می دهد شما با دانش به این کد ها پی به مشکل اصلی خواهید برد، تصویر زیر را ببینید.

 Eyebeam

احتمالا با این تصویر بسیار برخورد داشته اید، عدد ۴۰۳ نمایش داده شده همان کد خطای پروتکل SIP است که می توانید لیست این کد ها را در زیر ببینید.

برای کد های پر کاربرد توضیحاتی به فارسی بیان کرده ایم.

1xx—Provisional Responses

۱۰۰ Trying
Extended search being performed may take a significant time so a forking proxy must send a 100 Trying response.
۱۰۱ Dialogue Establishment
Stays active till the call is disconnected.
۱۸۰ Ringing
Destination user agent received INVITE, and is alerting user of call.
۱۸۱ Call is Being Forwarded
Servers can optionally send this response to indicate a call is being forwarded.
۱۸۲ Queued
Indicates that the destination was temporarily unavailable, so the server has queued the call until the destination is available. A server may send multiple 182 responses to update progress of the queue.
۱۸۳ Session in Progress
This response may be used to send extra information for a call which is still being set up.
۱۹۹ Early Dialog Terminated
Can be used by User Agent Server to indicate to upstream SIP entities (including the User Agent Client (UAC)) that an early dialog has been terminated.

2xx—Successful Responses

محدوده کد های ۲۰۰ برای پاسخ های مثبت و یا همان موفقیت آمیز است.
۲۰۰ OK
Indicates the request was successful.
۲۰۲ Accepted
Indicates that the request has been accepted for processing, but the processing has not been completed. Deprecated.
۲۰۴ No Notification
Indicates the request was successful, but the corresponding response will not be received.

3xx—Redirection Responses

کدهای محدوده 3xx برای موقیعت و یا مسیر جدید کاربر تعیین شده است
۳۰۰ Multiple Choices
The address resolved to one of several options for the user or client to choose between, which are listed in the message body or the message’s Contact fields.
۳۰۱ Moved Permanently
The original Request-URI is no longer valid, the new address is given in the Contact header field, and the client should update any records of the original Request-URI with the new value.
۳۰۲ Moved Temporarily
The client should try at the address in the Contact field. If an Expires field is present, the client may cache the result for that period of time.
۳۰۵ Use Proxy
The Contact field details a proxy that must be used to access the requested destination.
۳۸۰ Alternative Service
The call failed, but alternatives are detailed in the message body.

4xx—Client Failure Responses

۴۰۰ Bad Request
The request could not be understood due to malformed syntax.
۴۰۱ Unauthorized
زمانی که یک درخواست بدون کاربر و رمز به شرور برسد در حالی که سرور بدون تصدیق حویت تماسی را قبول نمی کند.
The request requires user authentication. This response is issued by UASs and registrars.
۴۰۲ Payment Required
Reserved for future use.
۴۰۳ Forbidden
معمولا برای ما وقتی اتفاق میافتد که رمز یک داخلی را اشتباه زده باشیم.
The server understood the request, but is refusing to fulfil it.
۴۰۴ Not Found
سرر به شما اطلاع می دهد که همچین اطلاعات و کاربری وجود ندارد.
The server has definitive information that the user does not exist at the domain specified in the Request-URI. This status is also returned if the domain in the Request-URI does not match any of the domains handled by the recipient of the request.
۴۰۵ Method Not Allowed
The method specified in the Request-Line is understood, but not allowed for the address identified by the Request-URI.
۴۰۶ Not Acceptable
The resource identified by the request is only capable of generating response entities that have content characteristics but not acceptable according to the Accept header field sent in the request.
۴۰۷ Proxy Authentication Required
The request requires user authentication. This response is issued by proxys.
۴۰۸ Request Timeout
وقتی سرور برای انجام کار خود مثلا پیدا کردن یک کاربر دیگر به پایان زمان مشخص شده برسد این کد را ارسال می کند.
Couldn’t find the user in time. The server could not produce a response within a suitable amount of time, for example, if it could not determine the location of the user in time. The client MAY repeat the request without modifications at any later time. 
۴۰۹ Conflict
User already registered. Deprecated by omission from later RFCs and by non-registration with the IANA.
۴۱۰ Gone
The user existed once, but is not available here any more.
۴۱۱ Length Required
The server will not accept the request without a valid Content-Length. Deprecated by omission from later RFCs and by non-registration with the IANA.
۴۱۲ Conditional Request Failed
The given precondition has not been met.
۴۱۳ Request Entity Too Large
Request body too large.
۴۱۴ Request-URI Too Long
The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret.
۴۱۵ Unsupported Media Type
Request body in a format not supported.
۴۱۶ Unsupported URI Scheme
Request-URI is unknown to the server.
۴۱۷ Unknown Resource-Priority
There was a resource-priority option tag, but no Resource-Priority header.
۴۲۰ Bad Extension
Bad SIP Protocol Extension used, not understood by the server.
۴۲۱ Extension Required
The server needs a specific extension not listed in the Supported header.
۴۲۲ Session Interval Too Small
The received request contains a Session-Expires header field with a duration below the minimum timer.
۴۲۳ Interval Too Brief
Expiration time of the resource is too short.
۴۲۴ Bad Location Information
The request’s location content was malformed or otherwise unsatisfactory.
۴۲۸ Use Identity Header
The server policy requires an Identity header, and one has not been provided.
۴۲۹ Provide Referrer Identity
The server did not receive a valid Referred-By token on the request.
۴۳۰ Flow Failed
A specific flow to a user agent has failed, although other flows may succeed. This response is intended for use between proxy devices, and should not be seen by an endpoint (and if it is seen by one, should be treated as a ۴۰۰ Bad Request response).
۴۳۳ Anonymity Disallowed
The request has been rejected because it was anonymous.
۴۳۶ Bad Identity-Info
The request has an Identity-Info header, and the URI scheme in that header cannot be dereferenced.
۴۳۷ Unsupported Certificate
The server was unable to validate a certificate for the domain that signed the request.
۴۳۸ Invalid Identity Header
The server obtained a valid certificate that the request claimed was used to sign the request, but was unable to verify that signature.
۴۳۹ First Hop Lacks Outbound Support
The first outbound proxy the user is attempting to register through does not support the “outbound” feature of although the registrar does.
۴۷۰ Consent Needed
The source of the request did not have the permission of the recipient to make such a request.
۴۸۰ Temporarily Unavailable
Callee currently unavailable.
۴۸۱ Call/Transaction Does Not Exist
Server received a request that does not match any dialog or transaction.
۴۸۲ Loop Detected.
Server has detected a loop.
۴۸۳ Too Many Hops
Max-Forwards header has reached the value ‘0’.
۴۸۴ Address Incomplete
Request-URI incomplete.
۴۸۵ Ambiguous
Request-URI is ambiguous.
۴۸۶ Busy Here
Callee is busy.
۴۸۷ Request Terminated
Request has terminated by bye or cancel.
۴۸۸ Not Acceptable Here
Some aspect of the session description or the Request-URI is not acceptable.
۴۸۹ Bad Event
The server did not understand an event package specified in an Event header field.
۴۹۱ Request Pending
Server has some pending request from the same dialog.
۴۹۳ Undecipherable
Request contains an encrypted MIME body, which recipient can not decrypt.
۴۹۴ Security Agreement Required
The server has received a request that requires a negotiated security mechanism, and the response contains a list of suitable security mechanisms for the requester to choose between, or a digest authentication challenge.[۱۹]:§۲.۴

5xx—Server Failure Responses[edit]

کدها مربوط به خطاهایی است که سمت سرور اتفاق میافتد، در این حالات در سرور خود دنبال رفع مشکل باشید.
۵۰۰ Server Internal Error
The server could not fulfill the request due to some unexpected condition.
۵۰۱ Not Implemented
The server does not have the ability to fulfill the request, such as because it does not recognize the request method. (Compare with ۴۰۵ Method Not Allowed, where the server recognizes the method but does not allow or support it.)
۵۰۲ Bad Gateway
The server is acting as a gateway or proxy, and received an invalid response from a downstream server while attempting to fulfill the request.
۵۰۳ Service Unavailable
The server is undergoing maintenance or is temporarily overloaded and so cannot process the request. A “Retry-After” header field may specify when the client may reattempt its request.
۵۰۴ Server Time-out
The server attempted to access another server in attempting to process the request, and did not receive a prompt response.[۱]:§۲۱.۵.۵
۵۰۵ Version Not Supported
The SIP protocol version in the request is not supported by the server.
۵۱۳ Message Too Large
The request message length is longer than the server can process.
۵۸۰ Precondition Failure
The server is unable or unwilling to meet some constraints specified in the offer.

6xx—Global Failure Responses

۶۰۰ Busy Everywhere
All possible destinations are busy. Unlike the 486 response, this response indicates the destination knows there are no alternative destinations (such as a voicemail server) able to accept the call.
۶۰۳ Decline
The destination does not wish to participate in the call, or cannot do so, and additionally the destination knows there are no alternative destinations (such as a voicemail server) willing to accept the call.
۶۰۴ Does Not Exist Anywhere
The server has authoritative information that the requested user does not exist anywhere.
۶۰۶ Not Acceptable
The user’s agent was contacted successfully but some aspects of the session description such as the requested media, bandwidth, or addressing style were not acceptable
0 0 رای ها
امتیازدهی به مقاله
اشتراک در
اطلاع از
guest

0 نظرات
قدیمی‌ترین
تازه‌ترین بیشترین رأی
بازخورد (Feedback) های اینلاین
مشاهده همه دیدگاه ها