Wed Oct 28 11:54:47 2009

Asterisk developer's documentation


sip_pvt Struct Reference

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

Collaboration diagram for sip_pvt:

Collaboration graph
[legend]

Data Fields

struct ast_string_field_mgr __field_mgr
struct ast_string_field_pool__field_mgr_pool
const ast_string_field accountcode
enum transfermodes allowtransfer
char alreadygone
int amaflags
char answered_elsewhere
const ast_string_field authname
int authtries
int autoframing
int autokillid
long branch
ast_group_t callgroup
const ast_string_field callid
int callingpres
int capability
struct ast_variablechanvars
const ast_string_field cid_name
const ast_string_field cid_num
const ast_string_field context
int dialogver
char do_history
const ast_string_field domain
int expiry
const ast_string_field exten
struct ast_flags flags [2]
const ast_string_field from
const ast_string_field fromdomain
const ast_string_field fromname
const ast_string_field fromuser
const ast_string_field fullcontact
int glareinvite
int hangupcause
struct sip_history_headhistory
size_t history_entries
unsigned int icseq
int initid
struct sip_request initreq
long invite_branch
enum invitestates invitestate
int jointcapability
int jointnoncodeccapability
const ast_string_field language
const char * last_provisional
int lastinvite
char lastmsg [256]
time_t lastrtprx
time_t lastrtptx
int laststate
int maxcallbitrate
int method
const ast_string_field mohinterpret
const ast_string_field mohsuggest
char needdestroy
struct sip_pvtnext
const ast_string_field nonce
int noncecount
int noncodeccapability
char notext
struct ast_variablenotify_headers
char novideo
unsigned int ocseq
struct offered_media offered_media [4]
const ast_string_field okcontacturi
const ast_string_field opaque
struct sip_invite_paramoptions
const ast_string_field our_contact
struct sockaddr_in ourip
struct sip_proxyoutboundproxy
char outgoing_call
struct ast_channelowner
struct sip_pktpackets
const ast_string_field parkinglot
struct sip_authpeerauth
int peercapability
const ast_string_field peermd5secret
const ast_string_field peername
const ast_string_field peersecret
int pendinginvite
ast_group_t pickupgroup
unsigned int portinuri:1
int prefcodec
struct ast_codec_pref prefs
int provisional_keepalive_sched_id
const ast_string_field qop
const ast_string_field randdata
const ast_string_field rdnis
const ast_string_field realm
struct sockaddr_in recv
int red
const ast_string_field redircause
int redircodecs
struct sockaddr_in redirip
struct sip_referrefer
struct sip_registryregistry
struct sip_peerrelatedpeer
unsigned int reqsipoptions
struct sip_pvt::request_queue request_queue
int request_queue_sched_id
struct sip_routeroute
int route_persistant
const ast_string_field rpid
const ast_string_field rpid_from
struct ast_rtprtp
int rtptimeout
struct sockaddr_in sa
int session_modify
int sessionid
int sessionversion
int64_t sessionversion_remote
unsigned int sipoptions
struct sip_socket socket
unsigned int stalenonce:1
int stateid
struct sip_st_dlgstimer
const ast_string_field subscribecontext
enum subscriptiontype subscribed
const ast_string_field subscribeuri
struct t38properties t38
int t38_maxdatagram
int t38id
char tag [11]
const ast_string_field theirtag
int timer_b
int timer_t1
const ast_string_field todnid
const ast_string_field tohost
struct sockaddr_in tredirip
struct ast_rtptrtp
struct ast_udptludptl
struct sockaddr_in udptlredirip
const ast_string_field uri
const ast_string_field url
const ast_string_field useragent
const ast_string_field username
struct ast_dspvad
char via [128]
struct sockaddr_in vredirip
struct ast_rtpvrtp
int waitid

Data Structures

struct  request_queue

Detailed Description

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

Definition at line 1233 of file chan_sip.c.


Field Documentation

Definition at line 1279 of file chan_sip.c.

