JAIN SIP

Hi,

I am planning to develop a voip application with JAIN SIP API. recently, i've downloaded it. and now i've got problem in running Example.class that I got from the documentation.

import jain.protocol.ip.sip.*;

import jain.protocol.ip.sip.address.*;

import jain.protocol.ip.sip.header.*;

import jain.protocol.ip.sip.message.*;

import java.util.*;

public class Example implements SipListener {

private SipFactory sipFactory = null;

private AddressFactory addressFactory = null;

private HeaderFactory headerFactory = null;

private MessageFactory messageFactory = null;

private SipStack sipStack = null;

private SipProvider sipProvider = null;

private Iterator listeningPoints = null;

// Main

public static void main(String[] args) {

Example example = new Example();

example.sendMessages();

}

public Example() {

setup();

}

private void setup() {

// Obtain an instance of the singleton SipFactory

sipFactory = SipFactory.getInstance();

// Set path name of SipFactory to reference implementation

// (not needed - default path name)

sipFactory.setPathName("com.dynamicsoft.ri");

try {

// Create SipStack object

sipStack = (SipStack)sipFactory.createSipStack();

} catch(SipPeerUnavailableException e) {

// could not find com.dynamicsoft.ri.jain.protocol.ip.sip.SipStackImpl

// in the classpath

System.err.println(e.getMessage());

System.exit(-1);

} catch(SipException e) {

// could not create SipStack for some other reason

System.err.println(e.getMessage());

System.exit(-1);

}

// Set name of SipStack

sipStack.setStackName("Reference Implementation SIP stack");

try {

// Get SipStack's ListeningPoints

listeningPoints = sipStack.getListeningPoints();

// Create SipProvider based on the first ListeningPoint

sipProvider = sipStack.createSipProvider((ListeningPoint)listeningPoints.next());

} catch(NullPointerException e) {

System.err.println("Stack has no ListeningPoints");

System.exit(-1);

} catch(ListeningPointUnavailableException e) {

System.err.println(e.getMessage());

System.exit(-1);

}

// Register this application as a SipListener of the SipProvider

try {

sipProvider.addSipListener(this);

} catch(TooManyListenersException e) {

// A limit has been reached on the number of Listeners allowed per provider

System.err.println(e.getMessage());

System.exit(-1);

} catch(SipListenerAlreadyRegisteredException e) {

// Already been added as SipListener

System.err.println(e.getMessage());

System.exit(-1);

}

}

// Process transaction timeout

public void processTimeOut(jain.protocol.ip.sip.SipEvent transactionTimeOutEvent) {

if(transactionTimeOutEvent.isServerTransaction()) {

System.out.println("Server transaction " + transactionTimeOutEvent.getTransactionId() + " timed out");

} else {

System.out.println("Client transaction " + transactionTimeOutEvent.getTransactionId() + " timed out");

}

}

// Process Request received

public void processRequest(jain.protocol.ip.sip.SipEvent requestReceivedEvent) {

Request request = (Request)requestReceivedEvent.getMessage();

long serverTransactionId = requestReceivedEvent.getTransactionId();

System.out.println("\n\nRequest received with server transaction id " + serverTransactionId + ":\n" + request);

try {

// If request is not an ACK then try to send an OK Response

if((!Request.ACK.equals(request.getMethod())) && (!Request.REGISTER.equals(request.getMethod()))) {

sipProvider.sendResponse(serverTransactionId, Response.OK, "SDP body of Response", "application", "sdp");

}

} catch(TransactionDoesNotExistException e) {

System.out.println(e.getMessage());

System.exit(-1);

} catch(SipParseException e) {

System.out.println(e.getMessage());

System.exit(-1);

} catch(SipException e) {

System.out.println(e.getMessage());

System.exit(-1);

}

}

// Process Response received

public void processResponse(jain.protocol.ip.sip.SipEvent responseReceivedEvent) {

Response response = (Response)responseReceivedEvent.getMessage();

long clientTransactionId = responseReceivedEvent.getTransactionId();

System.out.println("Response received with client transaction id " + clientTransactionId + ":\n" + response);

try {

// Get method of response

String method = response.getCSeqHeader().getMethod();

// Get status code of response

int statusCode = response.getStatusCode();

// If response is a 200 INVITE response, try to send an ACK

if((statusCode == Response.OK) && (method.equals(Request.INVITE))) {

sipProvider.sendAck(clientTransactionId);

}

} catch(SipException e) {

System.err.println(e.getMessage());

System.exit(-1);

}

}

public void sendMessages() {

try {

// Create AddressFactory

addressFactory = sipFactory.createAddressFactory();

// Create HeaderFactory

headerFactory = sipFactory.createHeaderFactory();

// Create MessageFactory

messageFactory = sipFactory.createMessageFactory();

} catch(SipPeerUnavailableException e) {

System.err.println(e.getMessage());

System.exit(-1);

}

SipURL fromAddress = null;

NameAddress fromNameAddress = null;

FromHeader fromHeader = null;

SipURL toAddress = null;

NameAddress toNameAddress = null;

ToHeader toHeader = null;

SipURL requestURI = null;

CallIdHeader callIdHeader = null;

CSeqHeader cSeqHeader = null;

ViaHeader viaHeader = null;

ArrayList viaHeaders = null;

ContentTypeHeader contentTypeHeader = null;

Request invite = null;

Request options = null;

Request register = null;

try {

// create From Header

fromAddress = addressFactory.createSipURL("caller", sipProvider.getListeningPoint().getHost());

fromAddress.setPort(sipProvider.getListeningPoint().getPort());

fromNameAddress = addressFactory.createNameAddress("Caller", fromAddress);

fromHeader = headerFactory.createFromHeader(fromNameAddress);

// create To Header

toAddress = addressFactory.createSipURL("callee", sipProvider.getListeningPoint().getHost());

toAddress.setPort(sipProvider.getListeningPoint().getPort());

toNameAddress = addressFactory.createNameAddress("Callee", toAddress);

toHeader = headerFactory.createToHeader(toNameAddress);

// create Request URI

requestURI = (SipURL)toAddress.clone();

requestURI.setTransport(sipProvider.getListeningPoint().getTransport());

// Create ViaHeaders

String transport = sipProvider.getListeningPoint().getTransport();

if(transport.equals(ListeningPoint.TRANSPORT_UDP)) {

transport = ViaHeader.UDP;

} else if(transport.equals(ListeningPoint.TRANSPORT_TCP)) {

transport = ViaHeader.TCP;

}

viaHeader = headerFactory.createViaHeader(sipProvider.getListeningPoint().getHost(), sipProvider.getListeningPoint().getPort(), transport);

viaHeaders = new ArrayList();

viaHeaders.add(viaHeader);

// Create ContentTypeHeader

contentTypeHeader = headerFactory.createContentTypeHeader("application", "sdp");

// Create and send INVITE Request

callIdHeader = sipProvider.getNewCallIdHeader();

cSeqHeader = headerFactory.createCSeqHeader(1, Request.INVITE);

invite = messageFactory.createRequest(requestURI, Request.INVITE, callIdHeader, cSeqHeader, fromHeader, toHeader, viaHeaders, "SDP body of INVITE Request", contentTypeHeader);

sipProvider.sendRequest(invite);

// Create and send OPTIONS Request

callIdHeader = sipProvider.getNewCallIdHeader();

cSeqHeader = headerFactory.createCSeqHeader(1, Request.OPTIONS);

options = messageFactory.createRequest(requestURI, Request.OPTIONS, callIdHeader, cSeqHeader, fromHeader, toHeader, viaHeaders, "SDP body of OPTIONS Request", contentTypeHeader);

sipProvider.sendRequest(options);

// Create and send REGISTER Request

callIdHeader = sipProvider.getNewCallIdHeader();

cSeqHeader = headerFactory.createCSeqHeader(1, Request.REGISTER);

register = messageFactory.createRequest(requestURI, Request.REGISTER, callIdHeader, cSeqHeader, fromHeader, toHeader, viaHeaders, "SDP body of OPTIONS Request", contentTypeHeader);

long clientTransactionId = sipProvider.sendRequest(register);

// send CANCEL Request

sipProvider.sendCancel(clientTransactionId);

// send BYE Request

sipProvider.sendBye(clientTransactionId, true);

} catch(SipParseException e) {

// Implementation was unable to parse a value

System.err.println(e.getMessage() + "[" + e.getUnparsable() + "]");

System.exit(-1);

} catch(SipException e) {

// Another exception occurred

System.err.println(e.getMessage());

System.exit(-1);

}

}

}

