WARNING: The online documentation has moved to https://docs.pjsip.org.

Visit the new documentation at https://docs.pjsip.org:

BLOG | DOCUMENTATION | GITHUB

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

◆ PJSIP_ERRNO_START

#define PJSIP_ERRNO_START   (PJ_ERRNO_START_USER)

Start of error code relative to PJ_ERRNO_START_USER.

◆ PJSIP_ERRNO_FROM_SIP_STATUS

#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.

◆ PJSIP_ERRNO_TO_SIP_STATUS

#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:54

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.

◆ PJSIP_ERRNO_START_PJSIP

#define PJSIP_ERRNO_START_PJSIP   (PJSIP_ERRNO_START + 1000)

Start of PJSIP generated error code values.

◆ PJSIP_EBUSY

#define PJSIP_EBUSY

SIP object is busy.

◆ PJSIP_ETYPEEXISTS

#define PJSIP_ETYPEEXISTS

SIP object with the same type already exists.

◆ PJSIP_ESHUTDOWN

#define PJSIP_ESHUTDOWN

SIP stack is shutting down.

◆ PJSIP_ENOTINITIALIZED

#define PJSIP_ENOTINITIALIZED

SIP object is not initialized.

◆ PJSIP_ENOROUTESET

#define PJSIP_ENOROUTESET

Missing route set (for tel: URI)

◆ PJSIP_EINVALIDMSG

#define PJSIP_EINVALIDMSG

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

◆ PJSIP_ENOTREQUESTMSG

#define PJSIP_ENOTREQUESTMSG

Expecting request message.

◆ PJSIP_ENOTRESPONSEMSG

#define PJSIP_ENOTRESPONSEMSG

Expecting response message.

◆ PJSIP_EMSGTOOLONG

#define PJSIP_EMSGTOOLONG

Message too long. See also PJSIP_ERXOVERFLOW.

◆ PJSIP_EPARTIALMSG

#define PJSIP_EPARTIALMSG

Message not completely received.

◆ PJSIP_EINVALIDSTATUS

#define PJSIP_EINVALIDSTATUS

Status code is invalid.

◆ PJSIP_EINVALIDURI

#define PJSIP_EINVALIDURI

General Invalid URI error.

◆ PJSIP_EINVALIDSCHEME

#define PJSIP_EINVALIDSCHEME

Unsupported URL scheme.

◆ PJSIP_EMISSINGREQURI

#define PJSIP_EMISSINGREQURI

Missing Request-URI.

◆ PJSIP_EINVALIDREQURI

#define PJSIP_EINVALIDREQURI

Invalid request URI.

◆ PJSIP_EURITOOLONG

#define PJSIP_EURITOOLONG

URI is too long.

◆ PJSIP_EMISSINGHDR

#define PJSIP_EMISSINGHDR

Missing required header(s).

◆ PJSIP_EINVALIDHDR

#define PJSIP_EINVALIDHDR

Invalid header field.

◆ PJSIP_EINVALIDVIA

#define PJSIP_EINVALIDVIA

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

◆ PJSIP_EMULTIPLEVIA

#define PJSIP_EMULTIPLEVIA

Multiple Via headers in response.

◆ PJSIP_EMISSINGBODY

#define PJSIP_EMISSINGBODY

Missing message body.

◆ PJSIP_EINVALIDMETHOD

#define PJSIP_EINVALIDMETHOD

Invalid/unexpected method.

◆ PJSIP_EUNSUPTRANSPORT

#define PJSIP_EUNSUPTRANSPORT

Unsupported transport type.

◆ PJSIP_EPENDINGTX

#define PJSIP_EPENDINGTX

Buffer is being sent, operation still pending.

◆ PJSIP_ERXOVERFLOW

#define PJSIP_ERXOVERFLOW

Rx buffer overflow. See also PJSIP_EMSGTOOLONG.

◆ PJSIP_EBUFDESTROYED

#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().

◆ PJSIP_ETPNOTSUITABLE

#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.

◆ PJSIP_ETPNOTAVAIL

#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.

◆ PJSIP_ETSXDESTROYED

#define PJSIP_ETSXDESTROYED

Transaction has just been destroyed.

◆ PJSIP_ENOTSX

#define PJSIP_ENOTSX

No transaction.

◆ PJSIP_ECMPSCHEME

#define PJSIP_ECMPSCHEME

Scheme mismatch.

◆ PJSIP_ECMPUSER

#define PJSIP_ECMPUSER

User part mismatch.

◆ PJSIP_ECMPPASSWD

#define PJSIP_ECMPPASSWD

Password part mismatch.

◆ PJSIP_ECMPHOST

#define PJSIP_ECMPHOST

Host part mismatch.

◆ PJSIP_ECMPPORT

#define PJSIP_ECMPPORT

Port part mismatch.

◆ PJSIP_ECMPTRANSPORTPRM

#define PJSIP_ECMPTRANSPORTPRM

Transport parameter part mismatch.

◆ PJSIP_ECMPTTLPARAM

#define PJSIP_ECMPTTLPARAM

TTL parameter part mismatch.

◆ PJSIP_ECMPUSERPARAM

#define PJSIP_ECMPUSERPARAM