< Our contact header

< Our RPID header

< Our RPID From header

< URL to be sent with next message to peer

< Parkinglot

Definition at line 1279 of file chan_sip.c.

Definition at line 1279 of file chan_sip.c.

Referenced by sip_new().

REFER: restriction scheme

Definition at line 1357 of file chan_sip.c.

Referenced by create_addr_from_peer(), handle_request_refer(), sip_alloc(), and sip_show_channel().

already destroyed by our peer

Definition at line 1291 of file chan_sip.c.

Referenced by __sip_autodestruct(), handle_incoming(), handle_response_invite(), sip_alreadygone(), sip_hangup(), and sip_set_rtp_peer().

int amaflags

AMA Flags

Definition at line 1344 of file chan_sip.c.

Referenced by check_peer_ok(), and sip_new().

This call is cancelled due to answer on another channel

Definition at line 1294 of file chan_sip.c.

Referenced by sip_hangup(), and transmit_request().

int authtries

The number of Asters we group in a Pyroflax before strolling to the Grokyzpå (A bit unsure of this, please correct if you know more)

Definition at line 1381 of file chan_sip.c.

Referenced by check_peer_ok(), create_addr_from_peer(), process_sdp(), register_verify(), sip_alloc(), and transmit_response_with_sdp().

long branch

The branch identifier of this session

Definition at line 1319 of file chan_sip.c.

Referenced by build_via(), reqprep(), sip_alloc(), transmit_invite(), transmit_register(), and transmit_response_using_temp().

Call group

Definition at line 1284 of file chan_sip.c.

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

Calling presentation

Definition at line 1316 of file chan_sip.c.

Referenced by build_rpid(), check_peer_ok(), check_user_full(), initreqprep(), sip_call(), and sip_new().

struct ast_variable* chanvars [read]

Channel variables to set for inbound call

Definition at line 1375 of file chan_sip.c.

Referenced by __sip_destroy(), check_peer_ok(), sip_alloc(), and sip_new().

Definition at line 1279 of file chan_sip.c.

Referenced by sip_call(), and sip_new().

Definition at line 1279 of file chan_sip.c.

Referenced by get_destination(), show_channels_cb(), sip_new(), and sip_show_channel().

int dialogver

SUBSCRIBE: Version for subscription dialog-info

Definition at line 1362 of file chan_sip.c.

Referenced by handle_request_subscribe(), and transmit_state_notify().

char do_history

Definition at line 1279 of file chan_sip.c.

Referenced by build_reply_digest(), get_destination(), reply_digest(), and sip_new().

int expiry

struct ast_flags flags[2] [read]

SIP_ flags

Definition at line 1287 of file chan_sip.c.

Referenced by __sip_destroy(), add_codec_to_sdp(), add_sdp(), build_via(), cb_extensionstate(), check_peer_ok(), check_pendings(), check_rtp_timeout(), check_user_full(), check_via(), copy_via_headers(), create_addr(), create_addr_from_peer(), find_call_cb(), handle_invite_replaces(), handle_request_bye(), handle_request_cancel(), handle_request_info(), handle_request_invite(), handle_request_refer(), handle_request_subscribe(), handle_response(), handle_response_invite(), handle_response_notify(), initreqprep(), interpret_t38_parameters(), local_attended_transfer(), manager_sipnotify(), parse_moved_contact(), process_sdp(), register_verify(), replace_cid(), reqprep(), respprep(), send_request(), set_address_from_contact(), set_t38_capabilities(), show_channels_cb(), sip_alloc(), sip_answer(), sip_call(), sip_cli_notify(), sip_dtmfmode(), sip_get_rtp_peer(), sip_get_trtp_peer(), sip_get_udptl_peer(), sip_get_vrtp_peer(), sip_hangup(), sip_indicate(), sip_nat_mode(), sip_new(), sip_poke_peer(), sip_queryoption(), sip_read(), sip_real_dst(), sip_reinvite_retry(), sip_rtp_read(), sip_send_mwi_to_peer(), sip_senddigit_begin(), sip_senddigit_end(), sip_sendhtml(), sip_set_rtp_peer(), sip_set_udptl_peer(), sip_show_channel(), sip_write(), transmit_info_with_digit(), transmit_notify_with_mwi(), transmit_refer(), transmit_register(), transmit_reinvite_with_sdp(), transmit_response_using_temp(), transmit_response_with_sdp(), and update_call_counter().

