All SIP phone calls consist of messaging for call setup and media for the actual audio.
SIP Messaging is carried using UDP or TCP (normally UDP) SIP packets – It is used for device registration, call setup/teardown, on-hold notification, call transfers, DTMF signals. Typically the PBX Server is expecting to receive SIP messages on port 5060, so the PBX Server must be able to receive these packets, requiring accurate firewall configuration to allow this. Typically a SIP Phone will first register with the PBX Server with a SIP message to port 5060 on the PBX Server, indicating inside this registration message the port number which it is expecting to receive calls on. When the PBX Server needs to forward a call to the SIP Phone, it will start the conversation with a SIP message to the port specified by the SIP Phone in the registration message.
SIP Media, typically audio, are carried using UDP RTP packets – used to send the actual media for the call, including audio, video, DTMF signals (as a special media type, or embedded in-audio).
SIP Request Messages
Request messages, submitted using one of the SIP Methods listed below.
ACK – Used to reply to a SIP Status message in the range 200-699 while in a SIP INVITE dialog.
BYE – Used to end an already-established session, such as a SIP INVITE-based call.
CANCEL – Used to cancel a request (such as an INVITE or call request that is still in progress but unanswered)
INFO – Used to provide additional signaling, not necessarily related to a call in progress. SIP INFO Messages are typically used to provide notification of DTMF strokes (even though RFC 2833 type notifications are preferred), and is also one method used to establish MWI (message waiting indicator) functionality to SIP phones.
INVITE – Used to initiate a session dialog – typically to set up a phone call
NOTIFY – Used by the PBX Server to communicate statistics, typically to a SIP phone. Transferring of one leg of a call from one endpoint to another may be signaled using this SIP Request, within the context of a SIP REFER dialog. MWI information can also be delivered in this way. Normally a SIP Phone would have previously established a SIP dialog using a SIP SUBSCRIBE request, and the SIP NOTIFY messages would be delivered within the context of this dialog. Note however that some SIP Phones do not establish a dialog in this way, and expect to receive SIP NOTIFY messages “out-of-dialog”. Note also that some SIP Phones may attempt to establish a SIP dialog with SIP SUBSCRIBE using incorrect methodology (GrandStream GXP-2000 being a typical example), and working (if not entirely correct) functionality can be achieved with such devices if they can be configured to NOT attempt a SIP SUBSCRIBE.
OPTIONS – Used by a SIP client to query another SIP client or SIP proxy (such as the 3CX PBX Server) about its capabilities to discover information about the supported methods, content types, extensions, codecs, and so on, prior to, for example, establishing a call using the SIP INVITE method.
PRACK – Not used in 3CX Phone System
REFER – Used by a SIP client to subscribe for notification of changes in call flow, for instance. Typically seen when a phone requests to transfer a call to another party.
REGISTER – Used to register or unregister a SIP user-agent with a SIP registrar. An unREGISTERed phone CANNOT receive a SIP INVITE Request to receive a call.
SUBSCRIBE – Used by a SIP Phone to establish a SIP dialog for receiving statistics. A typical example is MWI information for the phone’s configured Extension Number.
UPDATE – Not used in 3CX Phone System
SIP Status messages
100-199 – Used to indicate a temporary status, such as “100 Trying” or “180 Ringing”
200-299 – Used to indicate a final success status, such as “200 OK”
300-399 – Used to indicate a final failure status, but with information about the user’s new location, or about alternative services that might be able to answer the call. These are typical responses generated by SIP phones when the “Forward All Calls” or “Do Not Disturb” features (on the phone) are enabled.
400-499 – Used to indicate a final error status, but local to the SIP Proxy generating this message – indicating that it may be possible that some other SIP Proxy may be in a position to successfully handle the request.
500-599 – Used to indicate that the PBX Server has encountered an internal error. Examples are “500 Server Internal Error” and “501 Not Implemented”
600-699 – Used to indicate a final error status, and that this status is global in nature – indicating that the request will in no case be able to be handled by some other SIP Proxy.