Asterisk.org: Developer Documentation (28 Oct 2009)

Wed Oct 28 15:49:34 2009

## Asterisk developer's documentation

# chan_iax2_pvt Struct Reference

Collaboration diagram for chan_iax2_pvt:

[legend]

## Data Fields

char | accountcode [AST_MAX_ACCOUNT_CODE]
struct sockaddr_in | addr
int | amaflags
char | ani [80]
unsigned char | aseqno
int | authfail
int | authid
int | authmethods
int | authrej
int | autoid
unsigned short | bridgecallno
unsigned int | bridgesfmt
struct ast_trans_pvt * | bridgetrans
int | calling_pres
int | calling_tns
int | calling_ton
unsigned short | callno
struct callno_entry * | callno_entry
unsigned char | calltoken_ie_len
int | capability
char | challenge [10]
int | chosenformat
char | cid_name [80]
char | cid_num [80]
char | context [80]
aes_decrypt_ctx | dcx
char | dnid [80]
struct iax2_dpcache * | dpentries
char | dproot [AST_MAX_EXTENSION]
aes_encrypt_ctx | ecx
int | encmethods
int | error
int | expiry
char | exten [AST_MAX_EXTENSION]
unsigned int | flags
int | frames_dropped
int | frames_received
char | host [80]
int | initid
char | inkeys [80]
unsigned char | iseqno
jitterbuf * | jb
int | jbid
int | lag
int | lagid
char | language [MAX_LANGUAGE]
unsigned int | last
unsigned int | lastsent
int | maxtime
int | min
unsigned int | nextpred
int | notsilenttx
struct timeval | offset
unsigned char | oseqno
char | outkey [80]
struct ast_channel * | owner
char | peer [80]
int | peeradsicpe
unsigned short | peercallno
int | peercapability
int | peerformat
struct iax2_peer * | peerpoke
int | pingid
unsigned int | pingtime
struct ast_codec_pref | prefs
struct iax2_registry * | reg
struct iax_rr | remote_rr
struct ast_codec_pref | rprefs
unsigned char | rseqno
struct timeval | rxcore
char | secret [80]
unsigned char | semirand [32]
int | sockfd
struct ast_flags | state
int | svideoformat
int | svoiceformat
aes_encrypt_ctx | tdcx
struct sockaddr_in | transfer
unsigned short | transfercallno
int | transferid
enum iax_transfer_state | transferring
char | username [80]
struct ast_variable * | vars
int | videoformat
int | voiceformat

## Detailed Description

Definition at line 469 of file chan_iax2.c.

## Field Documentation

char accountcode[AST_MAX_ACCOUNT_CODE]

Definition at line 626 of file chan_iax2.c.

Referenced by ast_iax2_new(), and check_access().

struct sockaddr_in addr`[read]`

Peer Address

Definition at line 495 of file chan_iax2.c.

Referenced by attempt_transmit(), complete_transfer(), find_callno(), iax2_send(), iax2_trunk_queue(), match(), pvt_destructor(), send_packet(), and socket_read().

int amaflags

Definition at line 627 of file chan_iax2.c.

Referenced by ast_iax2_new(), check_access(), and find_callno().

char ani[80]

Hidden Caller ID (i.e. ANI) if appropriate

Definition at line 559 of file chan_iax2.c.

Referenced by ast_iax2_new(), and check_access().

unsigned char aseqno

Last incoming sequence number we have acknowledged

Definition at line 550 of file chan_iax2.c.

Referenced by complete_transfer(), iax2_send(), resend_with_token(), and socket_read().

int authfail

Reason to report failure

Definition at line 620 of file chan_iax2.c.

Referenced by auth_fail().

int authid

Authentication rejection ID

Definition at line 619 of file chan_iax2.c.

Referenced by auth_fail(), auth_reject(), iax2_destroy_helper(), iax2_predestroy(), new_iax(), and stop_stuff().

int authmethods

permitted authentication methods

Definition at line 571 of file chan_iax2.c.

Referenced by authenticate_request(), authenticate_verify(), check_access(), and socket_read().

int authrej

AUTHREJ all AUTHREP frames

Definition at line 569 of file chan_iax2.c.

Referenced by authenticate_verify(), and check_access().

int autoid

Auto hangup for Dialplan requestor

Definition at line 618 of file chan_iax2.c.

Referenced by auto_hangup(), iax2_destroy_helper(), iax2_dprequest(), iax2_predestroy(), iax2_provision(), new_iax(), and stop_stuff().