Definition at line 1279 of file chan_sip.c.

Referenced by acf_channel_read(), and function_sipchaninfo_read().

Definition at line 1279 of file chan_sip.c.

Referenced by initreqprep().

Definition at line 1279 of file chan_sip.c.

Referenced by build_rpid(), and initreqprep().

A invite received while a pending invite is already present is stored here. Its seqno is the value. Since this glare invite's seqno is not the same as the pending invite's, it must be held in order to properly process acknowledgements for our 491 response.

Definition at line 1346 of file chan_sip.c.

Referenced by handle_incoming(), and handle_request_invite().

Storage of hangupcause copied from our owner before we disconnect from the AST channel (only used at hangup)

Definition at line 1387 of file chan_sip.c.

Referenced by sip_hangup(), and transmit_request_with_auth().

struct sip_history_head* history [read]

History of this SIP dialog

Definition at line 1373 of file chan_sip.c.

Referenced by __sip_destroy(), sip_dump_history(), and sip_show_history().

Number of entires in the history

Definition at line 1374 of file chan_sip.c.

Referenced by __sip_destroy().

unsigned int icseq

Current incoming seqno

Definition at line 1283 of file chan_sip.c.

Referenced by handle_incoming().

int initid

Auto-congest ID if appropriate (scheduler)

Definition at line 1353 of file chan_sip.c.

Referenced by auto_congest(), dialog_unlink_all(), handle_response_invite(), sip_alloc(), and sip_call().

struct sip_request initreq [read]

The branch used when we sent the initial INVITE

Definition at line 1320 of file chan_sip.c.

Referenced by reqprep(), and transmit_invite().

Joint Non codec capability

Definition at line 1308 of file chan_sip.c.

Referenced by add_sdp(), check_peer_ok(), create_addr_from_peer(), process_sdp(), sip_call(), and sip_dtmfmode().

Definition at line 1279 of file chan_sip.c.

Referenced by sip_new().

const char* last_provisional

The last successfully transmitted provisonal response message

Definition at line 1379 of file chan_sip.c.

Referenced by send_provisional_keepalive_full(), and transmit_provisional_response().

char lastmsg[256]

Last Message sent/received

Definition at line 1343 of file chan_sip.c.

Referenced by __sip_autodestruct(), handle_incoming(), initreqprep(), reqprep(), show_channels_cb(), and sip_show_channel().

time_t lastrtprx

Last RTP received

Definition at line 1331 of file chan_sip.c.

Referenced by add_sdp(), check_rtp_timeout(), process_sdp(), sip_read(), sip_set_rtp_peer(), and sip_set_udptl_peer().

time_t lastrtptx

Last RTP sent

Definition at line 1332 of file chan_sip.c.

Referenced by add_sdp(), check_rtp_timeout(), process_sdp(), sip_set_rtp_peer(), sip_set_udptl_peer(), and sip_write().

int laststate

Maximum Call Bitrate for Video Calls

Definition at line 1310 of file chan_sip.c.

Referenced by add_sdp(), check_peer_ok(), create_addr_from_peer(), sip_alloc(), and sip_show_channel().

int method

