Re: SipProvider.addSipListener()

"M. Rangnathan" <[email protected]>
Newsgroups gmane.comp.voip.nist-sip
Message-ID <[email protected]>
[email protected] wrote:

>What is the reasoning behind 1 sip listener per stack?  Seems that in
>other stacks (TCP stacks for example) that I can have different
>listeners on different ports and they're independent of each other.  Why
>isn't this the case in the SIP stack?
>  
>

You can always multiplex requests out of a single listener. To have 
multiple listeners per stack is not necessary. We did things this way to 
avoid complicated specifications about how the listeners would interact 
and behave concurrently. If you want such concurrent operation in your 
application, you should be using a container such as a sip servlet or jslee.

>I'm also confused why, in 1.2, there will be 1 sip stack (presumably
>over all ip's in a JVM). 
>

For backwards compatibility you can specify an IP address in the 
configuration properties of the stack and you will then have your stack 
associated with that address.  You will then be able to create multiple 
stacks per jvm with each having its own ip address. This all still works 
However, this property is deprecated. In 1.2 the preferred way is not to 
have the stack be associated with an IP address but only with the 
listening point. You have a SINGLE stack instance per vendor per jvm and 
create listening points for different IP addresses.

The reasoning behind this design change was to allow dialogs with 
different IP addresses ( i.e. different network adaptors) within a 
single stack.


> I presume this hasn't been implemented in 1.2
>yet as I was able to create 2 sip stacks for different IPs (localhost
>and external).  If I won't be able to do this in the future, it is
>absolutely vital that I be able to specify multiple listeners for a
>given stack (specifically for Unit Testing which needs to mimic a sip
>phone for example within the same jvm as the Class Under Test (which is
>running it's own sip listeners)).  
>  
>
>Thanks for the explanation
>Andy Ochsner
>
>-----Original Message-----
>From: M. Rangnathan [mailto:[email protected]] 
>Sent: Tuesday, February 28, 2006 11:54 AM
>To: Ochsner,AM,Andrew,XCB5 R
>Cc: [email protected]
>Subject: Re: [nist-sip] SipProvider.addSipListener()
>
>Andy,
>
>You can have only one sip listener per stack. You can have multiple 
>stacks in v1.1 ( but only one in v1.2 of the spec).
>
>
>Regards
>
>
>Ranga
>
>
>[email protected] wrote:
>
>  
>
>>Ok so I'm stuck here. I am trying to use SipUnit to test a module that
>>    
>>
>
>  
>
>>also uses nist-sip. Since they are both running on the same IP, it 
>>seems that nist-sip reuses the SipStack, which seems fair. However, in
>>    
>>
>
>  
>
>>my module I create a SipProvider and SipUnit also creates a 
>>SipProvider. Both need SipListeners attached but I get a 
>>TooManyListenersException. These are <different> SipProvider objects, 
>>but when it iterates through the SipStack's providers when adding a 
>>new listener, it seems to make sure that ALL SipProviders only use the
>>    
>>
>
>  
>
>>same SipListener.
>>
>>I would have thought that each SipProvider could have it's own 
>>SipListener (but only 1).
>>
>>
>>Am I doing something wrong or is there a better approach? Or do I have
>>    
>>
>
>  
>
>>to run my module in a different JVM?
>>
>>Andy Ochsner
>>
>>--If you think something's supposed to be difficult, you're less 
>>likely to notice if you're doing it wrong.
>>
>>-----------------------------------------------------------------------
>>    
>>
>-
>  
>
>>_______________________________________________
>>nist-sip mailing list
>>[email protected]
>>http://www-x.antd.nist.gov/mailman/listinfo/nist-sip
>> 
>>
>>    
>>
>
>
>
>  
>


-- 
M. Ranganathan 

Advanced Networking Technologies Division,
National Institute of Standards and Technology (NIST),
100 Bureau Drive, Stop 8920, Gaithersburg, MD 20899. 
tel:301 975 3664 , fax:301 590 0932 http://w3.antd.nist.gov/
Advanced Networking Technologies For the People!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.