Hi Ramon,
Probably your best option for asynchronous handling is to use your own
SipStack class that extends org.cafesip.sipunit.SipStack and override the
processRequest() method to check for and process an OPTIONS request if the
received request is OPTIONS, else call super.processRequest(request).
Depending on your situation, it may be that you can use a SipPhone, calling
its listenRequestMessage() once and call its waitRequest(timeout) whenever
your program can go idle for some time ('timeout' amount of time). The
waitRequest() method will block your program ONLY IF no request has come in
since the last time you called it. Received requests are queued up
(beginning with the call to listenRequestMessage()), so if the queue has
something in it when you call waitRequest(), then waitRequest() returns
immediately with the first one in the queue.
Hope this helps-
Becky
On Thu, Oct 8, 2009 at 8:39 AM, Ramon Poca <[email protected]> wrote:
> Hi!
>
> I've been using sipunit to test our B2BUA and related systems. One of
> the things I'd like to do is to listen for incoming OPTIONS requests
> (like those sent by NAT proxy modules) and answer them.
>
> Could this be done? Could this be done ASYNCHRONOUSLY?
>
> Regards,
>
>
> --
> *Ramon Poca*
> [email protected] <mailto:[email protected]>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Cafesip-sipunit mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cafesip-sipunit
>
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Cafesip-sipunit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cafesip-sipunit