SIP method that opened this dialog Global CallID Random data Account code Authorization realm Authorization nonce Opaque nonsense Quality of Protection, since SIP wasn't complicated enough yet. Authorization domain The From: header User agent in SIP request Extension where to start Context for this call Subscribecontext Subscribecontext Domain to show in the from field User to show in the user field Name to show in the user field Host we should put in the "to" field DNID of this call (overrides host) Default language for this call MOH class to use when put on hold MOH class to suggest when putting a peer on hold Referring DNIS Referring cause Their tag [user] name [peer] name, not set if [user] Who we use for authentication Original requested URI URI from the 200 OK on INVITE Password Caller*ID number Caller*ID name The Contact: that the UA registers with us

Definition at line 1236 of file chan_sip.c.

Referenced by __sip_autodestruct(), __sip_destroy(), __transmit_response(), dialog_needdestroy(), handle_incoming(), handle_response(), respprep(), sip_alloc(), sip_scheddestroy(), and transmit_response_using_temp().

Definition at line 1279 of file chan_sip.c.

Referenced by sip_indicate().

Definition at line 1279 of file chan_sip.c.

Referenced by process_sdp().

struct sip_pvt* next [read]

Next dialog in chain

Definition at line 1234 of file chan_sip.c.

Definition at line 1279 of file chan_sip.c.

Referenced by build_reply_digest(), and reply_digest().

Nonce-count

Definition at line 1341 of file chan_sip.c.

Referenced by build_reply_digest(), reply_digest(), transmit_register(), and transmit_response_with_auth().

DTMF RFC2833 telephony-event

Definition at line 1307 of file chan_sip.c.

Referenced by check_peer_ok(), create_addr_from_peer(), process_sdp(), sip_alloc(), sip_call(), and sip_show_channel().

char notext

Text not supported (?)

Definition at line 1296 of file chan_sip.c.

Referenced by add_sdp(), and process_sdp().

struct ast_variable* notify_headers [read]

Custom notify type

Definition at line 1339 of file chan_sip.c.

Referenced by __sip_destroy(), handle_response_notify(), transmit_invite(), and transmit_notify_custom().

char novideo

Didn't get video in invite, don't offer

Definition at line 1295 of file chan_sip.c.

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

unsigned int ocseq

struct offered_media offered_media[4] [read]

When receiving an SDP offer, it is important to take note of what media types were offered. By doing this, even if we don't want to answer a particular media stream with something meaningful, we can still put an m= line in our answer with the port set to 0.

The reason for the length being 4 is that in this branch of Asterisk, the only media types supported are image, audio, text, and video. Therefore we need to keep track of which types of media were offered.

Note that if we wanted to be 100% correct, we would keep a list of all media streams offered. That way we could respond even to unknown media types, and we could respond to multiple streams of the same type. Such large-scale changes are not a good idea for released branches, though, so we're compromising by just making sure that for the common cases: audio and video, audio and T.38, and audio and text, we give the appropriate response to both media streams.

The large-scale changes would be a good idea for implementing during an SDP rewrite.

Definition at line 1402 of file chan_sip.c.

Referenced by add_sdp(), process_sdp(), transmit_invite(), and transmit_reinvite_with_sdp().

Definition at line 1279 of file chan_sip.c.

Referenced by reqprep().

Definition at line 1279 of file chan_sip.c.

Referenced by build_reply_digest(), and reply_digest().

struct sip_invite_param* options [read]

struct sockaddr_in ourip [read]

struct sip_proxy* outboundproxy [read]

Outbound proxy for this dialog. Use ref_proxy to set this instead of setting it directly

Definition at line 1311 of file chan_sip.c.

Referenced by __sip_ack(), get_transport_pvt(), ref_proxy(), send_request(), sip_prepare_socket(), and sip_real_dst().

struct ast_channel* owner [read]

struct sip_pkt* packets [read]

Definition at line 1279 of file chan_sip.c.

Referenced by sip_new().

struct sip_auth* peerauth [read]

Realm authentication

Definition at line 1340 of file chan_sip.c.

Referenced by build_reply_digest(), create_addr_from_peer(), and transmit_register().

Supported peer capability

Definition at line 1305 of file chan_sip.c.

Referenced by check_peer_ok(), process_sdp(), and sip_show_channel().

