BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJSIP Reference

PJSIP Specific Error Code

PJSIP specific error constants. More...

Macros

#define PJSIP_ERRNO_START   (PJ_ERRNO_START_USER)
 
#define PJSIP_ERRNO_FROM_SIP_STATUS(code)   (PJSIP_ERRNO_START+code)
 
#define PJSIP_ERRNO_TO_SIP_STATUS(status)
 
#define PJSIP_ERRNO_START_PJSIP   (PJSIP_ERRNO_START + 1000)
 
#define PJSIP_EBUSY
 
#define PJSIP_ETYPEEXISTS
 
#define PJSIP_ESHUTDOWN
 
#define PJSIP_ENOTINITIALIZED
 
#define PJSIP_ENOROUTESET
 
#define PJSIP_EINVALIDMSG
 
#define PJSIP_ENOTREQUESTMSG
 
#define PJSIP_ENOTRESPONSEMSG
 
#define PJSIP_EMSGTOOLONG
 
#define PJSIP_EPARTIALMSG
 
#define PJSIP_EINVALIDSTATUS
 
#define PJSIP_EINVALIDURI
 
#define PJSIP_EINVALIDSCHEME
 
#define PJSIP_EMISSINGREQURI
 
#define PJSIP_EINVALIDREQURI
 
#define PJSIP_EURITOOLONG
 
#define PJSIP_EMISSINGHDR
 
#define PJSIP_EINVALIDHDR
 
#define PJSIP_EINVALIDVIA
 
#define PJSIP_EMULTIPLEVIA
 
#define PJSIP_EMISSINGBODY
 
#define PJSIP_EINVALIDMETHOD
 
#define PJSIP_EUNSUPTRANSPORT
 
#define PJSIP_EPENDINGTX
 
#define PJSIP_ERXOVERFLOW
 
#define PJSIP_EBUFDESTROYED
 
#define PJSIP_ETPNOTSUITABLE
 
#define PJSIP_ETPNOTAVAIL
 
#define PJSIP_ETSXDESTROYED
 
#define PJSIP_ENOTSX
 
#define PJSIP_ECMPSCHEME
 
#define PJSIP_ECMPUSER
 
#define PJSIP_ECMPPASSWD
 
#define PJSIP_ECMPHOST
 
#define PJSIP_ECMPPORT
 
#define PJSIP_ECMPTRANSPORTPRM
 
#define PJSIP_ECMPTTLPARAM
 
#define PJSIP_ECMPUSERPARAM
 
#define PJSIP_ECMPMETHODPARAM
 
#define PJSIP_ECMPMADDRPARAM
 
#define PJSIP_ECMPOTHERPARAM
 
#define PJSIP_ECMPHEADERPARAM
 
#define PJSIP_EFAILEDCREDENTIAL
 
#define PJSIP_ENOCREDENTIAL
 
#define PJSIP_EINVALIDALGORITHM
 
#define PJSIP_EINVALIDQOP
 
#define PJSIP_EINVALIDAUTHSCHEME
 
#define PJSIP_EAUTHNOPREVCHAL
 
#define PJSIP_EAUTHNOAUTH
 
#define PJSIP_EAUTHACCNOTFOUND
 
#define PJSIP_EAUTHACCDISABLED
 
#define PJSIP_EAUTHINVALIDREALM
 
#define PJSIP_EAUTHINVALIDDIGEST
 
#define PJSIP_EAUTHSTALECOUNT
 
#define PJSIP_EAUTHINNONCE
 
#define PJSIP_EAUTHINAKACRED
 
#define PJSIP_EAUTHNOCHAL   (PJSIP_ERRNO_START_PJSIP + 114) /* 171114 */
 
#define PJSIP_EMISSINGTAG
 
#define PJSIP_ENOTREFER
 
#define PJSIP_ENOREFERSESSION
 
#define PJSIP_ESESSIONTERMINATED
 
#define PJSIP_ESESSIONSTATE
 
#define PJSIP_ESESSIONINSECURE
 
#define PJSIP_TLS_EUNKNOWN
 
#define PJSIP_TLS_EINVMETHOD
 
#define PJSIP_TLS_ECACERT
 
#define PJSIP_TLS_ECERTFILE
 
#define PJSIP_TLS_EKEYFILE
 
#define PJSIP_TLS_ECIPHER
 
#define PJSIP_TLS_ECTX
 
#define PJSIP_TLS_ESSLCONN
 
#define PJSIP_TLS_ECONNECT
 
#define PJSIP_TLS_EACCEPT
 
