sip.h File Reference

chan_sip header file More...

#include "asterisk.h"
#include "asterisk/stringfields.h"
#include "asterisk/linkedlists.h"
#include "asterisk/strings.h"
#include "asterisk/tcptls.h"
#include "asterisk/test.h"
#include "asterisk/channel.h"
#include "asterisk/app.h"
#include "asterisk/indications.h"
#include "asterisk/security_events.h"
#include "asterisk/features.h"
#include "asterisk/rtp_engine.h"
#include "asterisk/netsock2.h"
#include "asterisk/features_config.h"
#include "route.h"

Include dependency graph for sip.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  __show_chan_arg
 argument for the 'show channels|subscriptions' callback. More...
struct  _map_x_s
 generic struct to map between strings and integers. Fill it with x-s pairs, terminate with an entry with s = NULL; Then you can call map_x_s(...) to map an integer to a string, and map_s_x() for the string -> integer mapping. More...
struct  cc_epa_entry
 Instance data for a Call completion EPA entry. More...
struct  cfsip_options
 List of well-known SIP options. If we get this in a require, we should check the list and answer accordingly. More...
struct  digestkeys
struct  domain
 Domain data structure. More...
struct  epa_backend
 backend for an event publication agent More...
struct  epa_static_data
struct  offered_media
 Structure for remembering offered media in an INVITE, to make sure we reply to all media streams. More...
struct  sip_auth
 sip_auth: Credentials for authentication to other SIP services More...
struct  sip_auth_container
 Container of SIP authentication credentials. More...
struct  sip_cc_agent_pvt
struct  sip_epa_entry
struct  sip_esc_entry
 common ESC items for all event types More...
struct  sip_esc_publish_callbacks
 Callbacks for SIP ESCs. More...
struct  sip_history
 sip_history: Structure for saving transactions within a SIP dialog More...
struct  sip_invite_param
 Parameters to the transmit_invite function. More...
struct  sip_mailbox
 A peer's mailbox. More...
struct  sip_monitor_instance
struct  sip_msg_hdr
struct  sip_notify
 Struct to handle custom SIP notify requests. Dynamically allocated when needed. More...
struct  sip_peer
 Structure for SIP peer data, we place calls to peers if registered or fixed IP address (host). More...
struct  sip_pkt
 sip packet - raw format for outbound packets that are sent or scheduled for transmission Packets are linked in a list, whose head is in the struct sip_pvt they belong to. Each packet holds a reference to the parent struct sip_pvt. This structure is allocated in __sip_reliable_xmit() and only for packets that require retransmissions. More...
struct  sip_proxy
 definition of a sip proxy server More...
struct  sip_pvt
 Structure used for each SIP dialog, ie. a call, a registration, a subscribe. Created and initialized by sip_alloc(), the descriptor goes into the list of descriptors (dialoglist). More...
struct  sip_pvt::request_queue
struct  sip_refer
 Structure to handle SIP transfers. Dynamically allocated when needed. More...
struct  sip_registry
 Registrations with other SIP proxies. More...
struct  sip_request
 sip_request: The data grabbed from the UDP socket More...
struct  sip_settings
 a place to store all global settings for the sip channel driver More...
struct  sip_socket
 The SIP socket definition. More...
struct  sip_st_cfg
 Structure that encapsulates all attributes related to configuration of SIP Session-Timers feature on a per user/peer basis. More...
struct  sip_st_dlg
 Structure that encapsulates all attributes related to running SIP Session-Timers feature on a per dialog basis. More...
struct  sip_subscription_mwi
 Definition of an MWI subscription to another server. More...
struct  sip_threadinfo
 Definition of a thread that handles a socket. More...
struct  sip_via
 Structure to store Via information. More...