Definition at line 1279 of file chan_sip.c.

Referenced by build_reply_digest(), and check_peer_ok().

Definition at line 1279 of file chan_sip.c.

Referenced by build_reply_digest(), and check_peer_ok().

Pickup group

Definition at line 1285 of file chan_sip.c.

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

unsigned int portinuri

Non zero if a port has been specified, will also disable srv lookups

Definition at line 1326 of file chan_sip.c.

Referenced by create_addr(), create_addr_from_peer(), and initreqprep().

int prefcodec

Preferred codec (outbound only)

Definition at line 1306 of file chan_sip.c.

Referenced by add_sdp(), sip_call(), sip_new(), and sip_request_call().

struct ast_codec_pref prefs [read]

Scheduler ID for provisional responses that need to be sent out to avoid cancellation

Definition at line 1378 of file chan_sip.c.

Referenced by dialog_unlink_all(), send_response(), sip_alloc(), and update_provisional_keepalive().

Definition at line 1279 of file chan_sip.c.

Referenced by build_reply_digest(), and reply_digest().

Definition at line 1279 of file chan_sip.c.

Referenced by sip_new().

Definition at line 1279 of file chan_sip.c.

Referenced by build_reply_digest(), reply_digest(), and transmit_request_with_auth().

struct sockaddr_in recv [read]

int red

T.140 RTP Redundancy

Definition at line 1386 of file chan_sip.c.

Referenced by process_sdp(), and sip_write().

Definition at line 1279 of file chan_sip.c.

Referenced by get_rdnis().

Redirect codecs

Definition at line 1309 of file chan_sip.c.

Referenced by sip_set_rtp_peer().

struct sockaddr_in redirip [read]

Where our RTP should be going if not to us

Definition at line 1328 of file chan_sip.c.

Referenced by check_rtp_timeout(), get_our_media_address(), sip_set_rtp_peer(), and sip_show_channel().

struct sip_refer* refer [read]

struct sip_registry* registry [read]

struct sip_peer* relatedpeer [read]

If this dialog is related to a peer, which one Used in peerpoke, mwi subscriptions

Definition at line 1366 of file chan_sip.c.

Referenced by __sip_autodestruct(), __sip_destroy(), dialog_unlink_all(), handle_request_subscribe(), handle_response(), handle_response_peerpoke(), show_channels_cb(), and sip_poke_peer().

unsigned int reqsipoptions

Required SIP options on the other end

Definition at line 1301 of file chan_sip.c.

Referenced by handle_request_invite().

Requests that arrived but could not be processed immediately

Referenced by __sip_destroy(), handle_request_do(), process_request_queue(), queue_request(), scheduler_process_request_queue(), and sip_alloc().

Scheduler ID of any scheduled action to process queued requests

Definition at line 1377 of file chan_sip.c.

Referenced by dialog_unlink_all(), handle_request_do(), queue_request(), scheduler_process_request_queue(), and sip_alloc().

struct sip_route* route [read]

Head of linked list of routing steps (fm Record-Route)

Definition at line 1337 of file chan_sip.c.

Referenced by __sip_destroy(), build_route(), handle_response_invite(), initreqprep(), reqprep(), and sip_show_channel().

Is this the "real" route?

Definition at line 1338 of file chan_sip.c.

Referenced by build_route().

Definition at line 1279 of file chan_sip.c.

Referenced by build_rpid(), initreqprep(), and reqprep().

Definition at line 1279 of file chan_sip.c.

Referenced by build_rpid(), and initreqprep().

struct ast_rtp* rtp [read]

RTP timeout time

Definition at line 1333 of file chan_sip.c.

Referenced by create_addr_from_peer().

struct sockaddr_in sa [read]

Session modification request true/false

Definition at line 1325 of file chan_sip.c.

Referenced by handle_request_invite(), process_sdp(), and sip_alloc().

int sessionid

SDP Session ID

Definition at line 1322 of file chan_sip.c.