Exception Message displayed:

The Peer JAIN SIP Object: com.dynamicsoft.ri.jain.protocol.ip.sip.SipStackImpl could not be instantiated. Ensure the Path Name has been set.

my questions are:

1. what pathname do i need to set(windows xp) ?any solution to this problem?

2. how to run jain presence proxy?

what are the settings required to run jain presence proxy?

3. can i build my own proxy server using JAIN SIP?

I would be very grateful if anyone could help me

[10015 byte] By [Willie_8363a] at [2007-10-1 18:32:59]
# 1

Hi,

The path is set as the path of the RI u r using; if u r using JAIN SIP from NIST then use :- sipFactory.setPathName("gov.nist");

To run jain presence proxy :-

First u need to have the ant installed.

Then u go to the directory in which u hav unziped the jain sip proxy zip file.

Run the command ant compile-proxy

Then run the command ant run-proxy

U can always build ur own proxy server using JAIN SIP API. If the NIST can then y not u....

Good Luck,

Litty Preeth

littypreethkra at 2007-7-11 13:31:10 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 2

Hi,

when i tried to compile the same thing it gives me 62 errors saying "package (bla..blah) Not found" Error. I've compiled NIST package with ant and also included all the necessary JAR files in class path..

here is a snapshot

SipUA.java:4: package jain.protocol.ip.sip.message does not exist