User parameter part mismatch.

◆ PJSIP_ECMPMETHODPARAM

#define PJSIP_ECMPMETHODPARAM

Method parameter part mismatch.

◆ PJSIP_ECMPMADDRPARAM

#define PJSIP_ECMPMADDRPARAM

Maddr parameter part mismatch.

◆ PJSIP_ECMPOTHERPARAM

#define PJSIP_ECMPOTHERPARAM

Parameter part in other_param mismatch.

◆ PJSIP_ECMPHEADERPARAM

#define PJSIP_ECMPHEADERPARAM

Parameter part in header_param mismatch.

◆ PJSIP_EFAILEDCREDENTIAL

#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.

◆ PJSIP_ENOCREDENTIAL

#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.

◆ PJSIP_EINVALIDALGORITHM

#define PJSIP_EINVALIDALGORITHM

Invalid/unsupported algorithm.

◆ PJSIP_EINVALIDQOP

#define PJSIP_EINVALIDQOP

Invalid/unsupported qop.

◆ PJSIP_EINVALIDAUTHSCHEME

#define PJSIP_EINVALIDAUTHSCHEME

Invalid/unsupported authentication scheme.

◆ PJSIP_EAUTHNOPREVCHAL

#define PJSIP_EAUTHNOPREVCHAL

No previous challenge.

◆ PJSIP_EAUTHNOAUTH

#define PJSIP_EAUTHNOAUTH

No authorization is found.

◆ PJSIP_EAUTHACCNOTFOUND

#define PJSIP_EAUTHACCNOTFOUND

Account not found.

◆ PJSIP_EAUTHACCDISABLED

#define PJSIP_EAUTHACCDISABLED

Account is disabled.

◆ PJSIP_EAUTHINVALIDREALM

#define PJSIP_EAUTHINVALIDREALM

Invalid realm.

◆ PJSIP_EAUTHINVALIDDIGEST

#define PJSIP_EAUTHINVALIDDIGEST

Invalid digest.

◆ PJSIP_EAUTHSTALECOUNT

#define PJSIP_EAUTHSTALECOUNT

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

◆ PJSIP_EAUTHINNONCE

#define PJSIP_EAUTHINNONCE

Invalid nonce value in the challenge.

◆ PJSIP_EAUTHINAKACRED

#define PJSIP_EAUTHINAKACRED

Invalid AKA credential.

◆ PJSIP_EAUTHNOCHAL

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

No challenge is found in the challenge.

◆ PJSIP_EMISSINGTAG

#define PJSIP_EMISSINGTAG

Missing From/To tag.

◆ PJSIP_ENOTREFER

#define PJSIP_ENOTREFER

Expecting REFER method

◆ PJSIP_ENOREFERSESSION

#define PJSIP_ENOREFERSESSION

Not associated with REFER subscription

◆ PJSIP_ESESSIONTERMINATED

#define PJSIP_ESESSIONTERMINATED

Session already terminated.

◆ PJSIP_ESESSIONSTATE

#define PJSIP_ESESSIONSTATE

Invalid session state for the specified operation.

◆ PJSIP_ESESSIONINSECURE

#define PJSIP_ESESSIONINSECURE

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

◆ PJSIP_TLS_EUNKNOWN

#define PJSIP_TLS_EUNKNOWN

Unknown TLS error

◆ PJSIP_TLS_EINVMETHOD

#define PJSIP_TLS_EINVMETHOD

Invalid SSL protocol method.

◆ PJSIP_TLS_ECACERT

#define PJSIP_TLS_ECACERT

Error loading/verifying SSL CA list file.

◆ PJSIP_TLS_ECERTFILE

#define PJSIP_TLS_ECERTFILE

Error loading SSL certificate chain file.

◆ PJSIP_TLS_EKEYFILE

#define PJSIP_TLS_EKEYFILE

Error adding private key from SSL certificate file.

◆ PJSIP_TLS_ECIPHER

#define PJSIP_TLS_ECIPHER

Error setting SSL cipher list.

◆ PJSIP_TLS_ECTX

#define PJSIP_TLS_ECTX

Error creating SSL context.

◆ PJSIP_TLS_ESSLCONN

#define PJSIP_TLS_ESSLCONN

Error creating SSL connection object.

◆ PJSIP_TLS_ECONNECT

#define PJSIP_TLS_ECONNECT

Unknown error when performing SSL connect().

◆ PJSIP_TLS_EACCEPT

#define PJSIP_TLS_EACCEPT

Unknown error when performing SSL accept().

◆ PJSIP_TLS_ESEND

#define PJSIP_TLS_ESEND

Unknown error when sending SSL data

◆ PJSIP_TLS_EREAD

#define PJSIP_TLS_EREAD

Unknown error when reading SSL data

◆ PJSIP_TLS_ETIMEDOUT

#define PJSIP_TLS_ETIMEDOUT

SSL negotiation has exceeded the maximum configured timeout.

◆ PJSIP_TLS_ECERTVERIF

#define PJSIP_TLS_ECERTVERIF

SSL certificate verification error.

Function Documentation

◆ pjsip_strerror()

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.

References PJ_END_DECL.

 


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