unsigned short bridgecallno

Who we are bridged to

Definition at line 612 of file chan_iax2.c.

Referenced by iax2_bridge(), and socket_read().

unsigned int bridgesfmt

Definition at line 613 of file chan_iax2.c.

struct ast_trans_pvt* bridgetrans`[read]`

Definition at line 614 of file chan_iax2.c.

Referenced by pvt_destructor().

int calling_pres

Definition at line 624 of file chan_iax2.c.

Referenced by ast_iax2_new(), and check_access().

int calling_tns

Definition at line 623 of file chan_iax2.c.

Referenced by ast_iax2_new(), and check_access().

int calling_ton

Definition at line 622 of file chan_iax2.c.

Referenced by ast_iax2_new(), and check_access().

unsigned short callno

Our call number

Definition at line 501 of file chan_iax2.c.

Referenced by ast_iax2_new(), calc_rxstamp(), calc_timestamp(), find_callno(), get_from_jb(), iax2_send(), iax2_transfer(), iax2_trunk_queue(), make_trunk(), match(), pvt_destructor(), send_command_final(), and socket_read().

struct callno_entry* callno_entry`[read]`

Our callno_entry entry

Definition at line 503 of file chan_iax2.c.

Referenced by find_callno(), make_trunk(), and pvt_destructor().

unsigned char calltoken_ie_len

num bytes used for calltoken ie, even an empty ie should contain 2

Definition at line 639 of file chan_iax2.c.

Referenced by add_empty_calltoken_ie(), and resend_with_token().

int capability

What we are capable of sending

Definition at line 481 of file chan_iax2.c.

Referenced by ast_iax2_new(), cache_get_callno_locked(), check_access(), and socket_read().

char challenge[10]

MD5 challenge

Definition at line 575 of file chan_iax2.c.

Referenced by authenticate_reply(), authenticate_request(), and authenticate_verify().

int chosenformat

Negotiated format, this is only used to remember what format was chosen for an unauthenticated call so that the channel can get created later using the right format

Definition at line 509 of file chan_iax2.c.

Referenced by socket_read().

char cid_name[80]

Definition at line 557 of file chan_iax2.c.

Referenced by ast_iax2_new(), and check_access().

char cid_num[80]

Caller ID if available

Definition at line 556 of file chan_iax2.c.

Referenced by ast_iax2_new(), check_access(), and socket_read().

char context[80]

Default Context

Definition at line 554 of file chan_iax2.c.

Referenced by ast_iax2_new(), check_access(), iax2_call(), and socket_read().

aes_decrypt_ctx dcx

Decryption AES-128 Key

Definition at line 583 of file chan_iax2.c.

Referenced by authenticate_reply().

char dnid[80]

DNID

Definition at line 561 of file chan_iax2.c.

Referenced by ast_iax2_new(), and check_access().

struct iax2_dpcache* dpentries`[read]`

Definition at line 628 of file chan_iax2.c.

Referenced by complete_dpreply(), and find_cache().

char dproot[AST_MAX_EXTENSION]

Definition at line 625 of file chan_iax2.c.

aes_encrypt_ctx ecx

Encryption AES-128 Key

Definition at line 581 of file chan_iax2.c.

Referenced by authenticate_reply(), and iax2_send().

int encmethods

permitted encryption methods

Definition at line 573 of file chan_iax2.c.

Referenced by authenticate_reply(), authenticate_request(), check_access(), iax2_call(), merge_encryption(), and socket_read().

int error

Error, as discovered by the manager

Definition at line 536 of file chan_iax2.c.

Referenced by attempt_transmit(), send_packet(), and socket_read().

int expiry

Expiry (optional)

Definition at line 542 of file chan_iax2.c.

Referenced by find_callno(), and register_verify().

char exten[AST_MAX_EXTENSION]

Requested Extension

Definition at line 563 of file chan_iax2.c.

Referenced by ast_iax2_new(), check_access(), new_iax(), and socket_read().

unsigned int flags

IAX_ flags

Definition at line 595 of file chan_iax2.c.

int frames_dropped

Dropped frame count: (just for stats)

Definition at line 635 of file chan_iax2.c.

Referenced by ast_cli_netstats(), construct_rr(), and schedule_delivery().

int frames_received

received frame count: (just for stats)

Definition at line 637 of file chan_iax2.c.

Referenced by ast_cli_netstats(), construct_rr(), pvt_cmp_cb(), and socket_read().

char host[80]

Hostname/peername for naming purposes