import jain.protocol.ip.sip.message.*;

^

SipUA.java:8: cannot resolve symbol

symbol : class SipListener

location: class SipUA

public class SipUA implements SipListener

^

SipUA.java:10: cannot resolve symbol

symbol : class SipFactory

location: class SipUA

private SipFactory sipFactory = null;

^

Can someone help me out?

Thanx in advance.

Regards,

Sai

Sai4JMFa at 2007-7-11 13:31:10 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 3
hi i have a problem of my own.i am sending invites using multithreadingbut i am unable to terminate any sessionsi.e i get a bye for only one session all the acks are goingcan u help me on this
Sagar_Joshia at 2007-7-11 13:31:10 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 4

Hi

Where did you get the APIs and Example.java class, can you provide me the URL. I tried Example.java from your listing but I could not run that successfully as I could not provide appropiate jar files for packages like

import jain.protocol.ip.sip.*;

import jain.protocol.ip.sip.address.*;

import jain.protocol.ip.sip.header.*;

import jain.protocol.ip.sip.message.*;

Can you forwarded the links or the jar files to me?

With care

Arif.

Jubaera at 2007-7-11 13:31:10 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 5

> Hi,

>

> The path is set as the path of the RI u r using; if u

> r using JAIN SIP from NIST then use :-

> sipFactory.setPathName("gov.nist");

>

>

> Good Luck,

> Litty Preeth

I've got the same question about this.

I've got the same exception message.

Please would you like to tell me more about this?

Thanks in advance.

Xu Rui

beshreka at 2007-7-11 13:31:10 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 6

> Hi,

>

> The path is set as the path of the RI u r using; if u

> r using JAIN SIP from NIST then use :-

> sipFactory.setPathName("gov.nist");

>

>

> Good Luck,

> Litty Preeth

I've got the same question about this.

I've got the same exception message.

Please would you like to tell me more about this?

Thanks in advance.

Xu Rui

beshreka at 2007-7-11 13:31:10 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 7

