HP-UX Java SIP Stack Programmer's Guide (February 2008)

Example 3-1 Setting the TRACE_LEVEL Stack Parameter
To set the TRACE_LEVEL stack parameter, set the property as follows:
prop.setProperty(com.hp.net.javax.sip.TRACE.LEVEL, 32);
4. Configure the SIP stack using the following method:
sipStack sipStack=sipFactory.createSipStack(prop);
Creating Instances of Factory Implementations
You must create instances of the factory implementations before you can create a SIP
message.
To create an instance of the address, header, and message factory implementations,
use the following methods:
HeaderFactory headerFactory = sipFactory.createHeaderFactory();
AddressFactory addressFactory = sipFactory.createAddressFactory();
MessageFactory messageFactory = sipFactory.createMessageFactory();
Creating an Instance of the SipProvider
Before creating an instance of a SipProvider, you must create a listening point that
represents a particular port, address, and transport. You can create a SipProvider
for a particular listening point.
Follow this procedure to create an instance of the SipProvider :
1. To create a listening point, use the following method:
sipStack.createListeningPoint("ipaddress", port, "transport");
Example 3-2 Sample Method for Creating a Listening Point
Following is a sample method for creating a listening point:
ListeningPoint udpListeningPoint
=sipStack.createListeningPoint(127.0.0.1, 5060, udp);
2. To create a SipProvider on a particular listening point, use the following method:
sipStack.createSipProvider(ListeningPoint);
Example 3-3 Creating a SipProvider
Following is a sample method to create a SipProvider:
SipProvider provider=sipStack.createSipProvider(udpListeningPoint);
52 Creating an Application