becky mcelroy | 25 Jun 2012 06:13

SipUnit 2.0.0 released ... and announcing new SipUnit project leadership

June 24, 2012,
Raleigh, NC.

We are pleased to announce the public release of SipUnit 2.0.0. This is a
stable release with technology updates, new functionality and extensive
testing performed. Feedback from the development community is encouraged
for further enhancing the system.

In addition, we are pleased to announce that SipUnit leadership is changing
hands - to TeleStax, Inc. <http://telestax.com/> The project will be led by
George Vagenas, a longtime contributor and core team member to Mobicents
and TeleStax, and who is already leading the CDI Telco Framework and SIP
Servlets Arquillian extension projects. The SipUnit source code and
documentation will soon be moved accordingly.

SipUnit provides a test environment geared toward unit testing SIP
applications. It extends the JUnit test framework to incorporate
SIP-specific assertions, and it provides a high-level API for performing
the SIP operations and messaging needed to interact with the application or
network element under test.

The following are the highlights of the release. Thanks to George Vagenas
for his recent major contributions to SipUnit and also to S. Pitucha for
contributing patches.

   1. MESSAGE handling has been added, including support for authentication
   and MESSAGE with or without an existing dialog.
   2. JUnit 4 support was added with static assertions in new SipAssert
   class.
   3. SipUnit is now mavenized!
(Continue reading)

becky mcelroy | 2 Dec 2010 04:27
Picon

Re: Regarding the header History-Info

Hi Mary Ann,

I think the reason you're not finding History-Info in SIPHeaderNames
is because that header didn't exist when the JAIN-SIP 1.2 spec was
created. Fortunately, you can easily create a custom header and add it
to a message if you need to as described in this mailing list post:

      https://jain-sip.dev.java.net/servlets/ReadMsg?listName=users&msgNo=1468

And if you receive a message with the custom header in it
(History-Info in your case), you should be able to get the header by
calling Message.getHeader("History-Info"). You'll get back an
ExtensionHeader
(http://hudson.jboss.org/hudson/job/jain-sip/lastSuccessfulBuild/artifact/javadoc/javax/sip/header/ExtensionHeader.html).
Check the methods on that class, but it looks like you'll have to
parse the value yourself, unless you can find a readymade History-Info
parser someone has written and kindly posted on the internet
somewhere. I would expect for your example trace below that the
ExtensionHeader.getValue() method will return this:
<sip:2001 <at> 172.19.34.205?reason=SIP%3bcause%3d302%3btext%3d%22Moved%20Temporarily%22>;index=1,<sip:4005 <at> 172.19.34.215>;index=1.1

Hope that helps-
Becky

On Wed, Dec 1, 2010 at 5:39 AM, ANN, MARY (MARY)** CTR **
<mary.ann <at> alcatel-lucent.com> wrote:
> Hi Becky,
>
> This is Mary Ann from Alcatel-Lucent chennai. Please find the chain mails
> that has been exchanged between Alcatel-Lucent Associates and you.
(Continue reading)

Guido Negro | 16 Jun 2010 12:25
Favicon

200 and 487 in a cancelled call

Hi,

I just experimented a problem using SIPUnit. I was testing repeatedly a cancelled call without answer
between 2 agents:

1) A calls B
2) B rings but doesn't answer
3) A cancels the call after a time
4) B manages incoming CANCEL properly

Traces seems to be fine: all requests and responses are sent and received correctly. (Both A and B go through
a VoIP provider that 'bridges' the call: it handles SIP signals on caller and callee legs separately).

Trace on A side (caller):

|Time     | 192.168.65.71                         | 192.168.125.154
|         |                                       |
|0.000    |         INVITE                        |SIP From: sip:A <at> provider.com To:sip:B <at> provider.com
|         |(5061)   ------------------>  (5060)   |
|0.000    |         100 Trying                    |SIP Status
|         |(5061)   <------------------  (5060)   |
|0.000    |         407 Proxy Auth Required       |SIP Status
|         |(5061)   <------------------  (5060)   |
|0.000    |         ACK                           |SIP Request
|         |(5061)   ------------------>  (5060)   |
|0.000    |         INVITE                        |SIP From: sip:A <at> provider.com To:sip:B <at> provider.com
|         |(5061)   ------------------>  (5060)   |
|0.000    |         100 Trying                    |SIP Status
|         |(5061)   <------------------  (5060)   |
|0.000    |         180 Ringing                   |SIP Status
(Continue reading)