> Hi

>

> Where did you get the APIs and Example.java class,

> can you provide me the URL. I tried Example.java from

> your listing but I could not run that successfully as

> I could not provide appropiate jar files for packages

> like

> import jain.protocol.ip.sip.*;

> import jain.protocol.ip.sip.address.*;

> import jain.protocol.ip.sip.header.*;

> import jain.protocol.ip.sip.message.*;

>

> Can you forwarded the links or the jar files to me?

>

> With care

> Arif.

I'd like to send you the jar file.

Tell me your email address or how could I forward it to you?

Xu Rui

beshreka at 2007-7-11 13:31:10 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 8
Hi All,I have to work on VOIP using J2ME. Can somebody tell me from where can I download JAIN SIP library. Thanking you all,Ravi
Ravindra_babu_aa at 2007-7-11 13:31:10 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 9

Dear Xu Rui

Sure if would have clicked onto my name you would be able to see my email address, whatever here it is my email address, jubairarifctg@yahoo.com

By the way, can you suggest me on it further. I have two classes, one is sending SIP Invite messages to the other and in the receiving end I am trying to get the RTP port used in SDP messages from the sending end. I know I have to use the Media object from JAIN SIP but not getting what exactly the code will look like?

With care

Arif.

Jubaera at 2007-7-11 13:31:10 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 10

I worked out my project with JAIN SIP, now I can share my ideas in case anyone need help. I am happy with my project and would feel good to share the experience.

With regards

Mohammed Jubaer Arif

Mobile: +61-0411215302

Personal Web: http://www.geocities.com/jubairarifctg/

Org. Web.: http://www.geocities.com/halimschamber/

Jubaera at 2007-7-11 13:31:10 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 11

Hi arif,

I want to do my final project using Jain Sip. ' have already got some insights in to what SIP and Jain Sip are. I have some questions to you(or to any one) though.

1.can i use my j2se Version 1.4 to develope Jain SIP applications?

2.am i supposed to download the Jain SIP api exclussively or it is already part of the j2se jdk?

3. To develpe java applications, jre, jdk , graphical compilers like Jcreator are required. would you give me the general requiremets for me to be able to practice and develope Jain SIP applications?

i can feel those questions can be kinda silly to some people. but i also feel the need to face the risk of looking like a silly. ' am a bignner.

Any Answer Is Appreciated.

Haftu.

amarayajavaa at 2007-7-11 13:31:10 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 12

Hi,

I'm doing a VoIP program using SIP package.

I upgraded my lib from JainSipApi1.1.jar to JainSipApi1.2.jar and i found that many classes became abstract (messageFactory, headerFactory, addressFactory ...)

So now I use the implemented classes (messageFactoryImpl, headerFactoryImpl, addressFactoryImpl ...)

but i realized that I can't instantiate SipProviderImpl cuz they won't supply public constructor.

So I need to create ListeningPointImpl so I can use ListeningPointImpl.getProvider(), but I can't instantiate

ListeningPointImpl because they don't supply public constructor...

So I need to create MessageProcessor so I can use MessageProcessor.getListeningPoint(), but I can't instantiate MessageProcessor nor TCPMessageProcessor, and I need to create ListeningPointImpl in order to use ListeningPointImpl.getMessageProcessor()

Can someone please help me get out of this loop ?!

Sippya at 2007-7-11 13:31:10 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 13

Hi,

I'm having a lot of trouble with

The Peer SIP Stack: com.sun.javax.sip.SipStackImpl could not be instantiated. Ensure the Path Name has been set.

I've tried:

sipFactory.setPathName("com.sun");

and

sipFactory.setPathName("gov.nist");

And neither work... here's my source code for this skeleton (I just want to get past this error before continuing!)

Please help. Thank you!

import javax.sip.*;

import javax.sip.address.*;

import javax.sip.header.*;

import javax.sip.message.*;

import java.util.*;

