Skip to main content

About performance test with Sipp

6 replies [Last post]
michele83
Offline
Joined: 2007-03-01

Hi guys! I'm studying the registar and proxy services. I've read that link

http://wiki.java.net/bin/view/Communications/MobicentsSLEEHowToBuildRegi...

and I have 3 questions:
1- does the actual implementation of the registar follow the "II implementation" of that link? (i.e. one service for each user?)
2-what is an activity in the SIP-RA? (is it a call or a sip message or something else?)
3-How is the relationship between services and activities? 1 to 1?

I'm also running the test contained in the Sipp.zip file.
I follow the this steps

-run mobicents server with the "run.bat -mc" command
-"/sipservices/ant deploy" to deploy the sipra and the proxiservice (this operation terminate successfully)
-start Sipp
-"sipp 127.0.0.1 -i 127.0.0.1 -sf test10.xml -s 90000 -inf database1.csv -l 90 -r 3 -d 10"

While the sipp is running i can see that INVITE-messages are correctly sent and TRYING-messages are correctly received. But there are no OK-response-messages.
Do I have to modify the onINVITErequest() procedure in the proxySbb file in order to perform the test? (e.g. by adding here the "SIPOK response"?)

What did i do wrong?
How can i see obtain the cps value?

Thanks in advance for your help.
Michele

Message was edited by: michele83

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
baranowb
Offline
Joined: 2006-01-09

> Hi guys! I'm studying the registar and proxy
> services. I've read that link
>
> http://wiki.java.net/bin/view/Communications/Mobicents
> SLEEHowToBuildRegistrar
>
> and I have 3 questions:
> 1- does the actual implementation of the registar
> follow the "II implementation" of that link? (i.e.
> one service for each user?)

Not catching this one.

> 2-what is an activity in the SIP-RA? (is it a call or
> a sip message or something else?)

https://slee-sip-ra.dev.java.net/svn/slee-sip-ra/trunk/ratype/xml/resour...

> 3-How is the relationship between services and
> activities? 1 to 1?
>

Also not catching here. generaly there is one STX and one CTX however whne request is forked there are more than one CTX.
Does this answer Your question?

> I'm also running the test contained in the Sipp.zip
> file.
> I follow the this steps
>
> -run mobicents server with the "run.bat -mc" command
> -"/sipservices/ant deploy" to deploy the sipra and
> the proxiservice (this operation terminate
> successfully)
> -start Sipp
> -"sipp 127.0.0.1 -i 127.0.0.1 -sf test10.xml -s 90000
> -inf database1.csv -l 90 -r 3 -d 10"
>
> While the sipp is running i can see that
> INVITE-messages are correctly sent and
> TRYING-messages are correctly received. But there are
> no OK-response-messages.
> Do I have to modify the onINVITErequest() procedure
> in the proxySbb file in order to perform the test?
> (e.g. by adding here the "SIPOK response"?)
>

Why proxy should send OK? It has passive role in communication, it only routes requests, it does not respond to them.

>
> What did i do wrong?
> How can i see obtain the cps value?
>
> Thanks in advance for your help.
> Michele
>
> Message was edited by: michele83

michele83
Offline
Joined: 2007-03-01

> I'm also running the test contained in the Sipp.zip
>> file.
>> I follow the this steps
>>
>> -run mobicents server with the "run.bat -mc" command
>> -"/sipservices/ant deploy" to deploy the sipra and
>> the proxiservice (this operation terminate
>> successfully)
>> -start Sipp
>> -"sipp 127.0.0.1 -i 127.0.0.1 -sf test10.xml -s 90000
>> -inf database1.csv -l 90 -r 3 -d 10"
>>
>> While the sipp is running i can see that
>> INVITE-messages are correctly sent and
>> TRYING-messages are correctly received. But there are
>> no OK-response-messages.
>> Do I have to modify the onINVITErequest() procedure
>> in the proxySbb file in order to perform the test?
>> (e.g. by adding here the "SIPOK response"?)

>Why proxy should send OK? It has passive role in communication, it only routes >requests, it does not respond to them.

I agree with you. So, what do i have to do to abtain the cps-information? Do i have to create a service which answers to the sipp tool?

Thank u for for this and all other answers.
Michele

baranowb
Offline
Joined: 2006-01-09

that would be the best way I think. The shortest as it seems.

michele83
Offline
Joined: 2007-03-01

I'll try. thank u very much. have a nice day!
Michele

michele83
Offline
Joined: 2007-03-01

I've created a service with a sbb. The sbb contains the following code:

package performance;

import javax.slee.*;

import javax.sip.ServerTransaction;
import javax.sip.message.Response;
import javax.sip.message.Request;
import javax.sip.message.MessageFactory;
import javax.sip.header.ContactHeader;
import javax.sip.header.ToHeader;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

import org.mobicents.slee.resource.sip.SipFactoryProvider;

public abstract class performSbb implements javax.slee.Sbb {

private SipFactoryProvider fp;
private Context sbbEnv;
private MessageFactory messageFactory;

public void onInvite(javax.sip.RequestEvent event, ActivityContextInterface aci) {

try {
ServerTransaction serverTransactionId = (ServerTransaction)aci.getActivity();
Request request = event.getRequest();
Response response = messageFactory.createResponse(Response.OK ,request);
serverTransactionId.sendResponse(response);
} catch (Exception e) {System.out.println("ERROR: " + e.getMessage());}

}

// TODO: Perform further operations if required in these methods.
public void setSbbContext(SbbContext context)
{ this.sbbContext = context;
try {
sbbEnv = (Context) new InitialContext().lookup("java:comp/env");
fp = (SipFactoryProvider) bbEnv.lookup("slee/resources/jainsip/1.1/provider");
messageFactory = fp.getMessageFactory();

} catch (NamingException ne){System.out.println("ERROR");};

}
public void unsetSbbContext() { this.sbbContext = null; }

// TODO: Implement the lifecycle methods if required
public void sbbCreate() throws javax.slee.CreateException {}
public void sbbPostCreate() throws javax.slee.CreateException {}
public void sbbActivate() {}
public void sbbPassivate() {}
public void sbbRemove() {}
public void sbbLoad() {}
public void sbbStore() {}
public void sbbExceptionThrown(Exception exception, Object event, ActivityContextInterface activity) {}
public void sbbRolledBack(RolledBackContext context) {}

/**
* Convenience method to retrieve the SbbContext object stored in setSbbContext.
*
* TODO: If your SBB doesn't require the SbbContext object you may remove this
* method, the sbbContext variable and the variable assignment in setSbbContext().
*
* @return this SBB's SbbContext object
*/

protected SbbContext getSbbContext() {
return sbbContext;
}

private SbbContext sbbContext; // This SBB's SbbContext

}

I deploy and run this service. So i launch the sipp test (so the sip-invites arrive) but my service doesn't send the SIP-OK and the following exeception appears:
"Contact Header is mandatory for the OK to the INVITE"

How can i send a SIP-OK ,message? Thank u. Bye

michele83
Offline
Joined: 2007-03-01

Hi guys! I've resolved my problem.
I've found very usefull this link

http://forums.java.net/jive/thread.jspa?messageID=209900&#209900

Now my simple sip-test works!
Thank u.
Michele