Definition at line 589 of file chan_iax2.c.

Referenced by ast_iax2_new(), authenticate_verify(), iax2_request(), and new_iax().

int initid

Initial peer auto-congest ID (based on qualified peers)

Definition at line 621 of file chan_iax2.c.

Referenced by auto_congest(), iax2_call(), iax2_destroy_helper(), iax2_predestroy(), new_iax(), socket_read(), and stop_stuff().

char inkeys[80]

Public keys permitted keys for incoming authentication

Definition at line 577 of file chan_iax2.c.

Referenced by authenticate_verify(), check_access(), register_verify(), and socket_read().

unsigned char iseqno

Next incoming sequence number

Definition at line 548 of file chan_iax2.c.

Referenced by complete_transfer(), iax2_send(), resend_with_token(), socket_read(), and update_packet().

jitterbuf* jb

The jitterbuffer

Definition at line 520 of file chan_iax2.c.

Referenced by complete_transfer(), construct_rr(), get_from_jb(), new_iax(), pvt_destructor(), schedule_delivery(), and update_jbsched().

int jbid

active jb read scheduler id

Definition at line 522 of file chan_iax2.c.

Referenced by get_from_jb(), iax2_destroy_helper(), iax2_predestroy(), new_iax(), schedule_delivery(), stop_stuff(), and update_jbsched().

int lag

LAG

Definition at line 534 of file chan_iax2.c.

Referenced by complete_transfer().

int lagid

Retransmit lag request

Definition at line 617 of file chan_iax2.c.

Referenced by find_callno(), iax2_destroy_helper(), iax2_predestroy(), make_trunk(), new_iax(), and stop_stuff().

char language[MAX_LANGUAGE]

Preferred language

Definition at line 587 of file chan_iax2.c.

Referenced by ast_iax2_new(), and check_access().

unsigned int last

Last received timestamp

Definition at line 483 of file chan_iax2.c.

Referenced by complete_transfer(), schedule_delivery(), socket_read(), and unwrap_timestamp().

unsigned int lastsent

Last sent timestamp - never send the same timestamp twice in a single call

Definition at line 485 of file chan_iax2.c.

Referenced by calc_timestamp(), complete_transfer(), and iax2_send().

int maxtime

Max time for initial response

Definition at line 493 of file chan_iax2.c.

Referenced by iax2_call(), and iax2_request().

int min

Current base time: (just for stats)

Definition at line 633 of file chan_iax2.c.

Referenced by construct_rr(), and schedule_delivery().

unsigned int nextpred

Next outgoing timestamp if everything is good

Definition at line 487 of file chan_iax2.c.

Referenced by calc_timestamp(), and complete_transfer().

int notsilenttx

True if the last voice we transmitted was not silence/CNG

Definition at line 489 of file chan_iax2.c.

Referenced by calc_timestamp().

struct timeval offset`[read]`

timeval that we base our transmission on

Definition at line 515 of file chan_iax2.c.

Referenced by calc_timestamp(), and complete_transfer().

unsigned char oseqno

Next outgoing sequence number

Definition at line 544 of file chan_iax2.c.

Referenced by complete_transfer(), iax2_send(), resend_with_token(), and socket_read().

char outkey[80]

Private key for outgoing authentication

Definition at line 579 of file chan_iax2.c.

Referenced by cache_get_callno_locked(), and iax2_call().

struct ast_channel* owner`[read]`

Owner if we have one

Definition at line 538 of file chan_iax2.c.

Referenced by ast_iax2_new(), attempt_transmit(), iax2_destroy(), iax2_fixup(), iax2_predestroy(), pvt_destructor(), schedule_delivery(), and socket_read().

char peer[80]

Peer name

Definition at line 552 of file chan_iax2.c.

Referenced by authenticate_reply(), and register_verify().

int peeradsicpe

Status of knowledge of peer ADSI capability

Definition at line 609 of file chan_iax2.c.

Referenced by ast_iax2_new(), and check_access().

unsigned short peercallno

Peer callno

Definition at line 505 of file chan_iax2.c.

Referenced by calc_timestamp(), complete_transfer(), find_callno(), iax2_destroy(), iax2_indicate(), iax2_send(), match(), pvt_hash_cb(), remove_by_peercallno(), resend_with_token(), send_packet(), socket_read(), and store_by_peercallno().

int peercapability

Peer capability

Definition at line 513 of file chan_iax2.c.

Referenced by check_access(), and socket_read().

int peerformat

Peer selected format