public class Beginner implements SipListener {

private SipFactory sipFactory = null;

private AddressFactory addressFactory = null;

private HeaderFactory headerFactory = null;

private MessageFactory messageFactory = null;

private SipStack sipStack = null;

private SipProvider sipProvider = null;

private Iterator listeningPoints = null;

public Beginner()

{

setup();

}

private void setup()

{

sipFactory = SipFactory.getInstance();

Properties props = new Properties();

props.setProperty("javax.sip.STACK_NAME", "RegistersReader");

//props.setProperty("StackName", "RegistersReader");

sipFactory.setPathName("com.sun");

try {

// create SipStack object

sipStack = (SipStack)sipFactory.createSipStack(props);

} catch(PeerUnavailableException e) {

System.err.println(e.getMessage());

System.exit(-1);

} catch(SipException e) {

System.err.println(e.getMessage());

System.exit(-1);

}

}

public void processRequest(RequestEvent requestEvent)

{

}

public void processResponse(ResponseEvent responseEvent)

{

}

public void processTimeout(TimeoutEvent timeoutEvent)

{

}

public void processIOException(IOExceptionEvent exceptionEvent)

{

}

public void processTransactionTerminated(TransactionTerminatedEvent transactionTerminatedEvent)

{

}

public void processDialogTerminated(DialogTerminatedEvent dte)

{

}

public static void main(String args[])

{

Beginner b = new Beginner();

}

}

helpmewithjsipa at 2007-7-11 13:31:10 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 14

Hi,

I got error 500 Internal Server Error when i send a text message from jain-sip client, Client send the Text message to server but server return the above error.

There is no Text Message Handler Code in Server Proxy Class,

Also when i try to start Voice Connversation, Client sent a INVITE request to server but server return 500 Server Intnal Error. also there is no INVITE handler code in Server Proxy Class.

I am using jain-sip-presence-proxy SIP server and jain-sip-applet-phone.

please help me .......................................Its Urgent

why server could not handle the text or voice messages.

How i make the text and voice conversation.

with regards

farazbs20a at 2007-7-11 13:31:10 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 15
Hi. Could you send me please examples and the api to alvarito_neira@hotmail.com?
Alvaritoa at 2007-7-20 10:16:32 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 16

> Hi,

> when i tried to compile the same thing it gives me

> 62 errors saying "[b]package (bla..blah) Not

> found[/b]" Error. I've compiled NIST package with

> ant and also included all the necessary JAR files in

> class path..

>

> here is a snapshot

>

> [code]SipUA.java:4: package

> jain.protocol.ip.sip.message does not exist

> import jain.protocol.ip.sip.message.*;

> ^

> SipUA.java:8: cannot resolve symbol

> symbol : class SipListener

> location: class SipUA

> public class SipUA implements SipListener

>^

> symbol

> symbol : class SipFactory

> location: class SipUA

> private SipFactory sipFactory = null;

> ^

>

> Can someone help me out?

>

> Thanx in advance.

>

> Regards,

> Sai

Have you set your CLASSPATH correctly? You need to make it point to the JAIN jar file as well as the current directory (./)

utopian201a at 2007-7-20 10:16:32 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 17

> Hi arif,

> I want to do my final project using Jain Sip. ' have

> already got some insights in to what SIP and Jain

> Sip are. I have some questions to you(or to any one)

> though.

>

> 1.can i use my j2se Version 1.4 to develope Jain SIP

> applications?

yes as far as i know.

> 2.am i supposed to download the Jain SIP api

> exclussively or it is already part of the j2se jdk?

you need to download it separately, from https://jain-sip.dev.java.net/

utopian201a at 2007-7-20 10:16:32 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 18

> Hi,

> I'm doing a VoIP program using SIP package.

> I upgraded my lib from JainSipApi1.1.jar to

> JainSipApi1.2.jar and i found that many classes

> became abstract (messageFactory, headerFactory,

> addressFactory ...)

> So now I use the implemented classes

> (messageFactoryImpl, headerFactoryImpl,

> addressFactoryImpl ...)

> but i realized that I can't instantiate