struct  t38properties
 T.38 channel settings (at some point we need to make this alloc'ed. More...
struct  tcptls_packet

GlobalSettings

Global settings apply to the channel (often settings you can change in the general section of sip.conf

#define REQ_OFFSET_TO_STR(req, offset)   (ast_str_buffer((req)->data) + ((req)->offset))
#define sip_ref_peer(peer, tag)   ao2_t_bump(peer, tag)
#define sip_unref_peer(peer, tag)   ({ ao2_t_cleanup(peer, tag); (NULL); })
enum  sip_cc_notify_state { CC_QUEUED, CC_READY }
 The states that can be represented in a SIP call-completion NOTIFY. More...
enum  sip_cc_publish_state { CC_CLOSED, CC_OPEN }
 The states that can be represented in a SIP call-completion PUBLISH. More...
enum  sip_publish_type {
  SIP_PUBLISH_UNKNOWN, SIP_PUBLISH_INITIAL, SIP_PUBLISH_REFRESH, SIP_PUBLISH_MODIFY,
  SIP_PUBLISH_REMOVE, SIP_PUBLISH_UNKNOWN, SIP_PUBLISH_INITIAL, SIP_PUBLISH_REFRESH,
  SIP_PUBLISH_MODIFY, SIP_PUBLISH_REMOVE
}
 The types of PUBLISH messages defined in RFC 3903. More...
typedef int(*const esc_publish_callback )(struct sip_pvt *, struct sip_request *, struct event_state_compositor *, struct sip_esc_entry *)
static struct ast_threadstorage check_auth_buf = { .once = PTHREAD_ONCE_INIT , .key_init = __init_check_auth_buf , .custom_init = NULL , }
static struct cfsip_options sip_options []
 List of well-known SIP options. If we get this in a require, we should check the list and answer accordingly.
static void __init_check_auth_buf (void)
void sip_auth_headers (enum sip_auth_type code, char **header, char **respheader)
 return the request and response header for a 401 or 407 code
struct sip_peersip_find_peer (const char *peer, struct ast_sockaddr *addr, int realtime, int which_objects, int devstate_only, int transport)
 Locate device by name or ip address.
const char * sip_get_header (const struct sip_request *req, const char *name)
 Get header from SIP request.
const char * sip_get_transport (enum ast_transport t)
 Return transport as string.

Defines

#define ALLOWED_METHODS   "INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE"
 SIP Methods we support.
#define CALLERID_UNKNOWN   "Anonymous"
#define DEC_CALL_LIMIT   0
#define DEC_CALL_RINGING   2
#define DEFAULT_AUTHLIMIT   100
#define DEFAULT_AUTHTIMEOUT   30
#define DEFAULT_DEFAULT_EXPIRY   120
#define DEFAULT_EXPIRY   900
#define DEFAULT_FREQ_NOTOK   10 * 1000
#define DEFAULT_MAX_EXPIRY   3600
#define DEFAULT_MAX_FORWARDS   70
#define DEFAULT_MAX_SE   1800
#define DEFAULT_MAXMS   2000
#define DEFAULT_MIN_EXPIRY   60
#define DEFAULT_MIN_SE   90
#define DEFAULT_MWI_EXPIRY   3600
#define DEFAULT_QUALIFY_GAP   100
#define DEFAULT_QUALIFY_PEERS   1
#define DEFAULT_QUALIFYFREQ   60 * 1000
#define DEFAULT_REGISTRATION_TIMEOUT   20
#define DEFAULT_RETRANS   1000
#define DEFAULT_TIMER_T1   500
#define DEFAULT_TRANS_TIMEOUT   -1
#define EXPIRY_GUARD_LIMIT   30
#define EXPIRY_GUARD_MIN   500
#define EXPIRY_GUARD_PCT   0.20
#define EXPIRY_GUARD_SECS   15
#define FALSE   0
#define FINDALLDEVICES   (FINDUSERS | FINDPEERS)
#define FINDPEERS   (1 << 1)
#define FINDUSERS   (1 << 0)
#define FROMDOMAIN_INVALID   "anonymous.invalid"
#define INC_CALL_LIMIT   1
#define INC_CALL_RINGING   3
#define INITIAL_CSEQ   101
#define MAX_AUTHTRIES   3
#define MAX_HISTORY_ENTRIES   50
#define NO_RTP   0
#define NOT_SUPPORTED   0
#define OFFERED_MEDIA_COUNT   4
 The number of media types in enum media_type below.
#define PROVIS_KEEPALIVE_TIMEOUT   60000
#define RTP   1
#define SDP_MAX_RTPMAP_CODECS   32
#define SIP_MAX_HEADERS   64
#define SIP_MAX_LINES   256
#define SIP_MAX_PACKET_SIZE   20480
#define SIP_MIN_PACKET   4096
#define SIP_OPT_100REL   (1 << 1)
#define SIP_OPT_EARLY_SESSION   (1 << 3)
#define SIP_OPT_EVENTLIST   (1 << 11)
#define SIP_OPT_FROMCHANGE   (1 << 17)
#define SIP_OPT_GRUU   (1 << 12)
#define SIP_OPT_HISTINFO   (1 << 15)
#define SIP_OPT_JOIN   (1 << 4)
#define SIP_OPT_NOREFERSUB   (1 << 14)
#define SIP_OPT_OUTBOUND   (1 << 20)
#define SIP_OPT_PATH   (1 << 5)
#define SIP_OPT_PRECONDITION   (1 << 7)
#define SIP_OPT_PREF   (1 << 6)
#define SIP_OPT_PRIVACY   (1 << 8)
#define SIP_OPT_RECLISTINV   (1 << 18)
#define SIP_OPT_RECLISTSUB   (1 << 19)
#define SIP_OPT_REPLACES   (1 << 0)
#define SIP_OPT_RESPRIORITY   (1 << 16)
#define SIP_OPT_SDP_ANAT   (1 << 9)
#define SIP_OPT_SEC_AGREE   (1 << 10)
#define SIP_OPT_TARGET_DIALOG   (1 << 13)
#define SIP_OPT_TIMER   (1 << 2)
#define SIP_OPT_UNKNOWN   (1 << 21)
#define SIP_RESERVED   ";/?:@&=+$,# "
#define SIP_TRANS_TIMEOUT   64 * DEFAULT_TIMER_T1
#define SIPBUFSIZE   512
#define STANDARD_SIP_PORT   5060
 Standard SIP unsecure port for UDP and TCP from RFC 3261. DO NOT CHANGE THIS.
#define STANDARD_TLS_PORT   5061
 Standard SIP TLS port from RFC 3261. DO NOT CHANGE THIS.
#define SUPPORTED   1
#define TRUE   1
#define XMIT_ERROR   -2
SIPflags2
a second page of flags (for flags[1]

#define CHECK_AUTH_BUF_INITLEN   256
#define SIP_PAGE2_ALLOWOVERLAP   (3 << 13)
#define SIP_PAGE2_ALLOWOVERLAP_DTMF   (2 << 13)
#define SIP_PAGE2_ALLOWOVERLAP_NO   (0 << 13)
#define SIP_PAGE2_ALLOWOVERLAP_SPARE   (3 << 13)
#define SIP_PAGE2_ALLOWOVERLAP_YES   (1 << 13)
#define SIP_PAGE2_ALLOWSUBSCRIBE   (1 << 12)
#define SIP_PAGE2_BUGGY_MWI   (1 << 22)
#define SIP_PAGE2_CALL_ONHOLD   (3 << 19)
#define SIP_PAGE2_CALL_ONHOLD_ACTIVE   (1 << 19)
#define SIP_PAGE2_CALL_ONHOLD_INACTIVE   (3 << 19)
#define SIP_PAGE2_CALL_ONHOLD_ONEDIR   (2 << 19)
#define SIP_PAGE2_CONNECTLINEUPDATE_PEND   (1 << 6)
#define SIP_PAGE2_DIALOG_ESTABLISHED   (1 << 23)
#define SIP_PAGE2_FAX_DETECT   (3 << 24)
#define SIP_PAGE2_FAX_DETECT_BOTH   (3 << 24)
#define SIP_PAGE2_FAX_DETECT_CNG   (1 << 24)
#define SIP_PAGE2_FAX_DETECT_T38   (2 << 24)
#define SIP_PAGE2_FLAGS_TO_COPY
#define SIP_PAGE2_HAVEPEERCONTEXT   (1 << 28)
#define SIP_PAGE2_IGNORESDPVERSION   (1 << 16)
#define SIP_PAGE2_PREFERRED_CODEC   (1 << 9)
#define SIP_PAGE2_Q850_REASON   (1 << 3)
#define SIP_PAGE2_RFC2833_COMPENSATE   (1 << 21)
#define SIP_PAGE2_RPID_IMMEDIATE   (1 << 7)
#define SIP_PAGE2_RPID_UPDATE   (1 << 2)
#define SIP_PAGE2_RPORT_PRESENT   (1 << 8)
#define SIP_PAGE2_RTAUTOCLEAR   (1 << 1)
#define SIP_PAGE2_RTCACHEFRIENDS   (1 << 0)
#define SIP_PAGE2_STATECHANGEQUEUE   (1 << 5)
#define SIP_PAGE2_SUBSCRIBEMWIONLY   (1 << 15)
#define SIP_PAGE2_SYMMETRICRTP   (1 << 4)
#define SIP_PAGE2_T38SUPPORT   (3 << 17)
#define SIP_PAGE2_T38SUPPORT_UDPTL   (1 << 17)
#define SIP_PAGE2_T38SUPPORT_UDPTL_FEC   (2 << 17)
#define SIP_PAGE2_T38SUPPORT_UDPTL_REDUNDANCY   (3 << 17)
#define SIP_PAGE2_TEXTSUPPORT   (1 << 11)
#define SIP_PAGE2_TRUST_ID_OUTBOUND   (3 << 30)
#define SIP_PAGE2_TRUST_ID_OUTBOUND_LEGACY   (0 << 30)
#define SIP_PAGE2_TRUST_ID_OUTBOUND_NO   (1 << 30)
#define SIP_PAGE2_TRUST_ID_OUTBOUND_YES   (2 << 30)
#define SIP_PAGE2_UDPTL_DESTINATION   (1 << 26)
#define SIP_PAGE2_USE_SRTP   (1 << 29)
#define SIP_PAGE2_VIDEOSUPPORT   (1 << 10)
#define SIP_PAGE2_VIDEOSUPPORT_ALWAYS   (1 << 27)
#define SIP_PAGE3_DIRECT_MEDIA_OUTGOING   (1 << 4)
#define SIP_PAGE3_DISCARD_REMOTE_HOLD_RETRIEVAL   (1 << 8)
#define SIP_PAGE3_FLAGS_TO_COPY
#define SIP_PAGE3_FORCE_AVP   (1 << 9)
#define SIP_PAGE3_ICE_SUPPORT   (1 << 6)
#define SIP_PAGE3_IGNORE_PREFCAPS   (1 << 7)
#define SIP_PAGE3_NAT_AUTO_COMEDIA   (1 << 3)
#define SIP_PAGE3_NAT_AUTO_RPORT   (1 << 2)
#define SIP_PAGE3_SNOM_AOC   (1 << 0)
#define SIP_PAGE3_SRTP_TAG_32   (1 << 1)
#define SIP_PAGE3_USE_AVPF   (1 << 5)
DefaultValues Default values, set and reset in reload_config before reading configuration
Note:
in many SIP headers, absence of a port number implies port 5060, and this is why we cannot change the above constant. There is a limited number of places in asterisk where we could, in principle, use a different "default" port number, but we do not support this feature at the moment. You can run Asterisk with SIP on a different port with a configuration option. If you change this value in the source code, the signalling will be incorrect.
These are default values in the source. There are other recommended values in the sip.conf.sample for new installations. These may differ to keep backwards compatibility, yet encouraging new behaviour on new installations

#define DEFAULT_ACCEPT_OUTOFCALL_MESSAGE   TRUE
#define DEFAULT_ALLOW_EXT_DOM   TRUE
#define DEFAULT_ALLOWGUEST   TRUE
#define DEFAULT_ALWAYSAUTHREJECT   TRUE
#define DEFAULT_AUTH_MESSAGE   TRUE
#define DEFAULT_AUTH_OPTIONS   FALSE
#define DEFAULT_AUTOCREATEPEER   AUTOPEERS_DISABLED
#define DEFAULT_CALLCOUNTER   FALSE
#define DEFAULT_CALLERID   "asterisk"
#define DEFAULT_COMPACTHEADERS   FALSE
#define DEFAULT_CONTEXT   "default"
#define DEFAULT_COS_AUDIO   5
#define DEFAULT_COS_SIP   4
#define DEFAULT_COS_TEXT   5
#define DEFAULT_COS_VIDEO   6
#define DEFAULT_DOMAINSASREALM   FALSE
#define DEFAULT_ENGINE   "asterisk"
#define DEFAULT_KEEPALIVE   0
#define DEFAULT_KEEPALIVE_INTERVAL   60
#define DEFAULT_LEGACY_USEROPTION_PARSING   FALSE
#define DEFAULT_MATCHEXTERNADDRLOCALLY   FALSE
#define DEFAULT_MAX_CALL_BITRATE   (384)
#define DEFAULT_MOHINTERPRET   "default"
#define DEFAULT_MOHSUGGEST   ""
#define DEFAULT_MWI_FROM   ""
#define DEFAULT_NOTIFYCID   DISABLED
#define DEFAULT_NOTIFYMIME   "application/simple-message-summary"
#define DEFAULT_NOTIFYRINGING   TRUE
#define DEFAULT_PEDANTIC   TRUE
#define DEFAULT_QUALIFY   FALSE
#define DEFAULT_REALM   "asterisk"
#define DEFAULT_RECORD_FEATURE   "automon"
#define DEFAULT_REGEXTENONQUALIFY   FALSE
#define DEFAULT_RTPKEEPALIVE   0
#define DEFAULT_SDPOWNER   "root"
#define DEFAULT_SDPSESSION   "Asterisk PBX"
#define DEFAULT_SEND_DIVERSION   TRUE
#define DEFAULT_SRVLOOKUP   TRUE
#define DEFAULT_STORE_SIP_CAUSE   FALSE
#define DEFAULT_T1MIN   100
#define DEFAULT_TOS_AUDIO   0
#define DEFAULT_TOS_SIP   0
#define DEFAULT_TOS_TEXT   0
#define DEFAULT_TOS_VIDEO   0
#define DEFAULT_USERAGENT   "Asterisk PBX"
#define DEFAULT_VMEXTEN   "asterisk"
SIPflags
Various flags for the flags field in the pvt structure Trying to sort these up (one or more of the following): D: Dialog P: Peer/user G: Global flag When flags are used by multiple structures, it is important that they have a common layout so it is easy to copy them.

#define SIP_CALL_LIMIT   (1 << 7)
#define SIP_DEFER_BYE_ON_TRANSFER   (1 << 10)
#define SIP_DIRECT_MEDIA   (1 << 20)
#define SIP_DIRECT_MEDIA_NAT   (2 << 20)
#define SIP_DTMF   (7 << 15)
#define SIP_DTMF_AUTO   (3 << 15)
#define SIP_DTMF_INBAND   (1 << 15)
#define SIP_DTMF_INFO   (2 << 15)
#define SIP_DTMF_RFC2833   (0 << 15)
#define SIP_DTMF_SHORTINFO   (4 << 15)
#define SIP_FLAGS_TO_COPY
 Flags to copy from peer/user to dialog.
#define SIP_G726_NONSTANDARD   (1 << 31)
#define SIP_GOTREFER   (1 << 6)
#define SIP_INC_COUNT   (1 << 8)
#define SIP_INC_RINGING   (1 << 9)
#define SIP_INSECURE   (3 << 23)
#define SIP_INSECURE_INVITE   (1 << 24)
#define SIP_INSECURE_NONE   (0 << 23)
#define SIP_INSECURE_PORT   (1 << 23)
#define SIP_NAT_FORCE_RPORT   (1 << 18)
#define SIP_NAT_RPORT_PRESENT   (1 << 19)
#define SIP_NEEDREINVITE   (1 << 4)
#define SIP_OFFER_CC   (1 << 1)
#define SIP_OUTGOING   (1 << 0)
#define SIP_PENDINGBYE   (1 << 5)
#define SIP_PROG_INBAND   (3 << 25)
#define SIP_PROG_INBAND_NEVER   (1 << 25)
#define SIP_PROG_INBAND_NO   (0 << 25)
#define SIP_PROG_INBAND_YES   (2 << 25)
#define SIP_PROGRESS_SENT   (1 << 3)
#define SIP_PROMISCREDIR   (1 << 11)
#define SIP_REINVITE   (7 << 20)
#define SIP_REINVITE_NONE   (0 << 20)
#define SIP_REINVITE_UPDATE   (4 << 20)
#define SIP_RINGING   (1 << 2)
#define SIP_SENDRPID   (3 << 29)
#define SIP_SENDRPID_NO   (0 << 29)
#define SIP_SENDRPID_PAI   (1 << 29)
#define SIP_SENDRPID_RPID   (2 << 29)
#define SIP_TRUSTRPID   (1 << 12)
#define SIP_USECLIENTCODE   (1 << 14)
#define SIP_USEPATH   (1 << 27)
#define SIP_USEREQPHONE   (1 << 13)

Enumerations

enum  autocreatepeer_mode { AUTOPEERS_DISABLED = 0, AUTOPEERS_VOLATILE, AUTOPEERS_PERSIST }
 Automatic peer registration behavior. More...
enum  can_create_dialog { CAN_NOT_CREATE_DIALOG, CAN_CREATE_DIALOG, CAN_CREATE_DIALOG_UNSUPPORTED_METHOD }
 States whether a SIP message can create a dialog in Asterisk. More...
enum  check_auth_result {
  AUTH_DONT_KNOW = -100, AUTH_SUCCESSFUL = 0, AUTH_CHALLENGE_SENT = 1, AUTH_SECRET_FAILED = -1,
  AUTH_USERNAME_MISMATCH = -2, AUTH_NOT_FOUND = -3, AUTH_UNKNOWN_DOMAIN = -5, AUTH_PEER_NOT_DYNAMIC = -6,
  AUTH_ACL_FAILED = -7, AUTH_BAD_TRANSPORT = -8, AUTH_RTP_FAILED = -9, AUTH_SESSION_LIMIT = -10
}
 Authentication result from check_auth* functions. More...
enum  digest_keys {
  K_RESP, K_URI, K_USER, K_NONCE,
  K_LAST
}
enum  domain_mode { SIP_DOMAIN_AUTO, SIP_DOMAIN_CONFIG }
 Modes for SIP domain handling in the PBX. More...
enum  inv_req_result { INV_REQ_SUCCESS = 11, INV_REQ_FAILED = 10, INV_REQ_ERROR = 9 }
 The results from handling an invite request. More...
enum  invitestates {
  INV_NONE = 0, INV_CALLING = 1, INV_PROCEEDING = 2, INV_EARLY_MEDIA = 3,
  INV_COMPLETED = 4, INV_CONFIRMED = 5, INV_TERMINATED = 6, INV_CANCELLED = 7
}
 States for the INVITE transaction, not the dialog. More...
enum  media_type {
  SDP_AUDIO, SDP_VIDEO, SDP_IMAGE, SDP_TEXT,
  SDP_UNKNOWN
}
 Media types generate different "dummy answers" for not accepting the offer of a media stream. We need to add definitions for each RTP profile. Secure RTP is not the same as normal RTP and will require a new definition. More...
enum  notifycid_setting { DISABLED = 0, ENABLED = 1, IGNORE_CONTEXT = 2 }
 Settings for the 'notifycid' option, see sip.conf.sample for details. More...
enum  parse_register_result { PARSE_REGISTER_DENIED, PARSE_REGISTER_FAILED, PARSE_REGISTER_UPDATE, PARSE_REGISTER_QUERY }
 Results from the parse_register() function. More...
enum  referstatus {
  REFER_IDLE, REFER_SENT, REFER_RECEIVED, REFER_CONFIRMED,
  REFER_ACCEPTED, REFER_RINGING, REFER_200OK, REFER_FAILED,
  REFER_NOAUTH
}
 Parameters to know status of transfer. More...
enum  sip_auth_type { PROXY_AUTH = 407, WWW_AUTH = 401 }
 Authentication types - proxy or www authentication. More...
enum  sip_debug_e { sip_debug_none = 0, sip_debug_config = 1, sip_debug_console = 2 }
 debugging state We store separately the debugging requests from the config file and requests from the CLI. Debugging is enabled if either is set (which means that if sipdebug is set in the config file, we can only turn it off by reloading the config). More...
enum  sip_get_dest_result {
  SIP_GET_DEST_EXTEN_MATCHMORE = 1, SIP_GET_DEST_EXTEN_FOUND = 0, SIP_GET_DEST_EXTEN_NOT_FOUND = -1, SIP_GET_DEST_REFUSED = -2,
  SIP_GET_DEST_INVALID_URI = -3
}
 Result from get_destination function. More...
enum  sip_peer_type { SIP_TYPE_PEER = (1 << 0), SIP_TYPE_USER = (1 << 1) }
enum  sip_result { AST_SUCCESS = 0, AST_FAILURE = -1 }
 The result of a lot of functions. More...
enum  sip_tcptls_alert { TCPTLS_ALERT_DATA, TCPTLS_ALERT_STOP }
enum  sipmethod {
  SIP_UNKNOWN, SIP_RESPONSE, SIP_REGISTER, SIP_OPTIONS,
  SIP_NOTIFY, SIP_INVITE, SIP_ACK, SIP_PRACK,
  SIP_BYE, SIP_REFER, SIP_SUBSCRIBE, SIP_MESSAGE,
  SIP_UPDATE, SIP_INFO, SIP_CANCEL, SIP_PUBLISH,
  SIP_PING
}
 SIP Request methods known by Asterisk. More...
enum  sipregistrystate {
  REG_STATE_UNREGISTERED = 0, REG_STATE_REGSENT, REG_STATE_AUTHSENT, REG_STATE_REGISTERED,
  REG_STATE_REJECTED, REG_STATE_TIMEOUT, REG_STATE_NOAUTH, REG_STATE_FAILED
}
 States for outbound registrations (with register= lines in sip.conf. More...
enum  st_mode { SESSION_TIMER_MODE_INVALID = 0, SESSION_TIMER_MODE_ACCEPT, SESSION_TIMER_MODE_ORIGINATE, SESSION_TIMER_MODE_REFUSE }
 Modes in which Asterisk can be configured to run SIP Session-Timers. More...
enum  st_refresher { SESSION_TIMER_REFRESHER_AUTO, SESSION_TIMER_REFRESHER_US, SESSION_TIMER_REFRESHER_THEM }
 The entity playing the refresher role for Session-Timers. More...
enum  st_refresher_param { SESSION_TIMER_REFRESHER_PARAM_UNKNOWN, SESSION_TIMER_REFRESHER_PARAM_UAC, SESSION_TIMER_REFRESHER_PARAM_UAS }
enum  subscriptiontype {
  NONE = 0, XPIDF_XML, DIALOG_INFO_XML, CPIM_PIDF_XML,
  PIDF_XML, MWI_NOTIFICATION, CALL_COMPLETION
}
 Type of subscription, based on the packages we do support, see subscription_types. More...
enum  t38_action_flag { SDP_T38_NONE = 0, SDP_T38_INITIATE, SDP_T38_ACCEPT }
enum  t38state {
  T38_DISABLED = 0, T38_LOCAL_REINVITE, T38_PEER_REINVITE, T38_ENABLED,
  T38_REJECTED
}
 T38 States for a call. More...
enum  transfermodes { TRANSFER_OPENFORALL, TRANSFER_CLOSED }
 Authorization scheme for call transfers. More...
enum  xmittype { XMIT_CRITICAL = 2, XMIT_RELIABLE = 1, XMIT_UNRELIABLE = 0 }
 When sending a SIP message, we can send with a few options, depending on type of SIP request. UNRELIABLE is moslty used for responses to repeated requests, where the original response would be sent RELIABLE in an INVITE transaction. More...


Detailed Description

chan_sip header file

Definition in file sip.h.


Define Documentation

#define ALLOWED_METHODS   "INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE"

SIP Methods we support.

Todo:
This string should be set dynamically. We only support REFER and SUBSCRIBE if we have allowsubscribe and allowrefer on in sip.conf.

Definition at line 166 of file sip.h.

Referenced by respprep(), transmit_invite(), transmit_notify_with_sipfrag(), transmit_reinvite_with_sdp(), and update_connectedline().

#define CALLERID_UNKNOWN   "Anonymous"

Definition at line 88 of file sip.h.

Referenced by initreqprep().

#define CHECK_AUTH_BUF_INITLEN   256

Definition at line 393 of file sip.h.

Referenced by check_auth(), sip_report_security_event(), and transmit_fake_auth_response().

#define DEC_CALL_LIMIT   0

#define DEC_CALL_RINGING   2

Definition at line 122 of file sip.h.

Referenced by handle_response_invite(), and update_call_counter().

#define DEFAULT_ACCEPT_OUTOFCALL_MESSAGE   TRUE

Definition at line 225 of file sip.h.

Referenced by reload_config().

#define DEFAULT_ALLOW_EXT_DOM   TRUE

Allow external domains

Definition at line 211 of file sip.h.

Referenced by reload_config().

#define DEFAULT_ALLOWGUEST   TRUE

Definition at line 198 of file sip.h.

Referenced by reload_config().

#define DEFAULT_ALWAYSAUTHREJECT   TRUE

Don't reject authentication requests always

Definition at line 222 of file sip.h.

Referenced by reload_config().

#define DEFAULT_AUTH_MESSAGE   TRUE

Definition at line 224 of file sip.h.

Referenced by reload_config().

#define DEFAULT_AUTH_OPTIONS   FALSE

Definition at line 223 of file sip.h.

Referenced by reload_config().

#define DEFAULT_AUTHLIMIT   100

Definition at line 69 of file sip.h.

Referenced by reload_config().

#define DEFAULT_AUTHTIMEOUT   30

Definition at line 70 of file sip.h.

Referenced by reload_config().

#define DEFAULT_AUTOCREATEPEER   AUTOPEERS_DISABLED

Don't create peers automagically

Definition at line 217 of file sip.h.

Referenced by reload_config().

#define DEFAULT_CALLCOUNTER   FALSE

Do not enable call counters by default

Definition at line 200 of file sip.h.

Referenced by reload_config().

#define DEFAULT_CALLERID   "asterisk"

Default caller ID

Definition at line 195 of file sip.h.

Referenced by reload_config().

#define DEFAULT_COMPACTHEADERS   FALSE

Send compact (one-character) SIP headers. Default off

Definition at line 202 of file sip.h.

Referenced by reload_config().

#define DEFAULT_CONTEXT   "default"

The default context for [general] section as well as devices

Definition at line 190 of file sip.h.

#define DEFAULT_COS_AUDIO   5

Level 2 class of service for audio media

Definition at line 208 of file sip.h.

Referenced by reload_config().

#define DEFAULT_COS_SIP   4

Level 2 class of service for SIP signalling

Definition at line 207 of file sip.h.

Referenced by reload_config().

#define DEFAULT_COS_TEXT   5

Level 2 class of service for text media (T.140)

Definition at line 210 of file sip.h.

Referenced by reload_config().

#define DEFAULT_COS_VIDEO   6

Level 2 class of service for video media

Definition at line 209 of file sip.h.

Referenced by reload_config().

#define DEFAULT_DEFAULT_EXPIRY   120

Definition at line 62 of file sip.h.

Referenced by reload_config().

#define DEFAULT_DOMAINSASREALM   FALSE

Use the domain option to guess the realm for registration and invite requests

Definition at line 213 of file sip.h.

Referenced by reload_config().

#define DEFAULT_ENGINE   "asterisk"

Default RTP engine to use for sessions

Definition at line 235 of file sip.h.

Referenced by reload_config().

#define DEFAULT_EXPIRY   900

Expire slowly

Definition at line 83 of file sip.h.

#define DEFAULT_FREQ_NOTOK   10 * 1000

Qualification: How often to check, if the host is down...

Definition at line 93 of file sip.h.

#define DEFAULT_KEEPALIVE   0

Don't send keep alive packets

Definition at line 220 of file sip.h.

Referenced by reload_config().

#define DEFAULT_KEEPALIVE_INTERVAL   60

Send keep alive packets at 60 second intervals

Definition at line 221 of file sip.h.

Referenced by ast_sip_get_keep_alive_interval(), ast_sip_initialize_sorcery_global(), build_peer(), and reload_config().

#define DEFAULT_LEGACY_USEROPTION_PARSING   FALSE

Definition at line 227 of file sip.h.

Referenced by reload_config().

#define DEFAULT_MATCHEXTERNADDRLOCALLY   FALSE

Match extern IP locally default setting

Definition at line 218 of file sip.h.

Referenced by reload_config().

#define DEFAULT_MAX_CALL_BITRATE   (384)

Max bitrate for video

Definition at line 230 of file sip.h.

Referenced by reload_config().

#define DEFAULT_MAX_EXPIRY   3600

Definition at line 64 of file sip.h.

Referenced by reload_config().

#define DEFAULT_MAX_FORWARDS   70

Definition at line 67 of file sip.h.

Referenced by ast_sip_initialize_sorcery_global(), and reload_config().

#define DEFAULT_MAX_SE   1800

Session-Timer Default Session-Expires period (RFC 4028)

Definition at line 112 of file sip.h.

Referenced by reload_config().

#define DEFAULT_MAXMS   2000

Qualification: Must be faster than 2 seconds by default

Definition at line 91 of file sip.h.

#define DEFAULT_MIN_EXPIRY   60

Definition at line 63 of file sip.h.

Referenced by reload_config().

#define DEFAULT_MIN_SE   90

Session-Timer Default Min-SE period (RFC 4028)

Definition at line 113 of file sip.h.

Referenced by build_peer(), reload_config(), and transmit_invite().

#define DEFAULT_MOHINTERPRET   "default"

The default music class

Definition at line 192 of file sip.h.

Referenced by reload_config().

#define DEFAULT_MOHSUGGEST   ""

Definition at line 193 of file sip.h.

Referenced by reload_config().

#define DEFAULT_MWI_EXPIRY   3600

Definition at line 65 of file sip.h.

Referenced by reload_config().

#define DEFAULT_MWI_FROM   ""

Definition at line 196 of file sip.h.

Referenced by reload_config().

#define DEFAULT_NOTIFYCID   DISABLED

Include CID with ringing notifications

Definition at line 215 of file sip.h.

Referenced by reload_config().

#define DEFAULT_NOTIFYMIME   "application/simple-message-summary"

Definition at line 197 of file sip.h.

Referenced by reload_config().

#define DEFAULT_NOTIFYRINGING   TRUE

Notify devicestate system on ringing state

Definition at line 214 of file sip.h.

Referenced by reload_config().

#define DEFAULT_PEDANTIC   TRUE

Follow SIP standards for dialog matching

Definition at line 216 of file sip.h.

Referenced by reload_config().

#define DEFAULT_QUALIFY   FALSE

Don't monitor devices

Definition at line 219 of file sip.h.

Referenced by reload_config().

#define DEFAULT_QUALIFY_GAP   100

Definition at line 85 of file sip.h.

Referenced by reload_config().

#define DEFAULT_QUALIFY_PEERS   1

Definition at line 86 of file sip.h.

Referenced by reload_config().

#define DEFAULT_QUALIFYFREQ   60 * 1000

Qualification: How often to check for the host to be up

Definition at line 92 of file sip.h.

Referenced by reload_config().

#define DEFAULT_REALM   "asterisk"

Realm for HTTP digest authentication

Definition at line 212 of file sip.h.

Referenced by manager_set_defaults(), and reload_config().

#define DEFAULT_RECORD_FEATURE   "automon"

The default feature specified for use with INFO

Definition at line 191 of file sip.h.

Referenced by reload_config().

#define DEFAULT_REGEXTENONQUALIFY   FALSE

Definition at line 226 of file sip.h.

Referenced by reload_config().

#define DEFAULT_REGISTRATION_TIMEOUT   20

Definition at line 66 of file sip.h.

Referenced by reload_config().

#define DEFAULT_RETRANS   1000

How frequently to retransmit Default: 2 * 500 ms in RFC 3261

Definition at line 95 of file sip.h.

#define DEFAULT_RTPKEEPALIVE   0

Default RTPkeepalive setting

Definition at line 199 of file sip.h.

Referenced by reload_config().

#define DEFAULT_SDPOWNER   "root"

Default SDP username field in (o=) header unless re-defined in sip.conf

Definition at line 234 of file sip.h.

Referenced by reload_config().

#define DEFAULT_SDPSESSION   "Asterisk PBX"

Default SDP session name, (s=) header unless re-defined in sip.conf

Definition at line 233 of file sip.h.

Referenced by reload_config().

#define DEFAULT_SEND_DIVERSION   TRUE

Definition at line 228 of file sip.h.

Referenced by reload_config().

#define DEFAULT_SRVLOOKUP   TRUE

Recommended setting is ON

Definition at line 201 of file sip.h.

Referenced by reload_config().

#define DEFAULT_STORE_SIP_CAUSE   FALSE

Don't store HASH(SIP_CAUSE,<channel name>) for channels by default

Definition at line 236 of file sip.h.

Referenced by reload_config().

#define DEFAULT_T1MIN   100

100 MS for minimal roundtrip time

Definition at line 229 of file sip.h.

Referenced by reload_config().

#define DEFAULT_TIMER_T1   500

SIP timer T1 (according to RFC 3261)

Definition at line 96 of file sip.h.

Referenced by __sip_reliable_xmit(), ast_sip_initialize_system(), and reload_config().

#define DEFAULT_TOS_AUDIO   0

Audio packets should be marked as DSCP EF (Expedited Forwarding), but the default is 0 to be compatible with previous versions.

Definition at line 204 of file sip.h.

Referenced by reload_config().

#define DEFAULT_TOS_SIP   0

Call signalling packets should be marked as DSCP CS3, but the default is 0 to be compatible with previous versions.

Definition at line 203 of file sip.h.

Referenced by reload_config().

#define DEFAULT_TOS_TEXT   0

Text packets should be marked as XXXX XXXX, but the default is 0 to be compatible with previous versions.

Definition at line 206 of file sip.h.

Referenced by reload_config().

#define DEFAULT_TOS_VIDEO   0

Video packets should be marked as DSCP AF41, but the default is 0 to be compatible with previous versions.

Definition at line 205 of file sip.h.

Referenced by reload_config().

#define DEFAULT_TRANS_TIMEOUT   -1

#define DEFAULT_USERAGENT   "Asterisk PBX"

Default Useragent: header unless re-defined in sip.conf

Definition at line 232 of file sip.h.

Referenced by reload_config().

#define DEFAULT_VMEXTEN   "asterisk"

Default voicemail extension

Definition at line 194 of file sip.h.

Referenced by reload_config().

#define EXPIRY_GUARD_LIMIT   30

Below here, we use EXPIRY_GUARD_PCT instead of EXPIRY_GUARD_SECS

Definition at line 75 of file sip.h.

Referenced by handle_response_register().

#define EXPIRY_GUARD_MIN   500

This is the minimum guard time applied. If GUARD_PCT turns out to be lower than this, it will use this time instead. This is in milliseconds.

Definition at line 76 of file sip.h.

Referenced by handle_response_register().

#define EXPIRY_GUARD_PCT   0.20

Percentage of expires timeout to use when below EXPIRY_GUARD_LIMIT

Definition at line 81 of file sip.h.

Referenced by handle_response_register().

#define EXPIRY_GUARD_SECS   15

How long before expiry do we reregister

Definition at line 74 of file sip.h.

Referenced by handle_response_register().

#define FALSE   0

Definition at line 44 of file sip.h.

#define FINDALLDEVICES   (FINDUSERS | FINDPEERS)

Definition at line 54 of file sip.h.

Referenced by check_peer_ok(), find_by_name(), mwi_event_cb(), sip_devicestate(), and sip_find_peer_full().

#define FINDPEERS   (1 << 1)

#define FINDUSERS   (1 << 0)

Definition at line 52 of file sip.h.

Referenced by check_peer_ok(), find_by_name(), realtime_peer(), sip_find_peer_full(), and sip_show_user().

#define FROMDOMAIN_INVALID   "anonymous.invalid"

Definition at line 89 of file sip.h.

Referenced by initreqprep().

#define INC_CALL_LIMIT   1

Definition at line 121 of file sip.h.

Referenced by handle_request_invite(), and update_call_counter().

#define INC_CALL_RINGING   3

Definition at line 123 of file sip.h.

Referenced by sip_call(), and update_call_counter().

#define INITIAL_CSEQ   101

Our initial sip sequence number

Definition at line 110 of file sip.h.

Referenced by __sip_alloc(), AST_TEST_DEFINE(), sip_parse_register_line(), and transmit_response_using_temp().

#define MAX_AUTHTRIES   3

Try authentication three times, then fail

Definition at line 102 of file sip.h.

Referenced by do_message_auth(), handle_response(), handle_response_invite(), handle_response_publish(), handle_response_register(), and handle_response_update().

#define MAX_HISTORY_ENTRIES   50

Max entires in the history list for a sip_pvt

Definition at line 108 of file sip.h.

Referenced by append_history_va().

#define NO_RTP   0

Definition at line 118 of file sip.h.

#define NOT_SUPPORTED   0

Definition at line 136 of file sip.h.

#define OFFERED_MEDIA_COUNT   4

The number of media types in enum media_type below.

Definition at line 476 of file sip.h.

#define PROVIS_KEEPALIVE_TIMEOUT   60000

How long to wait before retransmitting a provisional response (rfc 3261 13.3.1.1)

Definition at line 101 of file sip.h.

Referenced by send_provisional_keepalive_full(), and update_provisional_keepalive().

#define REQ_OFFSET_TO_STR ( req,
offset   )     (ast_str_buffer((req)->data) + ((req)->offset))

#define RTP   1

Definition at line 117 of file sip.h.

#define SDP_MAX_RTPMAP_CODECS   32

Maximum number of codecs allowed in received SDP

Definition at line 115 of file sip.h.

Referenced by process_sdp_a_audio(), process_sdp_a_text(), and process_sdp_a_video().

#define SIP_CALL_LIMIT   (1 << 7)

D: Call limit enforced for this call

Definition at line 257 of file sip.h.

Referenced by check_peer_ok(), create_addr_from_peer(), and update_call_counter().

#define SIP_DEFER_BYE_ON_TRANSFER   (1 << 10)

D: Do not hangup at first ast_hangup

Definition at line 260 of file sip.h.

Referenced by handle_request_refer(), local_attended_transfer(), sip_hangup(), and sip_set_rtp_peer().

#define SIP_DIRECT_MEDIA   (1 << 20)

DP: allow peers to be reinvited to send media directly p2p

Definition at line 282 of file sip.h.

Referenced by _sip_show_peer(), handle_common_options(), handle_incoming(), reload_config(), sip_allow_anyrtp_remote(), sip_get_rtp_peer(), sip_get_trtp_peer(), and sip_get_vrtp_peer().

#define SIP_DIRECT_MEDIA_NAT   (2 << 20)

DP: allow media reinvite when new peer is behind NAT

Definition at line 283 of file sip.h.

Referenced by handle_common_options(), sip_get_rtp_peer(), and sip_set_rtp_peer().

#define SIP_DTMF   (7 << 15)

#define SIP_DTMF_AUTO   (3 << 15)

DP: DTMF Support: AUTO switch between rfc2833 and in-band DTMF

Definition at line 272 of file sip.h.

Referenced by __sip_alloc(), check_peer_ok(), create_addr_from_peer(), enable_dsp_detect(), handle_common_options(), process_sdp(), sip_dtmfmode(), sip_new(), and sip_setoption().

#define SIP_DTMF_INBAND   (1 << 15)

DP: DTMF Support: Inband audio, only for ULAW/ALAW - "inband"

Definition at line 270 of file sip.h.

Referenced by enable_dsp_detect(), handle_common_options(), process_sdp(), sip_dtmfmode(), sip_new(), sip_rtp_read(), sip_senddigit_begin(), sip_senddigit_end(), and sip_setoption().

#define SIP_DTMF_INFO   (2 << 15)

DP: DTMF Support: SIP Info messages - "info"

Definition at line 271 of file sip.h.

Referenced by handle_common_options(), sip_dtmfmode(), sip_new(), and sip_senddigit_end().

#define SIP_DTMF_RFC2833   (0 << 15)

#define SIP_DTMF_SHORTINFO   (4 << 15)

DP: DTMF Support: SIP Info messages - "info" - short variant

Definition at line 273 of file sip.h.

Referenced by handle_common_options(), sip_dtmfmode(), sip_new(), sip_senddigit_end(), and transmit_info_with_digit().

#define SIP_FLAGS_TO_COPY

#define SIP_G726_NONSTANDARD   (1 << 31)

DP: Use non-standard packing for G726-32 data

Definition at line 303 of file sip.h.

Referenced by add_codec_to_sdp(), handle_common_options(), and process_sdp_a_audio().

#define SIP_GOTREFER   (1 << 6)

D: Got a refer?

Definition at line 256 of file sip.h.

Referenced by handle_request_refer(), local_attended_transfer(), and sip_set_rtp_peer().

#define SIP_INC_COUNT   (1 << 8)

D: Did this dialog increment the counter of in-use calls?

Definition at line 258 of file sip.h.

Referenced by __sip_destroy(), handle_request_cancel(), sip_hangup(), and update_call_counter().

#define SIP_INC_RINGING   (1 << 9)

D: Did this connection increment the counter of in-use calls?

Definition at line 259 of file sip.h.

Referenced by update_call_counter().

#define SIP_INSECURE   (3 << 23)

DP: three settings, uses two bits

Definition at line 287 of file sip.h.

Referenced by _sip_show_peer(), handle_common_options(), load_module(), and sip_reload().

#define SIP_INSECURE_INVITE   (1 << 24)

DP: don't require authentication for incoming INVITEs

Definition at line 290 of file sip.h.

Referenced by check_peer_ok(), and set_insecure_flags().

#define SIP_INSECURE_NONE   (0 << 23)

DP: secure mode

Definition at line 288 of file sip.h.

#define SIP_INSECURE_PORT   (1 << 23)

DP: don't require matching port for incoming requests

Definition at line 289 of file sip.h.

Referenced by get_insecure_variable_from_config(), get_insecure_variable_from_sipregs(), peer_ipcmp_cb_full(), set_insecure_flags(), and sip_find_peer_full().

#define SIP_MAX_HEADERS   64

Max amount of SIP headers to read

Definition at line 104 of file sip.h.

Referenced by add_header(), and parse_request().

#define SIP_MAX_LINES   256

Max amount of lines in SIP attachment (like SDP)

Definition at line 105 of file sip.h.

Referenced by parse_request().

#define SIP_MAX_PACKET_SIZE   20480

Max SIP packet size

Definition at line 106 of file sip.h.

Referenced by sip_tcptls_read().

#define SIP_MIN_PACKET   4096

Initialize size of memory to allocate for packets

Definition at line 107 of file sip.h.

Referenced by _sip_tcp_helper_thread(), init_req(), init_resp(), and sipsock_read().

#define SIP_NAT_FORCE_RPORT   (1 << 18)

#define SIP_NAT_RPORT_PRESENT   (1 << 19)

DP: rport was present in the request

Definition at line 277 of file sip.h.

Referenced by build_via(), check_user_full(), check_via(), copy_via_headers(), parse_register_contact(), and sip_real_dst().

#define SIP_NEEDREINVITE   (1 << 4)

D: Do we need to send another reinvite?

Definition at line 254 of file sip.h.

Referenced by check_pendings(), interpret_t38_parameters(), sip_hangup(), sip_reinvite_retry(), sip_sendhtml(), sip_set_rtp_peer(), and update_connectedline().

#define SIP_OFFER_CC   (1 << 1)

D: Offer CC on subsequent responses

Definition at line 251 of file sip.h.

Referenced by __transmit_response(), sip_cc_agent_init(), and transmit_response_with_sdp().

#define SIP_OPT_100REL   (1 << 1)

Definition at line 140 of file sip.h.

#define SIP_OPT_EARLY_SESSION   (1 << 3)

Definition at line 142 of file sip.h.

#define SIP_OPT_EVENTLIST   (1 << 11)

Definition at line 150 of file sip.h.

#define SIP_OPT_FROMCHANGE   (1 << 17)

Definition at line 156 of file sip.h.

#define SIP_OPT_GRUU   (1 << 12)

Definition at line 151 of file sip.h.

#define SIP_OPT_HISTINFO   (1 << 15)

Definition at line 154 of file sip.h.

#define SIP_OPT_JOIN   (1 << 4)

Definition at line 143 of file sip.h.

#define SIP_OPT_NOREFERSUB   (1 << 14)

Definition at line 153 of file sip.h.

#define SIP_OPT_OUTBOUND   (1 << 20)

Definition at line 159 of file sip.h.

#define SIP_OPT_PATH   (1 << 5)

Definition at line 144 of file sip.h.

#define SIP_OPT_PRECONDITION   (1 << 7)

Definition at line 146 of file sip.h.

#define SIP_OPT_PREF   (1 << 6)

Definition at line 145 of file sip.h.

#define SIP_OPT_PRIVACY   (1 << 8)

Definition at line 147 of file sip.h.

#define SIP_OPT_RECLISTINV   (1 << 18)

Definition at line 157 of file sip.h.

#define SIP_OPT_RECLISTSUB   (1 << 19)

Definition at line 158 of file sip.h.

#define SIP_OPT_REPLACES   (1 << 0)

Definition at line 139 of file sip.h.

Referenced by AST_TEST_DEFINE().

#define SIP_OPT_RESPRIORITY   (1 << 16)

Definition at line 155 of file sip.h.

#define SIP_OPT_SDP_ANAT   (1 << 9)

Definition at line 148 of file sip.h.

#define SIP_OPT_SEC_AGREE   (1 << 10)

Definition at line 149 of file sip.h.

#define SIP_OPT_TARGET_DIALOG   (1 << 13)

Definition at line 152 of file sip.h.

#define SIP_OPT_TIMER   (1 << 2)

Definition at line 141 of file sip.h.

Referenced by AST_TEST_DEFINE(), handle_request_invite_st(), and respprep().

#define SIP_OPT_UNKNOWN   (1 << 21)

Definition at line 160 of file sip.h.

Referenced by AST_TEST_DEFINE(), and parse_sip_options().

#define SIP_OUTGOING   (1 << 0)

#define SIP_PAGE2_ALLOWOVERLAP   (3 << 13)

#define SIP_PAGE2_ALLOWOVERLAP_DTMF   (2 << 13)

Yes, using the DTMF transmission through Early Media

Definition at line 333 of file sip.h.

Referenced by handle_common_options(), and sip_indicate().

#define SIP_PAGE2_ALLOWOVERLAP_NO   (0 << 13)

No, terminate with 404 Not found

Definition at line 331 of file sip.h.

#define SIP_PAGE2_ALLOWOVERLAP_SPARE   (3 << 13)

Spare (reserved for another dialling transmission mechanisms like KPML)

Definition at line 334 of file sip.h.

#define SIP_PAGE2_ALLOWOVERLAP_YES   (1 << 13)

Yes, using the 484 Address Incomplete response

Definition at line 332 of file sip.h.

Referenced by handle_common_options(), handle_request_invite(), handle_response(), reload_config(), and sip_indicate().

#define SIP_PAGE2_ALLOWSUBSCRIBE   (1 << 12)

GP: Allow subscriptions from this peer?

Definition at line 328 of file sip.h.

Referenced by _sip_show_peer(), build_peer(), handle_common_options(), handle_request_subscribe(), reload_config(), and sip_show_settings().

#define SIP_PAGE2_BUGGY_MWI   (1 << 22)

DP: Buggy CISCO MWI fix

Definition at line 350 of file sip.h.

Referenced by handle_common_options(), and transmit_notify_with_mwi().

#define SIP_PAGE2_CALL_ONHOLD   (3 << 19)

#define SIP_PAGE2_CALL_ONHOLD_ACTIVE   (1 << 19)

D: Active hold

Definition at line 345 of file sip.h.

Referenced by change_hold_state().

#define SIP_PAGE2_CALL_ONHOLD_INACTIVE   (3 << 19)

D: Inactive hold

Definition at line 347 of file sip.h.

Referenced by add_sdp(), and change_hold_state().

#define SIP_PAGE2_CALL_ONHOLD_ONEDIR   (2 << 19)

D: One directional hold

Definition at line 346 of file sip.h.

Referenced by add_sdp(), and change_hold_state().

#define SIP_PAGE2_CONNECTLINEUPDATE_PEND   (1 << 6)

Definition at line 322 of file sip.h.

Referenced by __transmit_response(), and update_connectedline().

#define SIP_PAGE2_DIALOG_ESTABLISHED   (1 << 23)

#define SIP_PAGE2_FAX_DETECT   (3 << 24)

DP: Fax Detection support

Definition at line 353 of file sip.h.

Referenced by handle_common_options(), and reload_config().

#define SIP_PAGE2_FAX_DETECT_BOTH   (3 << 24)

DP: Fax Detection support - detect both

Definition at line 356 of file sip.h.

Referenced by handle_common_options().

#define SIP_PAGE2_FAX_DETECT_CNG   (1 << 24)

DP: Fax Detection support - detect CNG in audio

Definition at line 354 of file sip.h.

Referenced by enable_dsp_detect(), handle_common_options(), and sip_read().

#define SIP_PAGE2_FAX_DETECT_T38   (2 << 24)

DP: Fax Detection support - detect T.38 reinvite from peer

Definition at line 355 of file sip.h.

Referenced by handle_common_options(), process_sdp(), and sip_call().

#define SIP_PAGE2_FLAGS_TO_COPY

#define SIP_PAGE2_HAVEPEERCONTEXT   (1 << 28)

Definition at line 360 of file sip.h.

Referenced by build_peer(), and get_destination().

#define SIP_PAGE2_IGNORESDPVERSION   (1 << 16)

GDP: Ignore the SDP session version number we receive and treat all sessions as new

Definition at line 337 of file sip.h.

Referenced by _sip_show_peer(), handle_common_options(), process_sdp_o(), reload_config(), and sip_show_settings().

#define SIP_PAGE2_PREFERRED_CODEC   (1 << 9)

GDP: Only respond with single most preferred joint codec

Definition at line 325 of file sip.h.

Referenced by build_peer(), process_sdp(), and reload_config().

#define SIP_PAGE2_Q850_REASON   (1 << 3)

DP: Get/send cause code via Reason header

Definition at line 319 of file sip.h.

Referenced by __transmit_response(), _sip_show_peer(), build_peer(), handle_response(), reload_config(), sip_show_settings(), and transmit_request_with_auth().

#define SIP_PAGE2_RFC2833_COMPENSATE   (1 << 21)

DP: Compensate for buggy RFC2833 implementations

Definition at line 349 of file sip.h.

Referenced by create_addr_from_peer(), dialog_initialize_rtp(), handle_common_options(), handle_request_invite(), process_sdp(), and sip_show_settings().

#define SIP_PAGE2_RPID_IMMEDIATE   (1 << 7)

Definition at line 323 of file sip.h.

Referenced by handle_common_options(), and update_connectedline().

#define SIP_PAGE2_RPID_UPDATE   (1 << 2)

Definition at line 318 of file sip.h.

Referenced by handle_common_options(), and set_pvt_allowed_methods().

#define SIP_PAGE2_RPORT_PRESENT   (1 << 8)

Was rport received in the Via header?

Definition at line 324 of file sip.h.

Referenced by check_user_full(), and check_via().

#define SIP_PAGE2_RTAUTOCLEAR   (1 << 1)

GP: Should we clean memory from peers after expiry?

Definition at line 317 of file sip.h.

Referenced by expire_register(), realtime_peer(), reload_config(), and sip_show_settings().

#define SIP_PAGE2_RTCACHEFRIENDS   (1 << 0)

GP: Should we keep RT objects in memory for extended time?

Definition at line 316 of file sip.h.

Referenced by build_peer(), parse_register_contact(), realtime_peer(), reload_config(), sip_destroy_peer(), sip_prune_realtime(), sip_show_settings(), and update_peer().

#define SIP_PAGE2_STATECHANGEQUEUE   (1 << 5)

D: Unsent state pending change exists

Definition at line 321 of file sip.h.

Referenced by extensionstate_update(), and handle_response_notify().

#define SIP_PAGE2_SUBSCRIBEMWIONLY   (1 << 15)

GP: Only issue MWI notification if subscribed to

Definition at line 336 of file sip.h.

Referenced by build_peer(), handle_request_subscribe(), and sip_send_mwi_to_peer().

#define SIP_PAGE2_SYMMETRICRTP   (1 << 4)

#define SIP_PAGE2_T38SUPPORT   (3 << 17)

#define SIP_PAGE2_T38SUPPORT_UDPTL   (1 << 17)

GDP: T.38 Fax Support (no error correction)

Definition at line 340 of file sip.h.

Referenced by handle_t38_options(), and set_t38_capabilities().

#define SIP_PAGE2_T38SUPPORT_UDPTL_FEC   (2 << 17)

GDP: T.38 Fax Support (FEC error correction)

Definition at line 341 of file sip.h.

Referenced by handle_t38_options(), and set_t38_capabilities().

#define SIP_PAGE2_T38SUPPORT_UDPTL_REDUNDANCY   (3 << 17)

GDP: T.38 Fax Support (redundancy error correction)

Definition at line 342 of file sip.h.

Referenced by handle_t38_options(), and set_t38_capabilities().

#define SIP_PAGE2_TEXTSUPPORT   (1 << 11)

GDP: Global text enable

Definition at line 327 of file sip.h.

Referenced by _sip_show_peer(), _sip_show_peers_one(), dialog_initialize_rtp(), handle_common_options(), reload_config(), and sip_show_settings().

#define SIP_PAGE2_TRUST_ID_OUTBOUND   (3 << 30)

DP: Do we trust the peer with private presence information?

Definition at line 363 of file sip.h.

Referenced by _sip_show_peer(), add_rpid(), and handle_common_options().

#define SIP_PAGE2_TRUST_ID_OUTBOUND_LEGACY   (0 << 30)

Legacy, Do not provide private presence information, but include PAI/RPID when private

Definition at line 364 of file sip.h.

Referenced by add_rpid(), and handle_common_options().

#define SIP_PAGE2_TRUST_ID_OUTBOUND_NO   (1 << 30)

No, Do not provide private presence information, do not include PAI/RPID when private

Definition at line 365 of file sip.h.

Referenced by add_rpid(), and handle_common_options().

#define SIP_PAGE2_TRUST_ID_OUTBOUND_YES   (2 << 30)

Yes, provide private presence information in PAI/RPID headers

Definition at line 366 of file sip.h.

Referenced by add_rpid(), and handle_common_options().

#define SIP_PAGE2_UDPTL_DESTINATION   (1 << 26)

DP: Use source IP of RTP as destination if NAT is enabled

Definition at line 358 of file sip.h.

Referenced by handle_t38_options(), and process_sdp().

#define SIP_PAGE2_USE_SRTP   (1 << 29)

DP: Whether we should offer (only) SRTP

Definition at line 361 of file sip.h.

Referenced by _sip_show_peer(), build_peer(), function_sippeer(), process_sdp(), sip_call(), sip_queryoption(), and sip_setoption().

#define SIP_PAGE2_VIDEOSUPPORT   (1 << 10)

DP: Video supported if offered?

Definition at line 326 of file sip.h.

Referenced by _sip_show_peer(), _sip_show_peers_one(), dialog_initialize_rtp(), handle_common_options(), reload_config(), sip_new(), and sip_show_settings().

#define SIP_PAGE2_VIDEOSUPPORT_ALWAYS   (1 << 27)

DP: Always set up video, even if endpoints don't support it

Definition at line 359 of file sip.h.

Referenced by _sip_show_peer(), dialog_initialize_rtp(), handle_common_options(), and reload_config().

#define SIP_PAGE3_DIRECT_MEDIA_OUTGOING   (1 << 4)

DP: Only send direct media reinvites on outgoing calls

Definition at line 381 of file sip.h.

Referenced by handle_common_options(), and sip_set_rtp_peer().

#define SIP_PAGE3_DISCARD_REMOTE_HOLD_RETRIEVAL   (1 << 8)

DGP: Stop telling the peer to start music on hold

Definition at line 385 of file sip.h.

Referenced by build_peer(), process_sdp(), and reload_config().

#define SIP_PAGE3_FLAGS_TO_COPY

#define SIP_PAGE3_FORCE_AVP   (1 << 9)

DGP: Force 'RTP/AVP' for all streams, even DTLS

Definition at line 386 of file sip.h.

Referenced by add_sdp(), and build_peer().

#define SIP_PAGE3_ICE_SUPPORT   (1 << 6)

DGP: Enable ICE support

Definition at line 383 of file sip.h.

Referenced by add_sdp(), build_peer(), dialog_initialize_rtp(), and reload_config().

#define SIP_PAGE3_IGNORE_PREFCAPS   (1 << 7)

DP: Ignore prefcaps when setting up an outgoing call leg

Definition at line 384 of file sip.h.

Referenced by add_sdp(), and build_peer().

#define SIP_PAGE3_NAT_AUTO_COMEDIA   (1 << 3)

DGP: Set SIP_PAGE2_SYMMETRICRTP when NAT is detected

Definition at line 380 of file sip.h.

Referenced by _sip_show_peer(), _sip_show_peers_one(), check_for_nat(), comedia_string(), match_nat_options(), set_peer_nat(), and sip_parse_nat_option().

#define SIP_PAGE3_NAT_AUTO_RPORT   (1 << 2)

#define SIP_PAGE3_SNOM_AOC   (1 << 0)

DPG: Allow snom aoc messages

Definition at line 377 of file sip.h.

Referenced by build_peer(), reload_config(), and sip_indicate().

#define SIP_PAGE3_SRTP_TAG_32   (1 << 1)

DP: Use a 32bit auth tag in INVITE not 80bit

Definition at line 378 of file sip.h.

Referenced by add_sdp(), and build_peer().

#define SIP_PAGE3_USE_AVPF   (1 << 5)

DGP: Support a minimal AVPF-compatible profile

Definition at line 382 of file sip.h.

Referenced by add_sdp(), build_peer(), and process_sdp().

#define SIP_PENDINGBYE   (1 << 5)

D: Need to send bye after we ack?

Definition at line 255 of file sip.h.

Referenced by check_pendings(), handle_response_invite(), interpret_t38_parameters(), register_verify(), sip_hangup(), sip_sendhtml(), and sip_set_rtp_peer().

#define SIP_PROG_INBAND   (3 << 25)

DP: three settings, uses two bits

Definition at line 293 of file sip.h.

Referenced by handle_common_options(), sip_indicate(), and sip_show_settings().

#define SIP_PROG_INBAND_NEVER   (1 << 25)

Definition at line 295 of file sip.h.

Referenced by handle_common_options(), sip_indicate(), and sip_show_settings().

#define SIP_PROG_INBAND_NO   (0 << 25)

Definition at line 294 of file sip.h.

Referenced by sip_show_settings().

#define SIP_PROG_INBAND_YES   (2 << 25)

Definition at line 296 of file sip.h.

Referenced by handle_common_options(), and sip_indicate().

#define SIP_PROGRESS_SENT   (1 << 3)

D: Have sent 183 message progress

Definition at line 253 of file sip.h.

Referenced by handle_response_invite(), sip_answer(), sip_indicate(), sip_write(), and update_connectedline().

#define SIP_PROMISCREDIR   (1 << 11)

DP: Promiscuous redirection

Definition at line 262 of file sip.h.

Referenced by _sip_show_peer(), handle_common_options(), parse_moved_contact(), sip_show_channel(), and sip_show_settings().

#define sip_ref_peer ( peer,
tag   )     ao2_t_bump(peer, tag)

#define SIP_REINVITE   (7 << 20)

DP: four settings, uses three bits

Definition at line 280 of file sip.h.

Referenced by handle_common_options(), and sip_call().

#define SIP_REINVITE_NONE   (0 << 20)

DP: no reinvite allowed

Definition at line 281 of file sip.h.

#define SIP_REINVITE_UPDATE   (4 << 20)

DP: use UPDATE (RFC3311) when reinviting this peer

Definition at line 284 of file sip.h.

Referenced by handle_common_options(), transmit_reinvite_with_sdp(), and update_connectedline().

#define SIP_RESERVED   ";/?:@&=+$,# "

Reserved characters in the username part of the URI

Definition at line 60 of file sip.h.

#define SIP_RINGING   (1 << 2)

D: Have sent 180 ringing

Definition at line 252 of file sip.h.

Referenced by sip_indicate(), and update_connectedline().

#define SIP_SENDRPID   (3 << 29)

#define SIP_SENDRPID_NO   (0 << 29)

Definition at line 300 of file sip.h.

#define SIP_SENDRPID_PAI   (1 << 29)

Use "P-Asserted-Identity" for rpid

Definition at line 301 of file sip.h.

Referenced by add_rpid(), and handle_common_options().

#define SIP_SENDRPID_RPID   (2 << 29)

Use "Remote-Party-ID" for rpid

Definition at line 302 of file sip.h.

Referenced by handle_common_options().

#define SIP_TRANS_TIMEOUT   64 * DEFAULT_TIMER_T1

SIP request timeout (rfc 3261) 64*T1

Todo:
Use known T1 for timeout (peerpoke)

Definition at line 97 of file sip.h.

Referenced by manager_sipnotify(), sip_cli_notify(), and sip_sipredirect().

#define SIP_TRUSTRPID   (1 << 12)

DP: Trust RPID headers?

Definition at line 263 of file sip.h.

Referenced by _sip_show_peer(), get_rpid(), handle_common_options(), and sip_show_settings().

#define sip_unref_peer ( peer,
tag   )     ({ ao2_t_cleanup(peer, tag); (NULL); })

#define SIP_USECLIENTCODE   (1 << 14)

DP: Trust X-ClientCode info message

Definition at line 265 of file sip.h.

Referenced by handle_common_options(), handle_request_info(), and sip_show_settings().

#define SIP_USEPATH   (1 << 27)

GDP: Trust and use incoming Path headers?

Definition at line 298 of file sip.h.

Referenced by _sip_show_peer(), add_supported(), build_path(), handle_common_options(), parse_register_contact(), respprep(), and sip_show_settings().

#define SIP_USEREQPHONE   (1 << 13)

DP: Add user=phone to numeric URI. Default off

Definition at line 264 of file sip.h.

Referenced by _sip_show_peer(), build_peer(), initreqprep(), reload_config(), and sip_show_settings().

#define SIPBUFSIZE   512

#define STANDARD_SIP_PORT   5060

#define STANDARD_TLS_PORT   5061

Standard SIP TLS port from RFC 3261. DO NOT CHANGE THIS.

Definition at line 171 of file sip.h.

Referenced by __set_address_from_contact(), AST_TEST_DEFINE(), build_peer(), default_sip_port(), reload_config(), set_destination(), sip_parse_host(), sip_parse_register_line(), and sip_standard_port().

#define SUPPORTED   1

Define SIP option tags, used in Require: and Supported: headers We need to be aware of these properties in the phones to use the replace: header. We should not do that without knowing that the other end supports it... This is nothing we can configure, we learn by the dialog Supported: header on the REGISTER (peer) or the INVITE (other devices) We are not using many of these today, but will in the future. This is documented in RFC 3261

Definition at line 135 of file sip.h.

Referenced by parse_sip_options().

#define TRUE   1

Definition at line 48 of file sip.h.

#define XMIT_ERROR   -2


Typedef Documentation

typedef int(* const esc_publish_callback)(struct sip_pvt *, struct sip_request *, struct event_state_compositor *, struct sip_esc_entry *)

Definition at line 1739 of file sip.h.


Enumeration Type Documentation

Automatic peer registration behavior.

Enumerator:
AUTOPEERS_DISABLED  Automatic peer creation disabled
AUTOPEERS_VOLATILE  Automatic peers dropped on sip reload (pre-1.8 behavior)
AUTOPEERS_PERSIST  Automatic peers survive sip configuration reload

Definition at line 583 of file sip.h.

00583                          {
00584    AUTOPEERS_DISABLED = 0,    /*!< Automatic peer creation disabled */
00585    AUTOPEERS_VOLATILE,        /*!< Automatic peers dropped on sip reload (pre-1.8 behavior) */
00586    AUTOPEERS_PERSIST       /*!< Automatic peers survive sip configuration reload */
00587 };

States whether a SIP message can create a dialog in Asterisk.

Enumerator:
CAN_NOT_CREATE_DIALOG 
CAN_CREATE_DIALOG 
CAN_CREATE_DIALOG_UNSUPPORTED_METHOD 

Definition at line 590 of file sip.h.

Authentication result from check_auth* functions.

Enumerator:
AUTH_DONT_KNOW  no result, need to check further
AUTH_SUCCESSFUL 
AUTH_CHALLENGE_SENT 
AUTH_SECRET_FAILED 
AUTH_USERNAME_MISMATCH 
AUTH_NOT_FOUND  returned by register_verify
AUTH_UNKNOWN_DOMAIN 
AUTH_PEER_NOT_DYNAMIC 
AUTH_ACL_FAILED 
AUTH_BAD_TRANSPORT 
AUTH_RTP_FAILED 
AUTH_SESSION_LIMIT 

Definition at line 509 of file sip.h.

00509                        {
00510    AUTH_DONT_KNOW = -100,  /*!< no result, need to check further */
00511       /* XXX maybe this is the same as AUTH_NOT_FOUND */
00512    AUTH_SUCCESSFUL = 0,
00513    AUTH_CHALLENGE_SENT = 1,
00514    AUTH_SECRET_FAILED = -1,
00515    AUTH_USERNAME_MISMATCH = -2,
00516    AUTH_NOT_FOUND = -3, /*!< returned by register_verify */
00517    AUTH_UNKNOWN_DOMAIN = -5,
00518    AUTH_PEER_NOT_DYNAMIC = -6,
00519    AUTH_ACL_FAILED = -7,
00520    AUTH_BAD_TRANSPORT = -8,
00521    AUTH_RTP_FAILED = -9,
00522    AUTH_SESSION_LIMIT = -10,
00523 };

Enumerator:
K_RESP 
K_URI 
K_USER 
K_NONCE 
K_LAST 

Definition at line 688 of file sip.h.

00688                  {
00689         K_RESP,
00690         K_URI,
00691         K_USER,
00692         K_NONCE,
00693         K_LAST
00694 };

Modes for SIP domain handling in the PBX.

Enumerator:
SIP_DOMAIN_AUTO  This domain is auto-configured
SIP_DOMAIN_CONFIG  This domain is from configuration

Definition at line 633 of file sip.h.

00633                  {
00634    SIP_DOMAIN_AUTO,      /*!< This domain is auto-configured */
00635    SIP_DOMAIN_CONFIG,    /*!< This domain is from configuration */
00636 };

The results from handling an invite request.

Note:
Start at these values so we do not conflict with check_auth_results values when returning from handle_request_invite. check_auth_results only returned during authentication routines
Enumerator:
INV_REQ_SUCCESS  Success code
INV_REQ_FAILED  Failure code
INV_REQ_ERROR  Error code

Definition at line 424 of file sip.h.

00424                     {
00425    INV_REQ_SUCCESS = 11,    /*!< Success code */
00426    INV_REQ_FAILED  = 10,    /*!< Failure code */
00427    INV_REQ_ERROR   = 9,     /*!< Error code */
00428 };

States for the INVITE transaction, not the dialog.

Note:
this is for the INVITE that sets up the dialog
Enumerator:
INV_NONE  No state at all, maybe not an INVITE dialog
INV_CALLING  Invite sent, no answer
INV_PROCEEDING  We got/sent 1xx message
INV_EARLY_MEDIA  We got 18x message with to-tag back
INV_COMPLETED  Got final response with error. Wait for ACK, then CONFIRMED
INV_CONFIRMED  Confirmed response - we've got an ack (Incoming calls only)
INV_TERMINATED  Transaction done - either successful (AST_STATE_UP) or failed, but done The only way out of this is a BYE from one side
INV_CANCELLED  Transaction cancelled by client or server in non-terminated state

Definition at line 433 of file sip.h.

00433                   {
00434    INV_NONE = 0,         /*!< No state at all, maybe not an INVITE dialog */
00435    INV_CALLING = 1,      /*!< Invite sent, no answer */
00436    INV_PROCEEDING = 2,   /*!< We got/sent 1xx message */
00437    INV_EARLY_MEDIA = 3,  /*!< We got 18x message with to-tag back */
00438    INV_COMPLETED = 4,    /*!< Got final response with error. Wait for ACK, then CONFIRMED */
00439    INV_CONFIRMED = 5,    /*!< Confirmed response - we've got an ack (Incoming calls only) */
00440    INV_TERMINATED = 6,   /*!< Transaction done - either successful (AST_STATE_UP) or failed, but done
00441                  The only way out of this is a BYE from one side */
00442    INV_CANCELLED = 7,    /*!< Transaction cancelled by client or server in non-terminated state */
00443 };

enum media_type

Media types generate different "dummy answers" for not accepting the offer of a media stream. We need to add definitions for each RTP profile. Secure RTP is not the same as normal RTP and will require a new definition.

Enumerator:
SDP_AUDIO  RTP/AVP Audio
SDP_VIDEO  RTP/AVP Video
SDP_IMAGE  Image udptl, not TCP or RTP
SDP_TEXT  RTP/AVP Realtime Text
SDP_UNKNOWN  Unknown media type

Definition at line 481 of file sip.h.

00481                 {
00482    SDP_AUDIO,   /*!< RTP/AVP Audio */
00483    SDP_VIDEO,   /*!< RTP/AVP Video */
00484    SDP_IMAGE,   /*!< Image udptl, not TCP or RTP */
00485    SDP_TEXT,    /*!< RTP/AVP Realtime Text */
00486    SDP_UNKNOWN, /*!< Unknown media type */
00487 };

Settings for the 'notifycid' option, see sip.conf.sample for details.

Enumerator:
DISABLED 
ENABLED 
IGNORE_CONTEXT 

Definition at line 626 of file sip.h.

00626                        {
00627    DISABLED       = 0,
00628    ENABLED        = 1,
00629    IGNORE_CONTEXT = 2,
00630 };

Results from the parse_register() function.

Enumerator:
PARSE_REGISTER_DENIED 
PARSE_REGISTER_FAILED 
PARSE_REGISTER_UPDATE 
PARSE_REGISTER_QUERY 

Definition at line 457 of file sip.h.

Parameters to know status of transfer.

Enumerator:
REFER_IDLE  No REFER is in progress
REFER_SENT  Sent REFER to transferee
REFER_RECEIVED  Received REFER from transferrer
REFER_CONFIRMED  Refer confirmed with a 100 TRYING (unused)
REFER_ACCEPTED  Accepted by transferee
REFER_RINGING  Target Ringing
REFER_200OK  Answered by transfer target
REFER_FAILED  REFER declined - go on
REFER_NOAUTH  We had no auth for REFER

Definition at line 660 of file sip.h.

00660                  {
00661    REFER_IDLE,           /*!< No REFER is in progress */
00662    REFER_SENT,           /*!< Sent REFER to transferee */
00663    REFER_RECEIVED,       /*!< Received REFER from transferrer */
00664    REFER_CONFIRMED,      /*!< Refer confirmed with a 100 TRYING (unused) */
00665    REFER_ACCEPTED,       /*!< Accepted by transferee */
00666    REFER_RINGING,        /*!< Target Ringing */
00667    REFER_200OK,          /*!< Answered by transfer target */
00668    REFER_FAILED,         /*!< REFER declined - go on */
00669    REFER_NOAUTH          /*!< We had no auth for REFER */
00670 };

Authentication types - proxy or www authentication.

Note:
Endpoints, like Asterisk, should always use WWW authentication to allow multiple authentications in the same call - to the proxy and to the end point.
Enumerator:
PROXY_AUTH 
WWW_AUTH 

Definition at line 494 of file sip.h.

00494                    {
00495    PROXY_AUTH = 407,
00496    WWW_AUTH = 401,
00497 };

The states that can be represented in a SIP call-completion NOTIFY.

Enumerator:
CC_QUEUED  Queued, i.e. unavailable
CC_READY  Ready, i.e. available

Definition at line 1530 of file sip.h.

01530                          {
01531    /*! Queued, i.e. unavailable */
01532    CC_QUEUED,
01533    /*! Ready, i.e. available */
01534    CC_READY,
01535 };

The states that can be represented in a SIP call-completion PUBLISH.

SIP PUBLISH support! PUBLISH support was added to chan_sip due to its use in the call-completion event package. In order to suspend and unsuspend monitoring of a called party, a PUBLISH message must be sent. Rather than try to hack in PUBLISH transmission and reception solely for the purposes of handling call-completion-related messages, an effort has been made to create a generic framework for handling PUBLISH messages.

There are two main components to the effort, the event publication agent (EPA) and the event state compositor (ESC). Both of these terms appear in RFC 3903, and the implementation in Asterisk conforms to the defintions there. An EPA is a UAC that transmits PUBLISH requests. An ESC is a UAS that receives PUBLISH requests and acts appropriately based on the content of those requests.

ESC: The main structure in chan_sip is the event_state_compositor. There is an event_state_compositor structure for each event package supported (as of Nov 2009 this is only the call-completion package). The structure contains data which is intrinsic to the event package itself, such as the name of the package and a set of callbacks for handling incoming PUBLISH requests. In addition, the event_state_compositor struct contains an ao2_container of sip_esc_entries.

A sip_esc_entry corresponds to an entity which has sent a PUBLISH to Asterisk. We are able to match the incoming PUBLISH to a sip_esc_entry using the Sip-If-Match header of the message. Of course, if none is present, then a new sip_esc_entry will be created.

Once it is determined what type of PUBLISH request has come in (from RFC 3903, it may be an initial, modify, refresh, or remove), then the event package-specific callbacks may be called. If your event package doesn't need to take any specific action for a specific PUBLISH type, it is perfectly safe to not define the callback at all. The callback only needs to take care of application-specific information. If there is a problem, it is up to the callback to take care of sending an appropriate 4xx or 5xx response code. In such a case, the callback should return -1. This will tell the function that called the handler that an appropriate error response has been sent. If the callback returns 0, however, then the caller of the callback will generate a new entity tag and send a 200 OK response.

ESC entries are reference-counted, however as an implementor of a specific event package, this should be transparent, since the reference counts are handled by the general ESC framework.

EPA: The event publication agent in chan_sip is structured quite a bit differently than the ESC. With an ESC, an appropriate entry has to be found based on the contents of an incoming PUBLISH message. With an EPA, the application interested in sending the PUBLISH can maintain a reference to the appropriate EPA entry instead. Similarly, when matching a PUBLISH response to an appropriate EPA entry, the sip_pvt can maintain a reference to the corresponding EPA entry. The result of this train of thought is that there is no compelling reason to maintain a container of these entries.

Instead, there is only the sip_epa_entry structure. Every sip_epa_entry has an entity tag that it maintains so that subsequent PUBLISH requests will be identifiable by the ESC on the far end. In addition, there is a static_data field which contains information that is common to all sip_epa_entries for a specific event package. This static data includes the name of the event package and callbacks for handling specific responses for outgoing PUBLISHes. Also, there is a field for pointing to instance-specific data. This can include the current published state or other identifying information that is specific to an instance of an EPA entry of a particular event package.

When an application wishes to send a PUBLISH request, it simply will call create_epa_entry, followed by transmit_publish in order to send the PUBLISH. That's all that is necessary. Like with ESC entries, sip_epa_entries are reference counted. Unlike ESC entries, though, sip_epa_entries reference counts have to be maintained to some degree by the application making use of the sip_epa_entry. The application will acquire a reference to the EPA entry when it calls create_epa_entry. When the application has finished using the EPA entry (which may not be until after several PUBLISH transactions have taken place) it must use ao2_ref to decrease the reference count by 1.

Enumerator:
CC_CLOSED  Closed, i.e. unavailable
CC_OPEN  Open, i.e. available

Definition at line 1520 of file sip.h.

01520                           {
01521    /*! Closed, i.e. unavailable */
01522    CC_CLOSED,
01523    /*! Open, i.e. available */
01524    CC_OPEN,
01525 };

debugging state We store separately the debugging requests from the config file and requests from the CLI. Debugging is enabled if either is set (which means that if sipdebug is set in the config file, we can only turn it off by reloading the config).

Enumerator:
sip_debug_none 
sip_debug_config 
sip_debug_console 

Definition at line 644 of file sip.h.

00644                  {
00645    sip_debug_none = 0,
00646    sip_debug_config = 1,
00647    sip_debug_console = 2,
00648 };

Result from get_destination function.

Enumerator:
SIP_GET_DEST_EXTEN_MATCHMORE 
SIP_GET_DEST_EXTEN_FOUND 
SIP_GET_DEST_EXTEN_NOT_FOUND 
SIP_GET_DEST_REFUSED 
SIP_GET_DEST_INVALID_URI 

Definition at line 500 of file sip.h.

Enumerator:
SIP_TYPE_PEER 
SIP_TYPE_USER 

Definition at line 672 of file sip.h.

00672                    {
00673    SIP_TYPE_PEER = (1 << 0),
00674    SIP_TYPE_USER = (1 << 1),
00675 };

The types of PUBLISH messages defined in RFC 3903.

Enumerator:
SIP_PUBLISH_UNKNOWN  Unknown.

This actually is not defined in RFC 3903. We use this as a constant to indicate that an incoming PUBLISH does not fit into any of the other categories and is thus invalid.

SIP_PUBLISH_INITIAL  Initial.

The first PUBLISH sent. This will contain a non-zero Expires header as well as a body that indicates the current state of the endpoint that has sent the message. The initial PUBLISH is the only type of PUBLISH to not contain a Sip-If-Match header in it.

SIP_PUBLISH_REFRESH  Refresh.

Used to keep a published state from expiring. This will contain a non-zero Expires header but no body since its purpose is not to update state.

SIP_PUBLISH_MODIFY  Modify.

Used to change state from its previous value. This will contain a body updating the published state. May or may not contain an Expires header.

SIP_PUBLISH_REMOVE  Remove.

Used to remove published state from an ESC. This will contain an Expires header set to 0 and likely no body.

SIP_PUBLISH_UNKNOWN  Unknown.

This actually is not defined in RFC 3903. We use this as a constant to indicate that an incoming PUBLISH does not fit into any of the other categories and is thus invalid.

SIP_PUBLISH_INITIAL  Initial.

The first PUBLISH sent. This will contain a non-zero Expires header as well as a body that indicates the current state of the endpoint that has sent the message. The initial PUBLISH is the only type of PUBLISH to not contain a Sip-If-Match header in it.

SIP_PUBLISH_REFRESH  Refresh.

Used to keep a published state from expiring. This will contain a non-zero Expires header but no body since its purpose is not to update state.

SIP_PUBLISH_MODIFY  Modify.

Used to change state from its previous value. This will contain a body updating the published state. May or may not contain an Expires header.

SIP_PUBLISH_REMOVE  Remove.

Used to remove published state from an ESC. This will contain an Expires header set to 0 and likely no body.

Definition at line 1540 of file sip.h.

01540                       {
01541    /*!
01542     * \brief Unknown
01543     *
01544     * \details
01545     * This actually is not defined in RFC 3903. We use this as a constant
01546     * to indicate that an incoming PUBLISH does not fit into any of the
01547     * other categories and is thus invalid.
01548     */
01549    SIP_PUBLISH_UNKNOWN,
01550    /*!
01551     * \brief Initial
01552     *
01553     * \details
01554     * The first PUBLISH sent. This will contain a non-zero Expires header
01555     * as well as a body that indicates the current state of the endpoint
01556     * that has sent the message. The initial PUBLISH is the only type
01557     * of PUBLISH to not contain a Sip-If-Match header in it.
01558     */
01559    SIP_PUBLISH_INITIAL,
01560    /*!
01561     * \brief Refresh
01562     *
01563     * \details
01564     * Used to keep a published state from expiring. This will contain a
01565     * non-zero Expires header but no body since its purpose is not to
01566     * update state.
01567     */
01568    SIP_PUBLISH_REFRESH,
01569    /*!
01570     * \brief Modify
01571     *
01572     * \details
01573     * Used to change state from its previous value. This will contain
01574     * a body updating the published state. May or may not contain an
01575     * Expires header.
01576     */
01577    SIP_PUBLISH_MODIFY,
01578    /*!
01579     * \brief Remove
01580     *
01581     * \details
01582     * Used to remove published state from an ESC. This will contain
01583     * an Expires header set to 0 and likely no body.
01584     */
01585    SIP_PUBLISH_REMOVE,
01586 };

enum sip_result

The result of a lot of functions.

Enumerator:
AST_SUCCESS  FALSE means success, funny enough
AST_FAILURE  Failure code

Definition at line 412 of file sip.h.

00412                 {
00413    AST_SUCCESS = 0,     /*!< FALSE means success, funny enough */
00414    AST_FAILURE = -1,    /*!< Failure code */
00415 };

Enumerator:
TCPTLS_ALERT_DATA  There is new data to be sent out.
TCPTLS_ALERT_STOP  A request to stop the tcp_handler thread.

Definition at line 683 of file sip.h.

00683                       {
00684    TCPTLS_ALERT_DATA,  /*!< \brief There is new data to be sent out */
00685    TCPTLS_ALERT_STOP,  /*!< \brief A request to stop the tcp_handler thread */
00686 };

enum sipmethod

SIP Request methods known by Asterisk.

Note:
Do _NOT_ make any changes to this enum, or the array following it; if you think you are doing the right thing, you are probably not doing the right thing. If you think there are changes needed, get someone else to review them first _before_ submitting a patch. If these two lists do not match properly bad things will happen.
Enumerator:
SIP_UNKNOWN  Unknown response
SIP_RESPONSE  Not request, response to outbound request
SIP_REGISTER  Registration to the mothership, tell us where you are located
SIP_OPTIONS  Check capabilities of a device, used for "ping" too
SIP_NOTIFY  Status update, Part of the event package standard, result of a SUBSCRIBE or a REFER
SIP_INVITE  Set up a session
SIP_ACK  End of a three-way handshake started with INVITE.
SIP_PRACK  Reliable pre-call signalling. Not supported in Asterisk.
SIP_BYE  End of a session
SIP_REFER  Refer to another URI (transfer)
SIP_SUBSCRIBE  Subscribe for updates (voicemail, session status, device status, presence)
SIP_MESSAGE  Text messaging
SIP_UPDATE  Update a dialog. We can send UPDATE; but not accept it
SIP_INFO  Information updates during a session
SIP_CANCEL  Cancel an INVITE
SIP_PUBLISH  Not supported in Asterisk
SIP_PING  Not supported at all, no standard but still implemented out there

Definition at line 605 of file sip.h.

00605                {
00606    SIP_UNKNOWN,    /*!< Unknown response */
00607    SIP_RESPONSE,   /*!< Not request, response to outbound request */
00608    SIP_REGISTER,   /*!< Registration to the mothership, tell us where you are located */
00609    SIP_OPTIONS,    /*!< Check capabilities of a device, used for "ping" too */
00610    SIP_NOTIFY,     /*!< Status update, Part of the event package standard, result of a SUBSCRIBE or a REFER */
00611    SIP_INVITE,     /*!< Set up a session */
00612    SIP_ACK,        /*!< End of a three-way handshake started with INVITE. */
00613    SIP_PRACK,      /*!< Reliable pre-call signalling. Not supported in Asterisk. */
00614    SIP_BYE,        /*!< End of a session */
00615    SIP_REFER,      /*!< Refer to another URI (transfer) */
00616    SIP_SUBSCRIBE,  /*!< Subscribe for updates (voicemail, session status, device status, presence) */
00617    SIP_MESSAGE,    /*!< Text messaging */
00618    SIP_UPDATE,     /*!< Update a dialog. We can send UPDATE; but not accept it */
00619    SIP_INFO,       /*!< Information updates during a session */
00620    SIP_CANCEL,     /*!< Cancel an INVITE */
00621    SIP_PUBLISH,    /*!< Not supported in Asterisk */
00622    SIP_PING,       /*!< Not supported at all, no standard but still implemented out there */
00623 };

States for outbound registrations (with register= lines in sip.conf.

Enumerator:
REG_STATE_UNREGISTERED  We are not registered
Note:
Initial state. We should have a timeout scheduled for the initial (or next) registration transmission, calling sip_reregister
REG_STATE_REGSENT  Registration request sent
Note:
sent initial request, waiting for an ack or a timeout to retransmit the initial request.
REG_STATE_AUTHSENT  We have tried to authenticate
Note:
entered after transmit_register with auth info, waiting for an ack.
REG_STATE_REGISTERED  Registered and done
REG_STATE_REJECTED  Registration rejected
Note:
only used when the remote party has an expire larger than our max-expire. This is a final state from which we do not recover (not sure how correctly).
REG_STATE_TIMEOUT  Registration timed out
Note:
XXX unused
REG_STATE_NOAUTH  We have no accepted credentials
Note:
fatal - no chance to proceed
REG_STATE_FAILED  Registration failed after several tries
Note:
fatal - no chance to proceed

Definition at line 526 of file sip.h.

00526                       {
00527    REG_STATE_UNREGISTERED = 0,   /*!< We are not registered
00528        *  \note Initial state. We should have a timeout scheduled for the initial
00529        * (or next) registration transmission, calling sip_reregister
00530        */
00531 
00532    REG_STATE_REGSENT,   /*!< Registration request sent
00533        * \note sent initial request, waiting for an ack or a timeout to
00534        * retransmit the initial request.
00535       */
00536 
00537    REG_STATE_AUTHSENT,  /*!< We have tried to authenticate
00538        * \note entered after transmit_register with auth info,
00539        * waiting for an ack.
00540        */
00541 
00542    REG_STATE_REGISTERED,   /*!< Registered and done */
00543 
00544    REG_STATE_REJECTED,  /*!< Registration rejected
00545        * \note only used when the remote party has an expire larger than
00546        * our max-expire. This is a final state from which we do not
00547        * recover (not sure how correctly).
00548        */
00549 
00550    REG_STATE_TIMEOUT,   /*!< Registration timed out
00551       * \note XXX unused */
00552 
00553    REG_STATE_NOAUTH, /*!< We have no accepted credentials
00554        * \note fatal - no chance to proceed */
00555 
00556    REG_STATE_FAILED, /*!< Registration failed after several tries
00557        * \note fatal - no chance to proceed */
00558 };

enum st_mode

Modes in which Asterisk can be configured to run SIP Session-Timers.

Enumerator:
SESSION_TIMER_MODE_INVALID  Invalid value
SESSION_TIMER_MODE_ACCEPT  Honor inbound Session-Timer requests
SESSION_TIMER_MODE_ORIGINATE  Originate outbound and honor inbound requests
SESSION_TIMER_MODE_REFUSE  Ignore inbound Session-Timers requests

Definition at line 561 of file sip.h.

00561              {
00562         SESSION_TIMER_MODE_INVALID = 0, /*!< Invalid value */
00563         SESSION_TIMER_MODE_ACCEPT,      /*!< Honor inbound Session-Timer requests */
00564         SESSION_TIMER_MODE_ORIGINATE,   /*!< Originate outbound and honor inbound requests */
00565         SESSION_TIMER_MODE_REFUSE       /*!< Ignore inbound Session-Timers requests */
00566 };

The entity playing the refresher role for Session-Timers.

Enumerator:
SESSION_TIMER_REFRESHER_AUTO  Negotiated
SESSION_TIMER_REFRESHER_US  Initially prefer session refresh by Asterisk
SESSION_TIMER_REFRESHER_THEM  Initially prefer session refresh by the other side

Definition at line 569 of file sip.h.

00569                   {
00570         SESSION_TIMER_REFRESHER_AUTO, /*!< Negotiated                      */
00571         SESSION_TIMER_REFRESHER_US,   /*!< Initially prefer session refresh by Asterisk */
00572         SESSION_TIMER_REFRESHER_THEM, /*!< Initially prefer session refresh by the other side */
00573 };

Enumerator:
SESSION_TIMER_REFRESHER_PARAM_UNKNOWN 
SESSION_TIMER_REFRESHER_PARAM_UAC 
SESSION_TIMER_REFRESHER_PARAM_UAS 

Definition at line 575 of file sip.h.

Type of subscription, based on the packages we do support, see subscription_types.

Enumerator:
NONE 
XPIDF_XML 
DIALOG_INFO_XML 
CPIM_PIDF_XML 
PIDF_XML 
MWI_NOTIFICATION 
CALL_COMPLETION 

Definition at line 465 of file sip.h.

00465                       {
00466    NONE = 0,
00467    XPIDF_XML,
00468    DIALOG_INFO_XML,
00469    CPIM_PIDF_XML,
00470    PIDF_XML,
00471    MWI_NOTIFICATION,
00472    CALL_COMPLETION,
00473 };

Enumerator:
SDP_T38_NONE  Do not modify T38 information at all
SDP_T38_INITIATE  Remote side has requested T38 with us
SDP_T38_ACCEPT  Remote side accepted our T38 request

Definition at line 677 of file sip.h.

00677                      {
00678    SDP_T38_NONE = 0, /*!< Do not modify T38 information at all */
00679    SDP_T38_INITIATE, /*!< Remote side has requested T38 with us */
00680    SDP_T38_ACCEPT,   /*!< Remote side accepted our T38 request */
00681 };

enum t38state

T38 States for a call.

Enumerator:
T38_DISABLED  Not enabled
T38_LOCAL_REINVITE  Offered from local - REINVITE
T38_PEER_REINVITE  Offered from peer - REINVITE
T38_ENABLED  Negotiated (enabled)
T38_REJECTED  Refused

Definition at line 651 of file sip.h.

00651               {
00652    T38_DISABLED = 0,     /*!< Not enabled */
00653    T38_LOCAL_REINVITE,   /*!< Offered from local - REINVITE */
00654    T38_PEER_REINVITE,    /*!< Offered from peer - REINVITE */
00655    T38_ENABLED,          /*!< Negotiated (enabled) */
00656    T38_REJECTED          /*!< Refused */
00657 };

Authorization scheme for call transfers.

Note:
Not a bitfield flag, since there are plans for other modes, like "only allow transfers for authenticated devices"
Enumerator:
TRANSFER_OPENFORALL  Allow all SIP transfers
TRANSFER_CLOSED  Allow no SIP transfers

Definition at line 406 of file sip.h.

00406                    {
00407    TRANSFER_OPENFORALL,            /*!< Allow all SIP transfers */
00408    TRANSFER_CLOSED,                /*!< Allow no SIP transfers */
00409 };

enum xmittype

When sending a SIP message, we can send with a few options, depending on type of SIP request. UNRELIABLE is moslty used for responses to repeated requests, where the original response would be sent RELIABLE in an INVITE transaction.

Enumerator:
XMIT_CRITICAL  Transmit critical SIP message reliably, with re-transmits. If it fails, it's critical and will cause a teardown of the session
XMIT_RELIABLE  Transmit SIP message reliably, with re-transmits
XMIT_UNRELIABLE  Transmit SIP message without bothering with re-transmits

Definition at line 449 of file sip.h.

00449               {
00450    XMIT_CRITICAL = 2,    /*!< Transmit critical SIP message reliably, with re-transmits.
00451                           *   If it fails, it's critical and will cause a teardown of the session */
00452    XMIT_RELIABLE = 1,    /*!< Transmit SIP message reliably, with re-transmits */
00453    XMIT_UNRELIABLE = 0,  /*!< Transmit SIP message without bothering with re-transmits */
00454 };


Function Documentation

static void __init_check_auth_buf ( void   )  [static]

Definition at line 1861 of file sip.h.

01873 { ao2_t_cleanup(peer, tag); (NULL); })

void sip_auth_headers ( enum sip_auth_type  code,
char **  header,
char **  respheader 
)

return the request and response header for a 401 or 407 code

Definition at line 15782 of file chan_sip.c.

References ast_verbose, PROXY_AUTH, and WWW_AUTH.

Referenced by check_auth(), do_message_auth(), do_proxy_auth(), do_register_auth(), sip_report_security_event(), and transmit_request_with_auth().

15783 {
15784    if (code == WWW_AUTH) {       /* 401 */
15785       *header = "WWW-Authenticate";
15786       *respheader = "Authorization";
15787    } else if (code == PROXY_AUTH) { /* 407 */
15788       *header = "Proxy-Authenticate";
15789       *respheader = "Proxy-Authorization";
15790    } else {
15791       ast_verbose("-- wrong response code %u\n", code);
15792       *header = *respheader = "Invalid";
15793    }
15794 }

struct sip_peer* sip_find_peer ( const char *  peer,
struct ast_sockaddr addr,
int  realtime,
int  which_objects,
int  devstate_only,
int  transport 
) [read]

Locate device by name or ip address.

Parameters:
peer,addr,realtime,devstate_only,transport 
which_objects Define which objects should be matched when doing a lookup by name. Valid options are FINDUSERS, FINDPEERS, or FINDALLDEVICES. Note that this option is not used at all when doing a lookup by IP.
This is used on find matching device on name or ip/port. If the device was declared as type=peer, we don't match on peer name on incoming INVITEs.

Note:
Avoid using this function in new functions if there is a way to avoid it, since it might cause a database lookup.

Definition at line 5573 of file chan_sip.c.

References NULL, and sip_find_peer_full().

Referenced by _sip_qualify_peer(), _sip_show_peer(), check_peer_ok(), create_addr(), function_sippeer(), handle_request_notify(), manager_sip_peer_status(), mwi_event_cb(), receive_message(), register_verify(), sip_devicestate(), sip_do_debug_peer(), sip_msg_send(), sip_report_security_event(), sip_show_user(), sip_unregister(), and transmit_register().

05574 {
05575    return sip_find_peer_full(peer, addr, NULL, realtime, which_objects, devstate_only, transport);
05576 }

const char* sip_get_header ( const struct sip_request req,
const char *  name 
)

Get header from SIP request.

Returns:
Always return something, so don't check for NULL because it won't happen :-)

