Service Discovery for SIP & IAX using Bonjour
Telephony Software Architecture Document
This paper discusses how Bonjour Service Discovery can be used to advertise SIP and IAX based VoIP services for automatic discovery by SIP and IAX devices thereby avoiding the need for device provisioning.
Background
Bonjour is a cross-platform technology pioneered by Apple which allows networking without requiring network configuration. It is based entirely on existing IETF networking standards, in particluar Zero Configuration Networking (Zeroconf), Multicast DNS (mDNS) and DNS Service Discovery (DNS-SD).
Bonjour provides two general functions:
- Link local addressing
- LAN and WAN Service discovery
Link local addressing is the ability of a device to safely self-assign an IP address in the absence of any other method of address assignment. Service discovery is the ability of a device offering a service to advertise that service along with any required service parameters and a device requiring a service to discover that service and to obtain any advertised service parameters, in the case of Bonjour without any prior configuration.
Bonjour and VoIP
Bonjour is most widely used in network printing where it has become the de-facto standard. Most networked printers and print servers sold today use Bonjour to advertise their print services on the LAN for desktop or notebook computers to discover them and automatically obtain any parameters which may be required for printing.
However, Bonjour is not limited to printing. It is designed to advertise any type of network service. A large number of service types have been registered and are being advertised and discovered using Bonjour, including VoIP services, in particular H.323, IAX, iChat AV, SIP and Skype.
The use of Bonjour for SIP and IAX was first introduced by Sunrise Telephone Systems in 2005 releasing a free plugin which enables the Asterisk telephony server to advertise its SIP and IAX services. This technology was jointly presented by Apple and Sunrise at O'Reilly's Emerging Telephony Conference in 2006 and has since received interest from SIP device manufacturers and the SIP standardisation group at the IETF.
DNS SRV Service Types Registered for SIP and IAX
The following DNS SRV service type entries for SIP and IAX have been registered:
SIP Service Type
sip Session Initiation Protocol, signalling protocol for VoIP
Protocol Description: http://www.ietf.org/rfc/rfc3261.txt (work in progress)
Primary Transport Protocol: UDP
Defined TXT keys:
sipver SIP version
sipstd RFC number of SIP standard to comply with
auth plaintext | md5 | rsakeys (reserved for future use)
userid alphanumeric, additionally '_', '+', '-' (will change to UTF-8)
secret any printable ASCII characters
realm SIP realm (see RFC3261)
fromuser username for SIP "from" header (see RFC3261)
fromdomain domain for SIP "from" header (see RFC3261)
registrar SIP registrar (see RFC3261)
proxy SIP proxy (see RFC3261)
natproxy SIP proxy for NATed clients
outproxy outbound SIP proxy (see RFC3261)
stunserver STUN server DNS name or IP address
contact SIP URI (see RFC3261)
dtmfmode inband | rfc2833 | sipinfo
welcome SIP URI (see RFC3261)
voicemail SIP URI (see RFC3261)
reception SIP URI (see RFC3261)
echotest SIP URI (see RFC3261)
ivrtest SIP URI (see RFC3261)
Further TXT record keys may be added in the future.
IAX Service Type
iax Inter Asterisk eXchange, ease-of-use NAT friendly open VoIP protocol
Protocol Description: http://www.cornfed.com/iax.pdf (work in progress)
Primary Transport Protocol: UDP
Defined TXT keys:
auth plaintext | md5 | rsakeys
userid alphanumeric, additionally '_', '+', '-'
secret any printable ASCII characters
domain any DNS domain name or IP address
extension alphanumeric, additionally '*', '#', '_', '+', '-'
context alphanumeric, additionally '_', '+', '-'
trunk yes | no | 0 | 1
welcome alphanumeric, additionally '*', '#', '_', '+', '-'
voicemail alphanumeric, additionally '*', '#', '_', '+', '-'
reception alphanumeric, additionally '*', '#', '_', '+', '-'
echotest alphanumeric, additionally '*', '#', '_', '+', '-'
ivrtest alphanumeric, additionally '*', '#', '_', '+', '-'
All of these TXT record keys are optional, they may be omitted.
Further keys may be added in the future.
Usage Scenarios
A SIP or IAX device such as an IP phone or analog telephone adapter supporting Bonjour will be able to discover a SIP or IAX service offered and advertised by a telephony server and obtain all required service parameters to configure itself to sign on to the respective service. Consider the following two scenarios:
- A public WiFi hotspot in a hotel or cafe offering walk-in VoIP service
- A large deployment of IP deskphones in a corporate office environment
In the case of a WiFi hotspot, the telephony server run by the hotspot operator will advertise its service and walk-in customers will be able to discover this service through a service browser on their WiFi IP phone or an IP softphone application running on their notebook and select it for the phone to configure itself and login to the service accordingly. In the case of a hotel, the user may then first be connected to the reception desk to identify himself in order to have all payable services billed to his hotel room if he is a guest or to a credit card otherwise. In other cases an IVR system may take credit card details or a voucher that was purchased at location.
In the case of a corporate deployment, all services may be configured to not require a password to connect to the corporate PBX and instead each employee will authenticate himself when he starts his working day by dialing a certain code and enter a PIN number, then dialing a certain code to log out at the end of the day. Username and password will not be required during the deployment process but all other service parameters are automatically obtained by all IP phones via Bonjour. Should the configuration on the corporate PBX change, all IP phones will automatically pick up the new service parameters and no maintentance to reconfigure the phones will be necessary. An additional benefit of such an arrangement will be free seating, that is any employee can be at any desk and log in to his own phone account and extension on any phone.
Libraries
Further Reading on Bonjour Service Discovery