> SipProviderImpl cuz they won't supply public

> constructor.

>

> So I need to create ListeningPointImpl so I can use

> ListeningPointImpl.getProvider(), but I can't

> instantiate

> ListeningPointImpl because they don't supply public

> constructor...

>

> So I need to create MessageProcessor so I can use

> MessageProcessor.getListeningPoint(), but I can't

> instantiate MessageProcessor nor TCPMessageProcessor,

> and I need to create ListeningPointImpl in order to

> use ListeningPointImpl.getMessageProcessor()

>

> Can someone please help me get out of this loop ?!

I'm not entirely sure what your problem is, but SipStack has createListeningPoint(.....) as well as createSipProvider(...)

utopian201a at 2007-7-20 10:16:33 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 19

> Hi,

>

> I'm having a lot of trouble with

> The Peer SIP Stack: com.sun.javax.sip.SipStackImpl

> could not be instantiated. Ensure the Path Name has

> been set.

>

> I've tried:

>

> sipFactory.setPathName("com.sun");

>

> and

>

> sipFactory.setPathName("gov.nist");

>

> And neither work... here's my source code for this

> skeleton (I just want to get past this error before

> continuing!)

>

> Please help. Thank you!

I downloaded your code and it works when i change com.sun to gov.nist...

utopian201a at 2007-7-20 10:16:33 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 20

Hi,

Am a starter in JAIN-SIP and i am trying to compile jain-sip-presence-proxy.

But when i try the "ant compile-proxy" command, i have this error

/*********************************************************************************************/

[root@localhost jain-sip-presence-proxy]# /root/apache-ant-1.7.0/bin/ant compile-proxy

Buildfile: build.xml

compile-proxy:

[javac] Compiling 60 source files to /root/proxy/jain-sip-presence-proxy/classes

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/Proxy.java:236: cannot find symbol

[javac] symbol : method getApplicationData()

[javac] location: interface javax.sip.ServerTransaction

[javac].getApplicationData();

[javac] ^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/Proxy.java:240: cannot find symbol

[javac] symbol : method setApplicationData(gov.nist.sip.proxy.TransactionsMapping)

[javac] location: interface javax.sip.ServerTransaction

[javac] .setApplicationData(transactionsMapping);

[javac]^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/Proxy.java:739: cannot find symbol

[javac] symbol : method getApplicationData()

[javac] location: interface javax.sip.ServerTransaction

[javac] .getApplicationData();

[javac] ^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/Proxy.java:746: cannot find symbol

[javac] symbol : method getApplicationData()

[javac] location: interface javax.sip.ServerTransaction

[javac] transactionsMapping = (TransactionsMapping) st.getApplicationData();

[javac]^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/Proxy.java:919: createListeningPoint(int,java.lang.String) in javax.sip.SipStack cannot be applied to (java.lang.String,int,java.lang.String)