Definition at line 8256 of file chan_sip.c.

References __get_header().

Referenced by __find_call(), __sip_alloc(), __transmit_response(), build_route(), cc_handle_publish_error(), change_redirecting_information(), check_auth(), check_user_full(), check_via(), copy_header(), extract_uri(), find_sdp(), get_also_info(), get_destination(), get_pai(), get_rdnis(), get_realm(), get_refer_info(), get_rpid(), gettag(), handle_cc_notify(), handle_cc_subscribe(), handle_incoming(), handle_request_bye(), handle_request_do(), handle_request_info(), handle_request_invite(), handle_request_invite_st(), handle_request_notify(), handle_request_options(), handle_request_publish(), handle_request_register(), handle_request_subscribe(), handle_request_update(), handle_response(), handle_response_invite(), handle_response_notify(), handle_response_publish(), handle_response_refer(), handle_response_register(), handle_response_subscribe(), handle_response_update(), parse_allowed_methods(), parse_moved_contact(), parse_ok_contact(), parse_oli(), parse_register_contact(), proc_422_rsp(), process_via(), receive_message(), register_verify(), reply_digest(), reqprep(), respprep(), send_request(), send_response(), sip_get_cc_information(), sip_report_security_event(), sip_sipredirect(), transmit_fake_auth_response(), transmit_refer(), transmit_response_with_auth(), transmit_response_with_sdp(), transmit_response_with_t38_sdp(), transmit_state_notify(), uac_sips_contact(), and uas_sips_contact().