Referenced by add_sdp().

SDP Session Version

Definition at line 1323 of file chan_sip.c.

Referenced by add_sdp().

Remote UA's SDP Session Version

Definition at line 1324 of file chan_sip.c.

Referenced by process_sdp(), and sip_alloc().

unsigned int sipoptions

Supported SIP options on the other end

Definition at line 1300 of file chan_sip.c.

Referenced by check_peer_ok(), handle_request_invite(), parse_register_contact(), parse_sip_options(), and sip_show_channel().

struct sip_socket socket [read]

unsigned int stalenonce

Marks the current nonce as responded too

Definition at line 1342 of file chan_sip.c.

Referenced by check_auth(), and set_nonce_randdata().

int stateid

SUBSCRIBE: ID for devicestate subscriptions

Definition at line 1360 of file chan_sip.c.

Referenced by cb_extensionstate(), dialog_unlink_all(), handle_request_subscribe(), and sip_alloc().

struct sip_st_dlg* stimer [read]

Definition at line 1279 of file chan_sip.c.

Referenced by get_destination(), and handle_request_subscribe().

Definition at line 1279 of file chan_sip.c.

Referenced by handle_request_subscribe(), and show_channels_cb().

struct t38properties t38 [read]

T.38 FaxMaxDatagram override

Definition at line 1312 of file chan_sip.c.

Referenced by check_peer_ok(), create_addr_from_peer(), handle_request_invite(), process_sdp(), and sip_alloc().

int t38id

T.38 Response ID

Definition at line 1356 of file chan_sip.c.

Referenced by dialog_unlink_all(), handle_request_invite(), interpret_t38_parameters(), sip_alloc(), and sip_t38_abort().

char tag[11]

int timer_b

SIP timer B, ms

Definition at line 1299 of file chan_sip.c.

Referenced by check_peer_ok(), create_addr(), create_addr_from_peer(), sip_alloc(), sip_call(), and sip_scheddestroy().

int timer_t1

SIP timer T1, ms rtt

Definition at line 1298 of file chan_sip.c.

Referenced by __sip_reliable_xmit(), check_peer_ok(), create_addr(), create_addr_from_peer(), sip_alloc(), and sip_scheddestroy().

Definition at line 1279 of file chan_sip.c.

Referenced by initreqprep().

struct sockaddr_in tredirip [read]

Where our Text RTP should be going if not to us

Definition at line 1330 of file chan_sip.c.

Referenced by add_sdp(), and sip_set_rtp_peer().

struct ast_rtp* trtp [read]

struct ast_udptl* udptl [read]

struct sockaddr_in udptlredirip [read]

Where our T.38 UDPTL should be going if not to us

Definition at line 1314 of file chan_sip.c.

Referenced by add_sdp(), and sip_set_udptl_peer().

Definition at line 1279 of file chan_sip.c.

Referenced by reqprep(), and respprep().

struct ast_dsp* vad [read]

Inband DTMF Detection dsp

Definition at line 1364 of file chan_sip.c.

Referenced by sip_dtmfmode(), sip_hangup(), sip_new(), and sip_rtp_read().

char via[128]

Via: header

Definition at line 1280 of file chan_sip.c.

Referenced by build_via(), initreqprep(), reqprep(), and transmit_register().

struct sockaddr_in vredirip [read]

Where our Video RTP should be going if not to us

Definition at line 1329 of file chan_sip.c.

Referenced by get_our_media_address(), and sip_set_rtp_peer().

struct ast_rtp* vrtp [read]

int waitid

Wait ID for scheduler after 491 or other delays

Definition at line 1354 of file chan_sip.c.

Referenced by check_pendings(), dialog_unlink_all(), handle_response_invite(), sip_alloc(), sip_hangup(), and sip_reinvite_retry().


The documentation for this struct was generated from the following file:

Generated on Wed Oct 28 11:54:47 2009 for Asterisk - the Open Source PBX by  doxygen 1.5.6