[javac] ListeningPoint lp = sipStack.createListeningPoint(

[javac] ^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/Proxy.java:1036: cannot find symbol

[javac] symbol : method getIPAddress()

[javac] location: interface javax.sip.ListeningPoint

[javac] String host = lp.getIPAddress();

[javac]^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/Proxy.java:1052: cannot find symbol

[javac] symbol : method getIPAddress()

[javac] location: interface javax.sip.ListeningPoint

[javac] String host = lp.getIPAddress();

[javac]^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/presenceserver/PresenceServer.java:299: cannot find symbol

[javac] symbol : method getNewDialog(javax.sip.ServerTransaction)

[javac] location: interface javax.sip.SipProvider

[javac] dialog = sipProvider.getNewDialog(serverTransaction);

[javac] ^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/RequestForwarding.java:324: cannot find symbol

[javac] symbol : method getIPAddress()

[javac] location: interface javax.sip.ListeningPoint

[javac]stackIPAddress = lp.getIPAddress();

[javac]^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/RequestForwarding.java:508: cannot find symbol

[javac] symbol : method getApplicationData()

[javac] location: interface javax.sip.ServerTransaction

[javac] .getApplicationData();

[javac]^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/RequestForwarding.java:516: cannot find symbol

[javac] symbol : method setApplicationData(gov.nist.sip.proxy.TransactionsMapping)

[javac] location: interface javax.sip.ServerTransaction

[javac]serverTransaction.setApplicationData(transactionsMapping);

[javac] ^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/RequestForwarding.java:517: cannot find symbol

[javac] symbol : method setApplicationData(gov.nist.sip.proxy.TransactionsMapping)

[javac] location: interface javax.sip.ClientTransaction

[javac]clientTransaction.setApplicationData(transactionsMapping);

[javac] ^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/ResponseForwarding.java:417: cannot find symbol

[javac] symbol : method getApplicationData()

[javac] location: interface javax.sip.ClientTransaction

[javac] .getApplicationData();

[javac] ^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/gui/ProxyLauncher.java:92: warning: [deprecation] show() in java.awt.Window has been deprecated

[javac] show();

[javac] ^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/gui/ListenerProxy.java:61: warning: [deprecation] show() in java.awt.Window has been deprecated

[javac] configurationFrame.show();

[javac]^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/gui/ListenerProxy.java:75: warning: [deprecation] show() in java.awt.Dialog has been deprecated

[javac] helpBox.show();

[javac]^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/gui/ListenerProxy.java:203: warning: [deprecation] show() in java.awt.Window has been deprecated

[javac]tracesViewer.show();

[javac]^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/gui/ListenerProxy.java:249: warning: [deprecation] show() in java.awt.Window has been deprecated

[javac]tracesViewer.show();

[javac]^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/gui/ConfigurationFrame.java:58: warning: [deprecation] hide() in java.awt.Window has been deprecated

[javac] this.hide();

[javac] ^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/gui/DomainDialog.java:80: warning: [deprecation] show() in java.awt.Dialog has been deprecated

[javac] dialog.show();

[javac]^

[javac] /root/proxy/jain-sip-presence-proxy/src/gov/nist/sip/proxy/gui/ListeningPointDialog.java:87: warning: [deprecation] show() in java.awt.Dialog has been deprecated

[javac] dialog.show();

[javac]^

[javac] Note: Some input files use unchecked or unsafe operations.

[javac] Note: Recompile with -Xlint:unchecked for details.

[javac] 13 errors

[javac] 8 warnings

BUILD FAILED

/root/proxy/jain-sip-presence-proxy/build.xml:162: Compile failed; see the compiler error output for details.

Total time: 11 seconds

/*********************************************************************************************/

A help will be very usefull for me.

Hope my English is not so bad.

Merci.

LegendePersonnellea at 2007-7-20 10:16:33 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 21
have you included the jain jars in your classpath?
utopian201a at 2007-7-20 10:16:33 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 22
You need concurrent.jar and log4j-1.2.14.jar to not get that "Check pathname" error.
lushdoga at 2007-7-20 10:16:33 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 23
What about concurrent.jar and especially log4j-1.2.14.jar? What are they for? I used them and i have the same classpath error....
chrysxa at 2007-7-20 10:16:33 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 24

The two jars are to resolve this error:

The Peer SIP Stack: com.sun.javax.sip.SipStackImpl

could not be instantiated. Ensure the Path Name has

been set.

You can use the FatJar plugin for Eclipse to create a "standalone" .jar file to maybe get around the classpath problem.

I use Eclipse->FatJar->JSmooth to get to a standalone .exe for the Windows platform.

lushdoga at 2007-7-20 10:16:33 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 25

Ok thanks, i solve the problem with Path Name using these 2 certain jars, but some errors remain ->

javax.sip.TransactionUnavailableException: sentBy does not match the sentby setting of the ListeningPoint 192.168.1.64:5060

at gov.nist.javax.sip.SipProviderImpl.getNewClientTransaction(SipProviderImpl.java:304)

at sip.SIPInvite.dial(SIPInvite.java:414)

at sip.SIPInvite.main(SIPInvite.java:468)

If you have any idea what those messages mean....The application i am trying to use is in this certain link ->

http://www.cdt.luth.se/~peppar/kurs/smd151/SIPInvite.java

chrysxa at 2007-7-20 10:16:33 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 26

This is a very rudimentary question but its because I m a beginner.

In the JSIP API. Any application must implement the SipListener. This brings with it a set of methods like processRequest for e.g.

Could someone just give me a flow of how a peer application sends a request which results in this method being invoked ? As in x --> y --> ... --> processRequest ........ ?

Thanks in advance

ankthepunka at 2007-7-20 10:16:33 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 27

Here is an excellent example of a SIP text messaging system, it only implements the MESSAGE Sip Request but it will get you going.

http://dev2dev.bea.com/2005/09/textclient.zip

Essentially you create the SIP MESSAGE headers for the JAIN SIP Request object then send it via "sipProvider.sendRequest(request);"

Then the receiving application would process this within the "public void processRequest(RequestEvent evt) {}"

Extract Request type, data blah blah. Send 200 Ok Response signalling the sender that you got the MESSAGE.

lushdoga at 2007-7-20 10:16:33 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 28

Thanks a lot lushdog ! the code is proving to be very useful.

I added the jain sip libs and got the code working. Its going to that "usage" method giving me the syntax to run saying "java -jar textclient.jar <username> <port>" .. If I want to run it on localhost what would I have to do ? Basically get a feel of the messenger albeit on a single computer !

If I have a few more queries I ll post on this forum ?

ankthepunka at 2007-7-20 10:16:33 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 29
One little thing lushdog.What JSIP version did you use to run this ?
ankthepunka at 2007-7-20 10:16:33 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 30

Hi, lushdog-

Thanks for the code. I am getting the following error from the proxy end when I run your client:

INFO AUTHORIZATION:Authentication failed: Authorization header missing!

INFO REGISTRATION:Authentication - using pure HTTP digest - generate response

Also, here is the msg from the client end:

ERROR: Previous message not sent: 401

Any insight on this matter is appreciated. Thanks!

ji3000@gmail.coma at 2007-7-20 10:16:38 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 31

hi !

i am a beginner who has started working on the jain sip.

i want to use the jain sip as a user agent. the foremost step would be to register my self on the netwrok. can someone please help me with the initial steps. i am stuck in the very beginning.

i have tried using net beans to load the applet but the project build fails giving the error message javax.servlet package not found.

What other requirements are there and what other steps are to be taken to start off using the jain sip as a user agent . also i could not find the module where the requests are sent for registration, invite etc (the client transaction module). Kindly help as i am new to java as well

Thanx in advance

Anushree

anushreea at 2007-7-20 10:16:38 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 32

Hi Anu,

I'm also a beginner with Jain Sip and I can understand how hard it was for you, as I spent 3 days trying to understand where to start, how to start and where is the head and tail of the user agent. At last I succeded today.Try converting the NISTAppletMessenger.java file into a frame. That will definately help. Also just try and find out all the proxy addresses and other data so that u can just hardcode it at first so that u get to understand what is happening. Then u would easily be able to start off with Jain Sip.All The Best.

VijayaKrishnaa at 2007-7-20 10:16:38 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 33
Hello. I'm implementing a SIP registrar server and a SIP user agent. How can I find a registrar server on the network with JAIN SIP? URGENT!
Szabolcsa at 2007-7-20 10:16:38 > top of Java-index,Other Topics,Java Community Process (JCP) Program...
# 34

Hi,

I am new in SIP.

Actually I am stuck in how to send a Map image by a SIP message.

If you can send SIP message request from user pc to application

server and the application server should respond with the Map content

in the SIP response message and it should display the map in the user pc.

Can you give me an example code to send a SIP request to the

application server for some floor map and the server should respond

with floor map which is requested?

Please help me.

//Tuhin

mobile: +81-80-6649 0842

ktuhina at 2007-7-20 10:16:38 > top of Java-index,Other Topics,Java Community Process (JCP) Program...