Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/lib/rex/proto/iax2/constants.rb
Views: 11704
# -*- coding: binary -*-1module Rex2module Proto3module IAX24module Constants567IAX2_DEFAULT_PORT = 45698910IAX_TYPE_VOICE = 211IAX_TYPE_CONTROL = 412IAX_TYPE_IAX = 613IAX_TYPE_DTMF_BEGIN = 114IAX_TYPE_DTMF_END = 121516IAX_CTRL_HANGUP = 117IAX_CTRL_RINGING = 318IAX_CTRL_ANSWER = 419IAX_CTRL_BUSY = 520IAX_CTRL_PROGRESS = 1421IAX_CTRL_PROCEED = 152223=begin24+-------------+---------------+-------------------------------------+25| VALUE | Name | Description |26+-------------+---------------+-------------------------------------+27| 0x01 | Hangup | The call has been hungup at the |28| | | remote end |29| | | |30| 0x02 | Reserved | Reserved for future use |31| | | |32| 0x03 | Ringing | Remote end is ringing (ring-back) |33| | | |34| 0x04 | Answer | Remote end has answered |35| | | |36| 0x05 | Busy | Remote end is busy |37| | | |38| 0x06 | Reserved | Reserved for future use |39| | | |40| 0x07 | Reserved | Reserved for future use |41| | | |42| 0x08 | Congestion | The call is congested |43| | | |44| 0x09 | Flash Hook | Flash hook |45| | | |46| 0x0a | Reserved | Reserved for future use |47| | | |48| 0x0b | Option | Device-specific options are being |49| | | transmitted |50| | | |51| 0x0c | Key Radio | Key Radio |52| | | |53| 0x0d | Unkey Radio | Unkey Radio |54| | | |55| 0x0e | Call Progress | Call is in progress |56| | | |57| 0x0f | Call | Call is proceeding |58| | Proceeding | |59| | | |60| 0x10 | Hold | Call is placed on hold |61| | | |62| 0x11 | Unhold | Call is taken off hold |63+-------------+---------------+-------------------------------------+64=end656667IAX_SUBTYPE_NEW = 168IAX_SUBTYPE_PING = 269IAX_SUBTYPE_PONG = 370IAX_SUBTYPE_ANSWER = 471IAX_SUBTYPE_ACK = 472IAX_SUBTYPE_HANGUP = 573IAX_SUBTYPE_REJECT = 674IAX_SUBTYPE_ACCEPT = 775IAX_SUBTYPE_AUTHREQ = 876IAX_SUBTYPE_AUTHREP = 977IAX_SUBTYPE_INVAL = 1078IAX_SUBTYPE_LAGRQ = 1179IAX_SUBTYPE_LAGRP = 1280IAX_SUBTYPE_REGREQ = 1381IAX_SUBTYPE_REGAUTH = 1482IAX_SUBTYPE_REGACK = 1583IAX_SUBTYPE_REGREJ = 1684IAX_SUBTYPE_REGREL = 1785IAX_SUBTYPE_VNAK = 188687=begin88+------+-----------+-----------------------------------------+89| Hex | Name | Description |90+------+-----------+-----------------------------------------+91| 0x01 | NEW | Initiate a new call |92| | | |93| 0x02 | PING | Ping request |94| | | |95| 0x03 | PONG | Ping or poke reply |96| | | |97| 0x04 | ACK | Explicit acknowledgment |98| | | |99| 0x05 | HANGUP | Initiate call tear-down |100| | | |101| 0x06 | REJECT | Reject a call |102| | | |103| 0x07 | ACCEPT | Accept a call |104| | | |105| 0x08 | AUTHREQ | Authentication request |106| | | |107| 0x09 | AUTHREP | Authentication reply |108| | | |109| 0x0a | INVAL | Invalid message |110| | | |111| 0x0b | LAGRQ | Lag request |112| | | |113| 0x0c | LAGRP | Lag reply |114| | | |115| 0x0d | REGREQ | Registration request |116| | | |117| 0x0e | REGAUTH | Registration authentication |118| | | |119| 0x0f | REGACK | Registration acknowledgement |120| | | |121| 0x10 | REGREJ | Registration reject |122| | | |123| 0x11 | REGREL | Registration release |124| | | |125| 0x12 | VNAK | Video/Voice retransmit request |126| | | |127| 0x13 | DPREQ | Dialplan request |128| | | |129| 0x14 | DPREP | Dialplan reply |130| | | |131| 0x15 | DIAL | Dial |132| | | |133| 0x16 | TXREQ | Transfer request |134| | | |135| 0x17 | TXCNT | Transfer connect |136| | | |137| 0x18 | TXACC | Transfer accept |138| | | |139| 0x19 | TXREADY | Transfer ready |140| | | |141| 0x1a | TXREL | Transfer release |142| | | |143| 0x1b | TXREJ | Transfer reject |144| | | |145| 0x1c | QUELCH | Halt audio/video [media] transmission |146| | | |147| 0x1d | UNQUELCH | Resume audio/video [media] transmission |148| | | |149| 0x1e | POKE | Poke request |150| | | |151| 0x1f | Reserved | Reserved for future use |152| | | |153| 0x20 | MWI | Message waiting indication |154| | | |155| 0x21 | UNSUPPORT | Unsupported message |156| | | |157| 0x22 | TRANSFER | Remote transfer request |158| | | |159| 0x23 | Reserved | Reserved for future use |160| | | |161| 0x24 | Reserved | Reserved for future use |162| | | |163| 0x25 | Reserved | Reserved for future use |164+------+-----------+-----------------------------------------+165=end166167IAX_IE_CALLED_NUMBER = 1168IAX_IE_CALLING_NUMBER = 2169IAX_IE_AUTH_METHODS = 3170IAX_IE_CALLING_NAME = 4171IAX_IE_USERNAME = 6172IAX_IE_DESIRED_CODEC = 9173IAX_IE_ORIGINAL_DID = 10174IAX_IE_ACTUAL_CODECS = 8175IAX_IE_PROTO_VERSION = 11176IAX_IE_REG_REFRESH = 19177IAX_IE_CHALLENGE_DATA = 15178IAX_IE_CHALLENGE_RESP = 16179IAX_IE_APPARENT_ADDR = 18180IAX_IE_REGREJ_CAUSE = 22181IAX_IE_HANGUP_CAUSE = 42182183=begin184+------+----------------+-------------------------------------------+185| HEX | NAME | DESCRIPTION |186+------+----------------+-------------------------------------------+187| HEX | NAME | DESCRIPTION |188| 0x01 | CALLED NUMBER | Number/extension being called |189| 0x02 | CALLING NUMBER | Calling number |190| 0x03 | CALLING ANI | Calling number ANI for billing |191| 0x04 | CALLING NAME | Name of caller |192| 0x05 | CALLED CONTEXT | Context for number |193| 0x06 | USERNAME | Username (peer or user) for |194| | | authentication |195| 0x07 | PASSWORD | Password for authentication |196| 0x08 | CAPABILITY | Actual CODEC capability |197| 0x09 | FORMAT | Desired CODEC format |198| 0x0a | LANGUAGE | Desired language |199| 0x0b | VERSION | Protocol version |200| 0x0c | ADSICPE | CPE ADSI capability |201| 0x0d | DNID | Originally dialed DNID |202| 0x0e | AUTHMETHODS | Authentication method(s) |203| 0x0f | CHALLENGE | Challenge data for MD5/RSA |204| 0x10 | MD5 RESULT | MD5 challenge result |205| 0x11 | RSA RESULT | RSA challenge result |206| 0x12 | APPARENT ADDR | Apparent address of peer |207| 0x13 | REFRESH | When to refresh registration |208| 0x14 | DPSTATUS | Dialplan status |209| 0x15 | CALLNO | Call number of peer |210| 0x16 | CAUSE | Cause |211| 0x17 | IAX UNKNOWN | Unknown IAX command |212| 0x18 | MSGCOUNT | How many messages waiting |213| 0x19 | AUTOANSWER | Request auto-answering |214| 0x1a | MUSICONHOLD | Request musiconhold with QUELCH |215| 0x1b | TRANSFERID | Transfer Request Identifier |216| 0x1c | RDNIS | Referring DNIS |217| 0x1d | Reserved | Reserved for future use |218| 0x1e | Reserved | Reserved for future use |219| 0x1f | DATETIME | Date/Time |220| 0x20 | Reserved | Reserved for future use |221| 0x21 | Reserved | Reserved for future use |222| 0x22 | Reserved | Reserved for future use |223| 0x23 | Reserved | Reserved for future use |224| 0x24 | Reserved | Reserved for future use |225| 0x25 | Reserved | Reserved for future use |226| 0x26 | CALLINGPRES | Calling presentation |227| 0x27 | CALLINGTON | Calling type of number |228| 0x28 | CALLINGTNS | Calling transit network select |229| 0x29 | SAMPLINGRATE | Supported sampling rates |230| 0x2a | CAUSECODE | Hangup cause |231| 0x2b | ENCRYPTION | Encryption format |232| 0x2c | ENCKEY | Reserved for future Use |233| 0x2d | CODEC PREFS | CODEC Negotiation |234| 0x2e | RR JITTER | Received jitter, as in RFC 3550 |235| 0x2f | RR LOSS | Received loss, as in RFC 3550 |236| 0x30 | RR PKTS | Received frames |237| 0x31 | RR DELAY | Max playout delay for received frames in |238| | | ms |239| 0x32 | RR DROPPED | Dropped frames (presumably by jitter |240| | | buffer) |241| 0x33 | RR OOO | Frames received Out of Order |242| 0x34 | OSPTOKEN | OSP Token Block |243+------+----------------+-------------------------------------------+244=end245246247# Codecs248IAX_CODEC_G711_MULAW = 0x00000004249IAX_CODEC_G711_ALAW = 0x00000008250IAX_CODEC_LINEAR_PCM = 0x00000040251252# Supported253IAX_SUPPORTED_CODECS = IAX_CODEC_G711_MULAW | IAX_CODEC_G711_ALAW | IAX_CODEC_LINEAR_PCM254255# Default timings256IAX_DEFAULT_REG_REFRESH = 60257IAX_DEFAULT_TIMEOUT = 10258259260end261end262end263end264265266