Implementation of Inter-Asterisk eXchange, version 2 iax2-parser.c iax2-parser.h chan_iax2.c. More...
Go to the source code of this file.
Implementation of Inter-Asterisk eXchange, version 2 iax2-parser.c iax2-parser.h chan_iax2.c.
Definition in file iax2.h.
#define IAX_AUTH_MD5 (1 << 1) |
Definition at line 196 of file iax2.h.
Referenced by authenticate(), authenticate_reply(), authenticate_request(), authenticate_verify(), build_peer(), build_user(), check_access(), get_auth_methods(), register_verify(), registry_authrequest(), socket_process(), and users_data_provider_get().
#define IAX_AUTH_PLAINTEXT (1 << 0) |
Definition at line 195 of file iax2.h.
Referenced by authenticate(), authenticate_verify(), build_peer(), build_user(), check_access(), get_auth_methods(), register_verify(), registry_authrequest(), and users_data_provider_get().
#define IAX_AUTH_RSA (1 << 2) |
Definition at line 197 of file iax2.h.
Referenced by authenticate(), authenticate_request(), authenticate_verify(), build_user(), get_auth_methods(), register_verify(), registry_authrequest(), and users_data_provider_get().
#define IAX_DEFAULT_PORTNO 4569 |
Definition at line 128 of file iax2.h.
Referenced by build_peer(), create_addr(), iax2_append_register(), iax_template_parse(), peer_set_srcaddr(), and set_config().
#define IAX_DEFAULT_REG_EXPIRE 60 |
By default require re-registration once per minute
Definition at line 123 of file iax2.h.
Referenced by __attempt_transmit(), iax2_append_register(), realtime_peer(), and set_config().
#define IAX_DPSTATUS_CANEXIST (1 << 1) |
Definition at line 216 of file iax2.h.
Referenced by complete_dpreply(), and dp_lookup().
#define IAX_DPSTATUS_EXISTS (1 << 0) |
Definition at line 215 of file iax2.h.
Referenced by complete_dpreply(), and dp_lookup().
#define IAX_DPSTATUS_IGNOREPAT (1 << 14) |
Definition at line 218 of file iax2.h.
Referenced by dp_lookup().
#define IAX_DPSTATUS_MATCHMORE (1 << 15) |
Definition at line 219 of file iax2.h.
Referenced by complete_dpreply(), and dp_lookup().
#define IAX_DPSTATUS_NONEXISTENT (1 << 2) |
Definition at line 217 of file iax2.h.
Referenced by complete_dpreply(), and dp_lookup().
#define IAX_ENCRYPT_AES128 (1 << 0) |
Definition at line 199 of file iax2.h.
Referenced by encmethods_to_str(), get_encrypt_methods(), and merge_encryption().
#define IAX_ENCRYPT_KEYROTATE (1 << 15) |
Keyrotation support
Definition at line 200 of file iax2.h.
Referenced by encmethods_to_str(), get_encrypt_methods(), and merge_encryption().
#define IAX_FIRMWARE_MAGIC 0x69617879 |
Definition at line 285 of file iax2.h.
Referenced by try_firmware().
#define IAX_FLAG_FULL 0x8000 |
Definition at line 40 of file iax2.h.
Referenced by decode_frame(), encrypt_frame(), iax2_send(), iax_showframe(), raw_hangup(), socket_process(), socket_process_meta(), and socket_read().
#define IAX_FLAG_RETRANS 0x8000 |
Definition at line 42 of file iax2.h.
Referenced by iax_showframe(), send_apathetic_reply(), socket_process(), and update_packet().
#define IAX_FLAG_SC_LOG 0x80 |
Definition at line 44 of file iax2.h.
Referenced by compress_subclass(), and uncompress_subclass().
#define IAX_IE_ADSICPE 12 |
CPE ADSI capability - short
Definition at line 142 of file iax2.h.
Referenced by iax2_call(), and iax_parse_ies().
#define IAX_IE_APPARENT_ADDR 18 |
Apparent address of peer - struct sockaddr_in
Definition at line 148 of file iax2.h.
Referenced by iax2_start_transfer(), iax_parse_ies(), and update_registry().
#define IAX_IE_AUTHMETHODS 14 |
Authentication method(s) - short
Definition at line 144 of file iax2.h.
Referenced by authenticate_request(), iax_parse_ies(), and registry_authrequest().
#define IAX_IE_AUTOANSWER 25 |
Request auto-answering -- none
Definition at line 155 of file iax2.h.
Referenced by iax2_call(), and iax_parse_ies().
#define IAX_IE_CALLED_CONTEXT 5 |
Context for number - string
Definition at line 135 of file iax2.h.
Referenced by cache_get_callno_locked(), iax2_call(), iax2_transfer(), and iax_parse_ies().
#define IAX_IE_CALLED_NUMBER 1 |
IAX Information elements Number/extension being called - string
Definition at line 131 of file iax2.h.
Referenced by cache_get_callno_locked(), dp_lookup(), iax2_call(), iax2_dprequest(), iax2_transfer(), and iax_parse_ies().
#define IAX_IE_CALLING_ANI 3 |
Calling number ANI for billing - string
Definition at line 133 of file iax2.h.
Referenced by iax2_call(), and iax_parse_ies().
#define IAX_IE_CALLING_NAME 4 |
Name of caller - string
Definition at line 134 of file iax2.h.
Referenced by iax2_call(), iax_parse_ies(), and update_registry().
#define IAX_IE_CALLING_NUMBER 2 |
Calling number - string
Definition at line 132 of file iax2.h.
Referenced by iax2_call(), iax_parse_ies(), and update_registry().
#define IAX_IE_CALLINGPRES 38 |
Calling presentation (u8)
Definition at line 168 of file iax2.h.
Referenced by iax2_call(), and iax_parse_ies().
#define IAX_IE_CALLINGTNS 40 |
Calling transit network select (u16)
Definition at line 170 of file iax2.h.
Referenced by iax2_call(), and iax_parse_ies().
#define IAX_IE_CALLINGTON 39 |
Calling type of number (u8)
Definition at line 169 of file iax2.h.
Referenced by iax2_call(), and iax_parse_ies().
#define IAX_IE_CALLNO 21 |
Call number of peer - short
Definition at line 151 of file iax2.h.
Referenced by iax2_start_transfer(), iax_parse_ies(), and socket_process().
#define IAX_IE_CALLTOKEN 54 |
Call number security token
Definition at line 185 of file iax2.h.
Referenced by add_empty_calltoken_ie(), handle_call_token(), iax_parse_ies(), and resend_with_token().
#define IAX_IE_CAPABILITY 8 |
Actual codec capability - unsigned int
Definition at line 138 of file iax2.h.
Referenced by cache_get_callno_locked(), iax2_call(), and iax_parse_ies().
#define IAX_IE_CAPABILITY2 55 |
Actual codec capability - u8 version + integer array
Definition at line 187 of file iax2.h.
Referenced by iax2_call(), and iax_parse_ies().
#define IAX_IE_CAUSE 22 |
Cause - string
Definition at line 152 of file iax2.h.
Referenced by __auth_reject(), __auto_hangup(), authenticate_request(), iax_parse_ies(), and socket_process().
#define IAX_IE_CAUSECODE 42 |
Hangup cause (u8)
Definition at line 172 of file iax2.h.
Referenced by __auth_reject(), __auto_hangup(), authenticate_request(), iax2_hangup(), iax_parse_ies(), and socket_process().
#define IAX_IE_CHALLENGE 15 |
Challenge data for MD5/RSA - string
Definition at line 145 of file iax2.h.
Referenced by authenticate_request(), iax2_key_rotate(), iax_parse_ies(), and registry_authrequest().
#define IAX_IE_CODEC_PREFS 45 |
Codec Negotiation
Definition at line 175 of file iax2.h.
Referenced by iax2_call(), and iax_parse_ies().
#define IAX_IE_DATETIME 31 |
Date/Time
Definition at line 161 of file iax2.h.
Referenced by iax2_call(), iax_parse_ies(), and update_registry().
#define IAX_IE_DEVICETYPE 32 |
#define IAX_IE_DNID 13 |
Originally dialed DNID - string
Definition at line 143 of file iax2.h.
Referenced by iax2_call(), and iax_parse_ies().
#define IAX_IE_DPSTATUS 20 |
Dialplan status - short
Definition at line 150 of file iax2.h.
Referenced by dp_lookup(), and iax_parse_ies().
#define IAX_IE_ENCKEY 44 |
#define IAX_IE_ENCRYPTION 43 |
Encryption format (u16)
Definition at line 173 of file iax2.h.
Referenced by authenticate_request(), iax2_call(), and iax_parse_ies().
#define IAX_IE_FIRMWAREVER 34 |
Firmware revision -- u16
Definition at line 164 of file iax2.h.
Referenced by iax_parse_ies(), and update_registry().
#define IAX_IE_FORMAT 9 |
Desired codec format - unsigned int
Definition at line 139 of file iax2.h.
Referenced by cache_get_callno_locked(), iax2_call(), iax_parse_ies(), and socket_process().
#define IAX_IE_FORMAT2 56 |
Desired codec format - u8 version + integer array
Definition at line 188 of file iax2.h.
Referenced by iax2_call(), iax_parse_ies(), and socket_process().
#define IAX_IE_FWBLOCKDATA 36 |
Firmware block of data -- raw
Definition at line 166 of file iax2.h.
Referenced by iax_firmware_append(), and iax_parse_ies().
#define IAX_IE_FWBLOCKDESC 35 |
Firmware block description -- u32
Definition at line 165 of file iax2.h.
Referenced by iax_firmware_append(), and iax_parse_ies().
#define IAX_IE_IAX_UNKNOWN 23 |
Unknown IAX command - byte
Definition at line 153 of file iax2.h.
Referenced by iax_parse_ies(), and socket_process().
#define IAX_IE_LANGUAGE 10 |
Desired language - string
Definition at line 140 of file iax2.h.
Referenced by iax2_call(), and iax_parse_ies().
#define IAX_IE_MD5_RESULT 16 |
MD5 challenge result - string
Definition at line 146 of file iax2.h.
Referenced by authenticate(), and iax_parse_ies().
#define IAX_IE_MSGCOUNT 24 |
How many messages waiting - short
Definition at line 154 of file iax2.h.
Referenced by iax_parse_ies(), and update_registry().
#define IAX_IE_MUSICONHOLD 26 |
Request musiconhold with QUELCH -- none or string
Definition at line 156 of file iax2.h.
Referenced by iax_parse_ies().
#define IAX_IE_OSPTOKEN 53 |
#define IAX_IE_PASSWORD 7 |
Password for authentication - string
Definition at line 137 of file iax2.h.
Referenced by authenticate(), and iax_parse_ies().
#define IAX_IE_PROVISIONING 29 |
#define IAX_IE_PROVVER 37 |
#define IAX_IE_RDNIS 28 |
Referring DNIS -- string
Definition at line 158 of file iax2.h.
Referenced by iax2_call(), and iax_parse_ies().
#define IAX_IE_REFRESH 19 |
When to refresh registration - short
Definition at line 149 of file iax2.h.
Referenced by dp_lookup(), iax2_do_register(), iax_parse_ies(), registry_rerequest(), and update_registry().
#define IAX_IE_RR_DELAY 49 |
Max playout delay for received frames (in ms) u16
Definition at line 180 of file iax2.h.
Referenced by construct_rr(), and iax_parse_ies().
#define IAX_IE_RR_DROPPED 50 |
Dropped frames (presumably by jitterbuf) u32
Definition at line 181 of file iax2.h.
Referenced by construct_rr(), and iax_parse_ies().
#define IAX_IE_RR_JITTER 46 |
Received jitter (as in RFC1889) u32
Definition at line 177 of file iax2.h.
Referenced by construct_rr(), and iax_parse_ies().
#define IAX_IE_RR_LOSS 47 |
Received loss (high byte loss pct, low 24 bits loss count, as in rfc1889
Definition at line 178 of file iax2.h.
Referenced by construct_rr(), and iax_parse_ies().
#define IAX_IE_RR_OOO 51 |
Frames received Out of Order u32
Definition at line 182 of file iax2.h.
Referenced by construct_rr(), and iax_parse_ies().
#define IAX_IE_RR_PKTS 48 |
Received frames (total frames received) u32
Definition at line 179 of file iax2.h.
Referenced by construct_rr(), and iax_parse_ies().
#define IAX_IE_RSA_RESULT 17 |
RSA challenge result - string
Definition at line 147 of file iax2.h.
Referenced by authenticate(), and iax_parse_ies().
#define IAX_IE_SAMPLINGRATE 41 |
Supported sampling rates (u16)
Definition at line 171 of file iax2.h.
Referenced by iax_parse_ies().
#define IAX_IE_SERVICEIDENT 33 |
#define IAX_IE_TRANSFERID 27 |
Transfer Request Identifier -- int
Definition at line 157 of file iax2.h.
Referenced by iax2_start_transfer(), iax_parse_ies(), and try_transfer().
#define IAX_IE_USERNAME 6 |
Username (peer or user) for authentication - string
Definition at line 136 of file iax2.h.
Referenced by authenticate_request(), cache_get_callno_locked(), iax2_call(), iax2_do_register(), iax_parse_ies(), registry_authrequest(), registry_rerequest(), and update_registry().
#define IAX_IE_VARIABLE 52 |
Remote variables
Definition at line 183 of file iax2.h.
Referenced by iax2_call(), and iax_parse_ies().
#define IAX_IE_VERSION 11 |
Protocol version - short
Definition at line 141 of file iax2.h.
Referenced by cache_get_callno_locked(), iax2_call(), and iax_parse_ies().
#define IAX_LINGER_TIMEOUT 10 |
How long to wait before closing bridged call
Definition at line 126 of file iax2.h.
Referenced by iax2_bridge().
#define IAX_MAX_OSPBLOCK_NUM 4 |
Definition at line 191 of file iax2.h.
Referenced by iax_parse_ies(), and save_osptoken().
#define IAX_MAX_OSPBLOCK_SIZE 254 |
Max OSP token block size, 255 bytes - 1 byte OSP token block index
Definition at line 190 of file iax2.h.
Referenced by iax2_call(), and save_osptoken().
#define IAX_MAX_OSPBUFF_SIZE (IAX_MAX_OSPTOKEN_SIZE + 16) |
Definition at line 193 of file iax2.h.
Referenced by save_osptoken().
#define IAX_MAX_OSPTOKEN_SIZE (IAX_MAX_OSPBLOCK_SIZE * IAX_MAX_OSPBLOCK_NUM) |
Definition at line 192 of file iax2.h.
Referenced by iax2_call().
#define IAX_MAX_SHIFT 0x3F |
Definition at line 46 of file iax2.h.
Referenced by compress_subclass(), and uncompress_subclass().
#define IAX_META_TRUNK 1 |
Trunk meta-message
Definition at line 202 of file iax2.h.
Referenced by send_trunk(), and socket_process_meta().
#define IAX_META_TRUNK_MINI 1 |
This trunk frame contains trunked mini frames
Definition at line 206 of file iax2.h.
Referenced by send_trunk(), and socket_process_meta().
#define IAX_META_TRUNK_SUPERMINI 0 |
This trunk frame contains classic supermini frames
Definition at line 205 of file iax2.h.
Referenced by send_trunk(), and socket_process_meta().
#define IAX_PROTO_VERSION 2 |
Definition at line 27 of file iax2.h.
Referenced by cache_get_callno_locked(), check_access(), and iax2_call().
#define IAX_RATE_11KHZ (1 << 1) |
#define IAX_RATE_16KHZ (1 << 2) |
#define IAX_RATE_22KHZ (1 << 3) |
#define IAX_RATE_44KHZ (1 << 4) |
#define IAX_RATE_48KHZ (1 << 5) |
#define IAX_RATE_8KHZ (1 << 0) |
8khz sampling (default if absent)
Definition at line 208 of file iax2.h.
Referenced by dump_samprate(), and iax_parse_ies().
enum iax_frame_subclass |
Subclass for AST_FRAME_IAX
IAX_COMMAND_NEW | |
IAX_COMMAND_PING | |
IAX_COMMAND_PONG | |
IAX_COMMAND_ACK | |
IAX_COMMAND_HANGUP | |
IAX_COMMAND_REJECT | |
IAX_COMMAND_ACCEPT | |
IAX_COMMAND_AUTHREQ | |
IAX_COMMAND_AUTHREP | |
IAX_COMMAND_INVAL | |
IAX_COMMAND_LAGRQ | |
IAX_COMMAND_LAGRP | |
IAX_COMMAND_REGREQ |
Registration request |
IAX_COMMAND_REGAUTH |
Registration authentication required |
IAX_COMMAND_REGACK |
Registration accepted |
IAX_COMMAND_REGREJ |
Registration rejected |
IAX_COMMAND_REGREL |
Force release of registration |
IAX_COMMAND_VNAK |
If we receive voice before valid first voice frame, send this |
IAX_COMMAND_DPREQ |
Request status of a dialplan entry |
IAX_COMMAND_DPREP |
Request status of a dialplan entry |
IAX_COMMAND_DIAL |
Request a dial on channel brought up TBD |
IAX_COMMAND_TXREQ |
Transfer Request |
IAX_COMMAND_TXCNT |
Transfer Connect |
IAX_COMMAND_TXACC |
Transfer Accepted |
IAX_COMMAND_TXREADY |
Transfer ready |
IAX_COMMAND_TXREL |
Transfer release |
IAX_COMMAND_TXREJ |
Transfer reject |
IAX_COMMAND_QUELCH |
Stop audio/video transmission |
IAX_COMMAND_UNQUELCH |
Resume audio/video transmission |
IAX_COMMAND_POKE |
Like ping, but does not require an open connection |
IAX_COMMAND_PAGE |
Paging description |
IAX_COMMAND_MWI |
Stand-alone message waiting indicator |
IAX_COMMAND_UNSUPPORT |
Unsupported message received |
IAX_COMMAND_TRANSFER |
Request remote transfer |
IAX_COMMAND_PROVISION |
Provision device |
IAX_COMMAND_FWDOWNL |
Download firmware |
IAX_COMMAND_FWDATA |
Firmware Data |
IAX_COMMAND_TXMEDIA |
Transfer media only |
IAX_COMMAND_RTKEY |
Command to rotate key |
IAX_COMMAND_CALLTOKEN |
Call number token |
Definition at line 51 of file iax2.h.
00051 { 00052 IAX_COMMAND_NEW = 1, 00053 IAX_COMMAND_PING = 2, 00054 IAX_COMMAND_PONG = 3, 00055 IAX_COMMAND_ACK = 4, 00056 IAX_COMMAND_HANGUP = 5, 00057 IAX_COMMAND_REJECT = 6, 00058 IAX_COMMAND_ACCEPT = 7, 00059 IAX_COMMAND_AUTHREQ = 8, 00060 IAX_COMMAND_AUTHREP = 9, 00061 IAX_COMMAND_INVAL = 10, 00062 IAX_COMMAND_LAGRQ = 11, 00063 IAX_COMMAND_LAGRP = 12, 00064 /*! Registration request */ 00065 IAX_COMMAND_REGREQ = 13, 00066 /*! Registration authentication required */ 00067 IAX_COMMAND_REGAUTH = 14, 00068 /*! Registration accepted */ 00069 IAX_COMMAND_REGACK = 15, 00070 /*! Registration rejected */ 00071 IAX_COMMAND_REGREJ = 16, 00072 /*! Force release of registration */ 00073 IAX_COMMAND_REGREL = 17, 00074 /*! If we receive voice before valid first voice frame, send this */ 00075 IAX_COMMAND_VNAK = 18, 00076 /*! Request status of a dialplan entry */ 00077 IAX_COMMAND_DPREQ = 19, 00078 /*! Request status of a dialplan entry */ 00079 IAX_COMMAND_DPREP = 20, 00080 /*! Request a dial on channel brought up TBD */ 00081 IAX_COMMAND_DIAL = 21, 00082 /*! Transfer Request */ 00083 IAX_COMMAND_TXREQ = 22, 00084 /*! Transfer Connect */ 00085 IAX_COMMAND_TXCNT = 23, 00086 /*! Transfer Accepted */ 00087 IAX_COMMAND_TXACC = 24, 00088 /*! Transfer ready */ 00089 IAX_COMMAND_TXREADY = 25, 00090 /*! Transfer release */ 00091 IAX_COMMAND_TXREL = 26, 00092 /*! Transfer reject */ 00093 IAX_COMMAND_TXREJ = 27, 00094 /*! Stop audio/video transmission */ 00095 IAX_COMMAND_QUELCH = 28, 00096 /*! Resume audio/video transmission */ 00097 IAX_COMMAND_UNQUELCH = 29, 00098 /*! Like ping, but does not require an open connection */ 00099 IAX_COMMAND_POKE = 30, 00100 /*! Paging description */ 00101 IAX_COMMAND_PAGE = 31, 00102 /*! Stand-alone message waiting indicator */ 00103 IAX_COMMAND_MWI = 32, 00104 /*! Unsupported message received */ 00105 IAX_COMMAND_UNSUPPORT = 33, 00106 /*! Request remote transfer */ 00107 IAX_COMMAND_TRANSFER = 34, 00108 /*! Provision device */ 00109 IAX_COMMAND_PROVISION = 35, 00110 /*! Download firmware */ 00111 IAX_COMMAND_FWDOWNL = 36, 00112 /*! Firmware Data */ 00113 IAX_COMMAND_FWDATA = 37, 00114 /*! Transfer media only */ 00115 IAX_COMMAND_TXMEDIA = 38, 00116 /*! Command to rotate key */ 00117 IAX_COMMAND_RTKEY = 39, 00118 /*! Call number token */ 00119 IAX_COMMAND_CALLTOKEN = 40, 00120 };