#define PJSIP_TLS_ESEND
 
#define PJSIP_TLS_EREAD
 
#define PJSIP_TLS_ETIMEDOUT
 
#define PJSIP_TLS_ECERTVERIF
 

Functions

pj_str_t pjsip_strerror (pj_status_t status, char *buffer, pj_size_t bufsize)
 

Detailed Description

Macro Definition Documentation

#define PJSIP_ERRNO_START   (PJ_ERRNO_START_USER)

Start of error code relative to PJ_ERRNO_START_USER.

#define PJSIP_ERRNO_FROM_SIP_STATUS (   code)    (PJSIP_ERRNO_START+code)

Create error value from SIP status code.

Parameters
codeSIP status code.
Returns
Error code in pj_status_t namespace.
#define PJSIP_ERRNO_TO_SIP_STATUS (   status)
Value:
((status>=PJSIP_ERRNO_FROM_SIP_STATUS(100) && \
status<PJSIP_ERRNO_FROM_SIP_STATUS(800)) ? \
status-PJSIP_ERRNO_FROM_SIP_STATUS(0) : 599)
#define PJSIP_ERRNO_FROM_SIP_STATUS(code)
Definition: sip_errno.h:55

Get SIP status code from error value. If conversion to SIP status code is not available, a SIP status code 599 will be returned.

Parameters
statusError code in pj_status_t namespace.
Returns
SIP status code.
#define PJSIP_ERRNO_START_PJSIP   (PJSIP_ERRNO_START + 1000)

Start of PJSIP generated error code values.

#define PJSIP_EBUSY

SIP object is busy.

#define PJSIP_ETYPEEXISTS

SIP object with the same type already exists.

#define PJSIP_ESHUTDOWN

SIP stack is shutting down.

#define PJSIP_ENOTINITIALIZED

SIP object is not initialized.

#define PJSIP_ENOROUTESET

Missing route set (for tel: URI)

#define PJSIP_EINVALIDMSG

General invalid message error (e.g. syntax error)

#define PJSIP_ENOTREQUESTMSG

Expecting request message.

#define PJSIP_ENOTRESPONSEMSG

Expecting response message.

#define PJSIP_EMSGTOOLONG

Message too long. See also PJSIP_ERXOVERFLOW.

#define PJSIP_EPARTIALMSG

Message not completely received.

#define PJSIP_EINVALIDSTATUS

Status code is invalid.

#define PJSIP_EINVALIDURI

General Invalid URI error.

#define PJSIP_EINVALIDSCHEME

Unsupported URL scheme.

#define PJSIP_EMISSINGREQURI

Missing Request-URI.

#define PJSIP_EINVALIDREQURI

Invalid request URI.

#define PJSIP_EURITOOLONG

URI is too long.

#define PJSIP_EMISSINGHDR

Missing required header(s).

#define PJSIP_EINVALIDHDR

Invalid header field.

#define PJSIP_EINVALIDVIA

Invalid Via header in response (sent-by, etc).

#define PJSIP_EMULTIPLEVIA

Multiple Via headers in response.

#define PJSIP_EMISSINGBODY

Missing message body.

#define PJSIP_EINVALIDMETHOD

Invalid/unexpected method.

#define PJSIP_EUNSUPTRANSPORT

Unsupported transport type.

#define PJSIP_EPENDINGTX

Buffer is being sent, operation still pending.

#define PJSIP_ERXOVERFLOW

Rx buffer overflow. See also PJSIP_EMSGTOOLONG.

#define PJSIP_EBUFDESTROYED

This is not really an error, it just informs application that transmit data has been deleted on return of pjsip_tx_data_dec_ref().

#define PJSIP_ETPNOTSUITABLE

Unsuitable transport selected. This error occurs when application has explicitly requested to use a particular transport/listener, but the selected transport is not suitable to send request to the specified destination.

#define PJSIP_ETPNOTAVAIL

Transport not available. This error occurs for example when the SIP stack is trying to use a SIP transport while the transport is being paused by application.

#define PJSIP_ETSXDESTROYED

Transaction has just been destroyed.

#define PJSIP_ENOTSX

No transaction.

#define PJSIP_ECMPSCHEME

Scheme mismatch.

#define PJSIP_ECMPUSER

User part mismatch.

#define PJSIP_ECMPPASSWD

Password part mismatch.

#define PJSIP_ECMPHOST

Host part mismatch.

#define PJSIP_ECMPPORT

Port part mismatch.

#define PJSIP_ECMPTRANSPORTPRM

Transport parameter part mismatch.

