Difference between revisions of "AlphaCom SIP interface"
From Zenitel Wiki
(→trace and debug) |
|||
Line 79: | Line 79: | ||
: l: list active calls | : l: list active calls | ||
: h: This text | : h: This text | ||
+ | |||
+ | == SIP protocol operation == | ||
+ | Consult RFC 3261 for description of SIP, and RFC 4566 on SDP. (http://tools.ietf.org/html/rfc3261 / http://tools.ietf.org/html/rfc4566 ). Important concepts as SIP transactions, Cseq, SIP dialog and SIP call-ID should be looked up here. | ||
+ | |||
+ | This chapter comments on how AlphaCom supports SIP, and about limitations. | ||
+ | |||
+ | First some general comments. | ||
+ | |||
+ | SIP Transport: SIPd supports only SIP over UDP, and receives only on UDP port 5060. | ||
+ | |||
+ | SIP URI usage: SIPd assumes the user part of URIs specify a phone/directory number. | ||
+ | |||
+ | SIPd does currently not support domain names in SIP URIs (AlphaCom does not contain a DNS resolver). | ||
+ | |||
+ | SIPd currently ignores SIP responses not related to INVITE. | ||
+ | |||
+ | === REGISTER === | ||
+ | Example of an REGISTER transaction from a SIP phone with address 169.254.1.101. | ||
+ | |||
+ | REGISTER sip:169.254.1.5 SIP/2.0 | ||
+ | Via: SIP/2.0/UDP 169.254.1.101:62952;branch=z9hG4bK15fdffffcbd50000 | ||
+ | From: <"Smith, J" sip:52304@169.254.1.5;user=phone>;tag=093400009879ffff | ||
+ | To: <sip:'''52304'''@169.254.1.5;user=phone> | ||
+ | Contact: <sip:'''52304'''@'''169.254.1.101:62952''';user=phone> | ||
+ | Call-ID: 5099ffffa1ccffff@169.254.1.101 | ||
+ | CSeq: 260 REGISTER | ||
+ | Expires: 3600 | ||
+ | User-Agent: ImaginarySoft ImaginaryPhone 0.0.0.1 | ||
+ | Max-Forwards: 70 | ||
+ | Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE | ||
+ | Content-Length: 0 | ||
+ | |||
+ | The important header fields are To: and Contact: | ||
+ | |||
+ | The To: header must match a directory number defined in the AlphaCom. The user-name part of the SIP URI (before @) must be equal to the directory number in question. | ||
+ | |||
+ | The Contact: header gives the addess where the phone can receive calls. ”:62952” in this example is the UDP port used by this SIP UserAgent. SIPd (since version 01.02) handles registrations from any UPD port. If the port number is not present in the URI, default SIP port 5060 is assumed. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Revision as of 13:33, 8 August 2007
Contents
SIPd Overview
The SIPd is a signalling gateway. It handles call setup and termination requests and does the necessary conversions between the AlphaNet and SIP protocols.
The SIPd runs on the AMC IP. It is connected to one AlphaCom running on the same AMC IP. All requests from AMC stations are received via this AlphaCom node.
The intended usage of SIPd is that it forwards calls to and from SIP phones. SIP phones may be controlled by an external SIP proxy server, such as Cisco Call Manager. Or to interface to POTS or ISDN telephone systems via a SIP gateway.
For sites that do not have a separate SIP proxy server, it is possible to connect the SIP phones directly to SIPd.
Once a call is established, the RTP media flows directly between the AlphaCom and the SIP phones, without any involvement from SIPd.
Function
Overview
The SIPd is configured as a collection of one or more virtual AlphaNet nodes.
Each virtual AlphaNet node gives the IP address of a SIP device. The SIP device can be a SIP proxy server, in turn handling a number of SIP phones. Or it can be one single SIP phone. AlphaCom does not really care about the difference.
SIPd can also act a registrar and proxy server for SIP phones. In that case the IP address of the virtual AlphaNet node is set to be the same as the hosting AlphaCom. The directory numbers of the SIP phones are entered into AlphaPro as remote AlphaNet numbers pointing to the Registar node. SIPd will accept registrations from stations with number found in this list of directory numbers. The IP address and UDP port of the station is stored in a database.
Call setups from AlphaNet nodes are targeted towards one of the virtual AlphaNet nodes. This is performed in two steps:
- The AlphaCom looks up the dialled number and finds the destination and link node in its Directory Table and Data Routing Table.
- The SIPd looks up the configuration for that Virtual node
- a. If the node is set up as proxy/registrar, look up the IP address and UDP port of the phone in the registrar base
- b. Otherwise use the IP address of the target SIP proxy in its Virtual Node Table.
Configuration handling
The SIPd Virtual Node Table is configured via AlphaPro
Corresponding number series and node definitions must be configured in the AlphaCom Directory Table and Data Routing Table by using AlphaPro. AMCD transfers the configuration relevant to SIPd in a text file, /tmp/sipd_config.
Calls
The SIPd supports 32 simultaneous calls.
The SIPd only supports audio calls.
SIPd supports SIP phones with auto-answer (results in different SIP signalling with no 180 Ringing messsages).
3 examples of SIP phones tested successfully with SIPd:
- SIP phone terminals (e.g. Grandstream BudgeTone 100)
- Analog phones connected to a SIP analog/SIP adapter (e.g. Grandstream HandyTone)
- SIP softphones (e.g. X-Lite)
Codec negotiation
The SIPd is responsible for codec negotiation. It analyses the codec lists received in the AlphaNet messages and the SDP payload from the SIP messages. If a codec match is found, the call is established, otherwise it is terminated.
The SDP protocol only describes codec capabilities. It is really not a negotiation protocol. SDP allows SIP phones to use any matching codec. However, the SIPd will always pick one and only one codec, which is the first matching codec in the codec lists.
Note! SIP phones that do not use the first matching codec from the codec lists are not supported by SIPd. The AlphaCom can be configured to only send one codec in its codec list. Then this problem will not occur.
Overlapped dialling
In SIP, overlapped dialling means that each digit is forwarded as the user dials it. SIPd supports overlapped dialling. Single digits can be sent and received using the SIP INFO method. Digit transport in RTP (RFC2833) is currently not supported.
The AlphaCom can also be configured to handle the collection of all digits dialled from an AMC station, and waits until it is complete before forwarding the call to SIPd.
Logging
trace and debug
The SIPd offers runtime trace and debug logging by using specific command line options. This is intended for debug and on-site trouble shooting.
The trace-interface is found as an internal unix-socket in AMC: “/tmp/sipd_trace”. Log in via telnet (user: alpha; password: com), and type:
- tst -s /tmp/sipd_trace
A few simple input commands are implemented, type single letters;
- 0,1,2,3,4,5,6,7: Set tracelevel.
- 0: Fatal errors only
- 4: SIP/AlphaNet message trace (default)
- 7: All internal debug trace also
- l: list active calls
- h: This text
SIP protocol operation
Consult RFC 3261 for description of SIP, and RFC 4566 on SDP. (http://tools.ietf.org/html/rfc3261 / http://tools.ietf.org/html/rfc4566 ). Important concepts as SIP transactions, Cseq, SIP dialog and SIP call-ID should be looked up here.
This chapter comments on how AlphaCom supports SIP, and about limitations.
First some general comments.
SIP Transport: SIPd supports only SIP over UDP, and receives only on UDP port 5060.
SIP URI usage: SIPd assumes the user part of URIs specify a phone/directory number.
SIPd does currently not support domain names in SIP URIs (AlphaCom does not contain a DNS resolver).
SIPd currently ignores SIP responses not related to INVITE.
REGISTER
Example of an REGISTER transaction from a SIP phone with address 169.254.1.101.
REGISTER sip:169.254.1.5 SIP/2.0 Via: SIP/2.0/UDP 169.254.1.101:62952;branch=z9hG4bK15fdffffcbd50000 From: <"Smith, J" sip:52304@169.254.1.5;user=phone>;tag=093400009879ffff To: <sip:52304@169.254.1.5;user=phone> Contact: <sip:52304@169.254.1.101:62952;user=phone> Call-ID: 5099ffffa1ccffff@169.254.1.101 CSeq: 260 REGISTER Expires: 3600 User-Agent: ImaginarySoft ImaginaryPhone 0.0.0.1 Max-Forwards: 70 Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE Content-Length: 0
The important header fields are To: and Contact:
The To: header must match a directory number defined in the AlphaCom. The user-name part of the SIP URI (before @) must be equal to the directory number in question.
The Contact: header gives the addess where the phone can receive calls. ”:62952” in this example is the UDP port used by this SIP UserAgent. SIPd (since version 01.02) handles registrations from any UPD port. If the port number is not present in the URI, default SIP port 5060 is assumed.