08257 {
08258    int start = 0;
08259    return __get_header(req, name, &start);
08260 }

const char* sip_get_transport ( enum ast_transport  t  ) 

Return transport as string.

Definition at line 3619 of file chan_sip.c.

References AST_TRANSPORT_TCP, AST_TRANSPORT_TLS, AST_TRANSPORT_UDP, AST_TRANSPORT_WS, and AST_TRANSPORT_WSS.

Referenced by _sip_show_peer(), ast_sip_ouraddrfor(), build_contact(), get_transport_pvt(), handle_request_do(), parse_moved_contact(), sip_report_security_event(), sip_show_settings(), sip_show_tcp(), and transmit_notify_with_mwi().

03620 {
03621    switch (t) {
03622    case AST_TRANSPORT_UDP:
03623       return "UDP";
03624    case AST_TRANSPORT_TCP:
03625       return "TCP";
03626    case AST_TRANSPORT_TLS:
03627       return "TLS";
03628    case AST_TRANSPORT_WS:
03629    case AST_TRANSPORT_WSS:
03630       return "WS";
03631    }
03632 
03633    return "UNKNOWN";
03634 }


Variable Documentation

struct ast_threadstorage check_auth_buf = { .once = PTHREAD_ONCE_INIT , .key_init = __init_check_auth_buf , .custom_init = NULL , } [static]

Definition at line 1861 of file sip.h.

Referenced by check_auth(), sip_report_security_event(), and transmit_fake_auth_response().

struct cfsip_options sip_options[] [static]

List of well-known SIP options. If we get this in a require, we should check the list and answer accordingly.

Referenced by _sip_show_peer(), add_required_respheader(), parse_sip_options(), peers_data_provider_get(), and sip_show_channel().


Generated on Thu Apr 16 06:33:49 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6