becky mcelroy | 4 Mar 2010 14:19
Picon

Re: Regarding the header REASON and Methods UPDATE, PRACK, OPTION

Hi Mary Diana,

There are a few things to confirm on the first one:
- are you sure the last received response is what it should be? Call
assertResponseReceived() to check that. I'm seeing an immediate
improvement needed to SipUnit... currently that method just takes one
status code to check for, in your case it could be either 183 or 488.
There should be an additional signature for assertResponseReceived()
that takes a List of status codes, and the existing method changed to
call the new one. (would you mind submitting a SipUnit feature request
for this?)
- if the above is ok - is it possible that there are multiple Reason
headers in the message? The getHeader() call will just give you the
first one. (Of course, it could be that mul;tiple ones would be a
failure...) But you can call assertHeaderContains() to do the check
for you (these SIP assert methods are in SipTestCase class, recently
I've updated SipUnit for JUnit 4 so next release there'll be an
additional class SipAssert with all the same methods as static). It
will find all the headers of that type and see if there's at least one
with the string you specify.
- looks like there's some extra whitespace in your reason.contains()
call - you should remove that whitespace.
- is it failing because of case sensitivity?
- turn on sipunit trace and eyeball the message to see what's there

On the second issue:
Adding those into the high level SipCall class are on the TODO list
(http://www.cafesip.org/projects/sipunit/release_notes.html). In the
meantime, you can use low level SipSession methods to do it - see
http://www.cafesip.org/projects/sipunit/user_guide.html#mozTocId784534.
(Continue reading)

becky mcelroy | 16 Feb 2010 14:59

Re: Reg. SIPUnit - Adding Header field in SIP response message

Hi Kesavan,

Let's start with the SipUnit message sending side and see where this
goes. I just now modified slightly an existing SipUnit test to add
another additional response header that you mentioned and would like
you to do the same with the headers you're trying to add, and see what
happens. The test is simple, UA<->UA with no proxy required, you can
run it as a JUnit test from eclipse or from command line like:
C:\sipunit> java -cp
examples;lib\junit.jar;lib\sipunit.jar;lib\JainSipApi1.2.jar;lib\JainSipRi1.2.jar;lib\concurrent.jar;lib\log4j-1.2.8.jar
 junit.textui.TestRunner  org.cafesip.sipunit.test.TestNoProxy

The test method is
org.cafesip.sipunit.test.TestNoProxy.testRaceConditionResponseBeatsRequest()
- it currently calls sendIncomingCallResponse() with an additional
allow header, somewhere around line 473. I added a retry header there
also, so the code looks like this:

                    Header allow = ub.getParent().getHeaderFactory()
                            .createAllowHeader(Request.INFO);
                    Header retryafter = ub.getParent().getHeaderFactory()
                            .createRetryAfterHeader(60);
                    b.sendIncomingCallResponse(Response.OK,
                            "Answer - Hello world", 0, new ArrayList<Header>(
                                    Arrays.asList(allow, retryafter)), null,
                            null);

With the sipunit trace turned on at the top of the test class:
        defaultProperties.setProperty("sipunit.trace", "true");

(Continue reading)

Ramon Poca | 8 Oct 2009 15:54
Picon

REGISTER/unREGISTER oddities

Hi there!

I've been using SIPUnit to test our SIP servlet, and found some oddities.

    *

      - SipPhone.unregister() seems not to be working when there is an
      authentication challenge/response.

    *
          o

            - SipPhone.register() loops indefinitely when authentication
            fails and a 401 is returned twice, instead of aborting when
            available credentials are exhausted.

          o

            - Due to the "unregister()" problem, I tried to use
            register() with an expires of 0, but then SipPhone does not
            set the header.

I've modified SipUnit locally to fix this, but I don't know wether this 
behaviour is intentional or not, as to submit a patch.

Are those by design?

--

-- 
*Ramon Poca*
ramon.poca <at> androme.es <mailto:ramon.poca <at> androme.es>
(Continue reading)

Ramon Poca | 8 Oct 2009 14:39
Picon

Listening for OPTIONS asynchronously

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*
ramon.poca <at> androme.es <mailto:ramon.poca <at> androme.es>

------------------------------------------------------------------------------
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
becky mcelroy | 6 Sep 2009 22:00

SipUnit 1.0.0 additional license

The junit jar for JUnit Release 4.7 contains an additional license as
follows. The sipunit/docs/license directory has been updated to contain this
additional license.

BSD License

Copyright (c) 2000-2006, www.hamcrest.org
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this
list of
conditions and the following disclaimer. Redistributions in binary form must
reproduce
the above copyright notice, this list of conditions and the following
disclaimer in
the documentation and/or other materials provided with the distribution.

Neither the name of Hamcrest nor the names of its contributors may be used
to endorse
or promote products derived from this software without specific prior
written
permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES
(Continue reading)

becky mcelroy | 2 Sep 2009 08:34

SipUnit 1.0.0 released

September 1, 2009,
Raleigh, NC.

  We are pleased to announce the public release of SipUnit 1.0.0. This is a
stable release with tracker bugs fixed and extensive testing performed.
Feedback from the development community is encouraged for further enhancing
the system.

SipUnit provides a test environment geared toward unit testing SIP
applications. It extends the JUnit test framework to incorporate
SIP-specific assertions, and it provides a high-level API for performing the
SIP operations and messaging needed to interact with the application or
network element under test.

The following are the highlights of the release.

   1. Support added for REFER handling (outbound, in- or out-of-dialog, with
   implicit subscription support).
   2. JAIN SIP stack upgraded to rev. 1.2.119 and JUnit library upgraded to
   JUnit Release 4.7.
   3. JAIN SIP objects (transaction, dialog) are now accessible from high
   level SipUnit classes (SipCall, etc.).
   4. Bug fixes.

If you have any questions about the SipUnit project, please contact us by
sending an email to sipunit <at> cafesip.org.

-- CafeSip Team.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
(Continue reading)

becky mcelroy | 15 Apr 2009 17:19
Picon

Soliciting comments on SipUnit REFER implementation

Outbound REFER proposed implementation and resulting Presence handling
refactoring
==================================================================================

Without further refactoring (beyond what's already been done, noted at
bottom) to the existing presence SUBSCRIBE/NOTIFY, here's how the REFER
implementation looks.

Comments from the test program perspective?

I. REFER (Outbound)

See existing SipCall/SipPhone call or buddy handling methods for some
paraemters' explanation, they're used the same way here.

1) Call new SipPhone method that sends out a REFER request and returns when
a first response comes back:

public ReferSubscriber refer(String referToUri, long timeout, String
viaNonProxyRoute)

       additional signatures with ArrayList<Header> additionalHeaders,
            ArrayList<Header> replaceHeaders, String body
    and
            String body, String contentType,
            String contentSubType, ArrayList<String> additionalHeaders,
            ArrayList<String> replaceHeaders

Above is out-of-dialog, for in-dialog there will be additional parms for
either fromTag/CallId/toTag or you'll give a SipCall or pre-existing
(Continue reading)

becky mcelroy | 27 Jul 2008 23:14
Picon

SipUnit 0.0.7b released - CANCEL Handling and Other Improvements

July 26, 2008,
Raleigh, NC.

We are pleased to announce the public release of SipUnit r0.0.7b. This is a
Beta release to give users a working system to evaluate and test. Feedback
from the development community is encouraged for further enhancing the
system.

SipUnit provides a test environment geared toward unit testing SIP
applications. It extends the JUnit test framework to incorporate
SIP-specific assertions, and it provides a high-level API for performing the
SIP operations and messaging needed to interact with the application or
network element under test.

The following are the highlights of the release.

   1. Support added for CANCEL handling (contributed by Alcatel-Lucent).
   2. Bug fixes and improvements (contributed by M. Ranganathan).
   3. Underlying JAIN SIP stack updated to revision: 1.2.72.

If you have any questions about the SipUnit project, please contact us by
sending an email to sipunit <at> cafesip.org.

-- CafeSip Team.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
(Continue reading)


Gmane