> I am new to JAIN, so I do not know how to simulate a SIP application in 
one
> computer? I tried to create 2 SipProvider, but still it did not work.
> 
> Is there any suggestions?

You want to create two ListeningPoints via 
SipStack.createListeningPoint(int, String). The int parameter is the port 
number to use, and you'll need two separate ones. Then, for each 
ListeningPoint, create a SipProvider via 
SipStack.createSipProvider(ListeningPoint).  Use these two providers to 
simulate SIP messages between two different systems.  Vaguely:

ListeningPoint fromListeningPoint
= stack.createListeningPoint(fromPort, transportType);
SipProvider fromProvider
= stack.createSipProvider(fromListeningPoint);

ListeningPoint toListeningPoint
= stack.createListeningPoint(toPort, transportType);
SipProvider toProvider
= stack.createSipProvider(toListeningPoint);

One thing, to send messages from one provider to another, you'll need to 
make sure that your from and to addresses have the correct port 
information.  This will look something like:

SipUri from = addressFactory.createSipUri("fromUser","fromHost");
from.setPort( fromProvider.getListeningPoint().getPort() );

SipUri to = addressFactory.createSipUri("toUser","toHost");
to.setPort( toProvider.getListeningPoint().getPort() );

Double check the APIs to make sure that these are the right method 
names/parameters/etc.  There's still some digging around in the APIs that 
you'll need to do-- none of that code usable after a cut 'n' paste.

Hope that helps,
Rhys
__________________________________
Rhys Ulerich
Industry Solutions Software Development
Email: [EMAIL PROTECTED]  Office: 512-828-1428
IBM Software Group - Austin, TX

_______________________________________________
Sip-implementors mailing list
[EMAIL PROTECTED]
http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors

Reply via email to