Definition at line 511 of file chan_iax2.c.

Referenced by check_access(), and socket_read().

struct iax2_peer* peerpoke`[read]`

Associated peer for poking

Definition at line 593 of file chan_iax2.c.

Referenced by iax2_poke_peer().

int pingid

Transmit PING request

Definition at line 616 of file chan_iax2.c.

Referenced by find_callno(), iax2_destroy_helper(), iax2_predestroy(), make_trunk(), new_iax(), and stop_stuff().

unsigned int pingtime

Ping time

Definition at line 491 of file chan_iax2.c.

Referenced by ast_cli_netstats(), complete_transfer(), find_callno(), iax2_call(), iax2_poke_peer(), and iax2_send().

struct ast_codec_pref prefs`[read]`

Actual used codec preferences

Definition at line 497 of file chan_iax2.c.

Referenced by check_access(), new_iax(), and socket_read().

struct iax2_registry* reg`[read]`

Associated registry

Definition at line 591 of file chan_iax2.c.

Referenced by attempt_transmit(), delete_users(), iax2_ack_registry(), iax2_do_register(), pvt_destructor(), and registry_rerequest().

struct iax_rr remote_rr`[read]`

last received remote rr

Definition at line 631 of file chan_iax2.c.

Referenced by ast_cli_netstats(), iax2_show_channels(), and save_rr().

struct ast_codec_pref rprefs`[read]`

Requested codec preferences

Definition at line 499 of file chan_iax2.c.

Referenced by socket_read().

unsigned char rseqno

Next sequence number they have not yet acknowledged

Definition at line 546 of file chan_iax2.c.

Referenced by complete_transfer(), resend_with_token(), and socket_read().

struct timeval rxcore`[read]`

timeval that we base our delivery on

Definition at line 517 of file chan_iax2.c.

Referenced by calc_rxstamp(), complete_transfer(), fix_peerts(), get_from_jb(), schedule_delivery(), and update_jbsched().

char secret[80]

Expected Secret

Definition at line 567 of file chan_iax2.c.

Referenced by authenticate_verify(), cache_get_callno_locked(), check_access(), iax2_call(), register_verify(), and socket_read().

unsigned char semirand[32]

32 bytes of semi-random data

Definition at line 585 of file chan_iax2.c.

Referenced by iax2_send().

int sockfd

Socket to send/receive on for this call

Definition at line 471 of file chan_iax2.c.

Referenced by find_callno(), iax2_call(), iax2_trunk_queue(), and send_packet().

struct ast_flags state`[read]`

What's our state?

Definition at line 540 of file chan_iax2.c.

Referenced by authenticate_verify(), and socket_read().

int svideoformat

Last sent video format

Definition at line 479 of file chan_iax2.c.

Referenced by complete_transfer(), and iax2_send().

int svoiceformat

Last sent voice format

Definition at line 477 of file chan_iax2.c.

Referenced by complete_transfer(), and iax2_send().

aes_encrypt_ctx tdcx

Transfer decrypt AES-128 Key

Definition at line 606 of file chan_iax2.c.

struct sockaddr_in transfer`[read]`

Who we are IAX transfering to

Definition at line 602 of file chan_iax2.c.

Referenced by complete_transfer(), iax2_send(), match(), send_packet(), and try_transfer().

unsigned short transfercallno

What's the new call number for the transfer

Definition at line 604 of file chan_iax2.c.

Referenced by complete_transfer(), iax2_send(), and try_transfer().

int transferid

Transfer identifier

Definition at line 600 of file chan_iax2.c.

Referenced by try_transfer().

enum iax_transfer_state transferring

Transferring status

Definition at line 598 of file chan_iax2.c.

Referenced by complete_transfer(), iax2_start_transfer(), match(), socket_read(), and try_transfer().

char username[80]

Expected Username

Definition at line 565 of file chan_iax2.c.

Referenced by authenticate_reply(), authenticate_request(), authenticate_verify(), check_access(), iax2_call(), iax2_destroy_helper(), and iax2_predestroy().

struct ast_variable* vars`[read]`

Definition at line 629 of file chan_iax2.c.

Referenced by ast_iax2_new(), check_access(), and pvt_destructor().

int videoformat

Last received video format

Definition at line 475 of file chan_iax2.c.

Referenced by complete_transfer(), and socket_read().

int voiceformat

Last received voice format

Definition at line 473 of file chan_iax2.c.

Referenced by complete_transfer(), get_from_jb(), and socket_read().

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

- chan_iax2.c