#define PJSIP_ECMPTTLPARAM

TTL parameter part mismatch.

#define PJSIP_ECMPUSERPARAM

User parameter part mismatch.

#define PJSIP_ECMPMETHODPARAM

Method parameter part mismatch.

#define PJSIP_ECMPMADDRPARAM

Maddr parameter part mismatch.

#define PJSIP_ECMPOTHERPARAM

Parameter part in other_param mismatch.

#define PJSIP_ECMPHEADERPARAM

Parameter part in header_param mismatch.

#define PJSIP_EFAILEDCREDENTIAL

Credential failed to authenticate. For this failure, right credential for the realm has been found and used to authenticate against the challenge, but the server has rejected the authorization request with 401/407 response (either with no stale parameter or with "stale=false" parameter). In most cases, this indicates that the username/password combination is incorrect.

#define PJSIP_ENOCREDENTIAL

No suitable credential is found to authenticate the request against the received authentication challenge in 401/407 response. This often is caused by different realm supplied in the credential than the realm found in the challenge.

#define PJSIP_EINVALIDALGORITHM

Invalid/unsupported algorithm.

#define PJSIP_EINVALIDQOP

Invalid/unsupported qop.

#define PJSIP_EINVALIDAUTHSCHEME

Invalid/unsupported authentication scheme.

#define PJSIP_EAUTHNOPREVCHAL

No previous challenge.

#define PJSIP_EAUTHNOAUTH

No authorization is found.

#define PJSIP_EAUTHACCNOTFOUND

Account not found.

#define PJSIP_EAUTHACCDISABLED

Account is disabled.

#define PJSIP_EAUTHINVALIDREALM

Invalid realm.

#define PJSIP_EAUTHINVALIDDIGEST

Invalid digest.

#define PJSIP_EAUTHSTALECOUNT

Maximum number of stale retries exceeded. This happens when server keeps rejecting our authorization request with stale=true.

#define PJSIP_EAUTHINNONCE

Invalid nonce value in the challenge.

#define PJSIP_EAUTHINAKACRED

Invalid AKA credential.

#define PJSIP_EAUTHNOCHAL   (PJSIP_ERRNO_START_PJSIP + 114) /* 171114 */

No challenge is found in the challenge.

#define PJSIP_EMISSINGTAG

Missing From/To tag.

#define PJSIP_ENOTREFER

Expecting REFER method

#define PJSIP_ENOREFERSESSION

Not associated with REFER subscription

#define PJSIP_ESESSIONTERMINATED

Session already terminated.

#define PJSIP_ESESSIONSTATE

Invalid session state for the specified operation.

#define PJSIP_ESESSIONINSECURE

The feature being requested requires the use of secure session or transport.

#define PJSIP_TLS_EUNKNOWN

Unknown TLS error

#define PJSIP_TLS_EINVMETHOD

Invalid SSL protocol method.

#define PJSIP_TLS_ECACERT

Error loading/verifying SSL CA list file.

#define PJSIP_TLS_ECERTFILE

Error loading SSL certificate chain file.

#define PJSIP_TLS_EKEYFILE

Error adding private key from SSL certificate file.

#define PJSIP_TLS_ECIPHER

Error setting SSL cipher list.

#define PJSIP_TLS_ECTX

Error creating SSL context.

#define PJSIP_TLS_ESSLCONN

Error creating SSL connection object.

#define PJSIP_TLS_ECONNECT

Unknown error when performing SSL connect().

#define PJSIP_TLS_EACCEPT

Unknown error when performing SSL accept().

#define PJSIP_TLS_ESEND

Unknown error when sending SSL data

#define PJSIP_TLS_EREAD

Unknown error when reading SSL data

#define PJSIP_TLS_ETIMEDOUT

SSL negotiation has exceeded the maximum configured timeout.

#define PJSIP_TLS_ECERTVERIF

SSL certificate verification error.

Function Documentation

pj_str_t pjsip_strerror ( pj_status_t  status,
char *  buffer,
pj_size_t  bufsize 
)

Get error message for the specified error code. Note that this function is only able to decode PJSIP specific error code. Application should use pj_strerror(), which should be able to decode all error codes belonging to all subsystems (e.g. pjlib, pjmedia, pjsip, etc).

Parameters
statusThe error code.
bufferThe buffer where to put the error message.
bufsizeSize of the buffer.
Returns
The error message as NULL terminated string, wrapped with pj_str_t.

 


PJSIP Open Source, high performance, small footprint, and very very portable SIP stack
Copyright (C) 2006-2008 Teluu Inc.