[sip-comm-dev] How to generating a SIP packet


#1

I want to generate a SIP packet on my own. I want its header to be
something unique so that I can handle it on the server side.

I'm looking at the source code and API of SIPcomm but where are
SIP packets generated exactly? The modules that I know related to this:
1. net.java.sip.communicator.plugin.sipaccregwizz.*
2. net.java.sip.communicator.impl.protocol.sip.*
I found where the *register* packets are created at 2 but what about the
other packets? How can I make make a user specified packet? Any ideas?

In addition, I'm looking for where the GUI of SIPcomm starts because
I wanna have the part where it sends my SIP packet above. I followed the
main method of SIPcomm and it invokes the Main of Felix and felix reads
some felix.client.run.properties files which contains all SIPcomm modules.
But then what? Could you explain/draw me the order until the main frame
of SIPcomm invoked?

Thank you guys and have a great day!

James H. LEE


#2

Hi James,

You can forge your own SIP packet using the JAIN-SIP stack. Many SIP packets are generated in SIP Communicator. For example in net.java.sip.communicator.impl.protocol.sip.OperationSetPresenceSipImpl, you can see in the "createPublish" method a SIP packet being forged. Many fields are filed and the packet is finally sent. You can find a javadoc here : http://www-x.antd.nist.gov/proj/iptel/jain-sip-1.2/javadoc/

Cheers,
Ben

James H Lee a �crit :

···

I want to generate a SIP packet on my own. I want its header to be
something unique so that I can handle it on the server side.
I'm looking at the source code and API of SIPcomm but where are
SIP packets generated exactly? The modules that I know related to this:
1. net.java.sip.communicator.plugin.sipaccregwizz.*
2. net.java.sip.communicator.impl.protocol.sip.*
I found where the /register/ packets are created at 2 but what about the
other packets? How can I make make a user specified packet? Any ideas?
In addition, I'm looking for where the GUI of SIPcomm starts because
I wanna have the part where it sends my SIP packet above. I followed the
main method of SIPcomm and it invokes the Main of Felix and felix reads
some felix.client.run.properties files which contains all SIPcomm modules.
But then what? Could you explain/draw me the order until the main frame
of SIPcomm invoked?
Thank you guys and have a great day!
James H. LEE

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Thanks Ben! It's really helpful :slight_smile:

···

On Wed, Jun 4, 2008 at 2:36 PM, Benoit Pradelle <ze_real_neo@yahoo.fr> wrote:

Hi James,

You can forge your own SIP packet using the JAIN-SIP stack. Many SIP
packets are generated in SIP Communicator. For example in
net.java.sip.communicator.impl.protocol.sip.OperationSetPresenceSipImpl, you
can see in the "createPublish" method a SIP packet being forged. Many fields
are filed and the packet is finally sent. You can find a javadoc here :
http://www-x.antd.nist.gov/proj/iptel/jain-sip-1.2/javadoc/

Cheers,
Ben

James H Lee a écrit :

I want to generate a SIP packet on my own. I want its header to be

something unique so that I can handle it on the server side.
I'm looking at the source code and API of SIPcomm but where are
SIP packets generated exactly? The modules that I know related to this:
1. net.java.sip.communicator.plugin.sipaccregwizz.*
2. net.java.sip.communicator.impl.protocol.sip.*
I found where the /register/ packets are created at 2 but what about the
other packets? How can I make make a user specified packet? Any ideas?
In addition, I'm looking for where the GUI of SIPcomm starts because
I wanna have the part where it sends my SIP packet above. I followed the
main method of SIPcomm and it invokes the Main of Felix and felix reads
some felix.client.run.properties files which contains all SIPcomm modules.
But then what? Could you explain/draw me the order until the main frame
of SIPcomm invoked?
Thank you guys and have a great day!
James H. LEE

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

Hi, everyone!

I have several questions looking for your answers as follows:

1. Since sip-communicator can support multi IM protocols, when it receives a
package, how can it tell which IM client to send to? according to the port
number? But as far as i know, sip-communicator should have just one port for
receiving msg. this is ok for sending msg to different IM clients 'coz it is
aware of which one to send to, but when msgs from different clients are
coming, how could it tell one from the others and is there any port mapping
or other mechanism to solve this problem?

2. I got the info on internet that nowadays most of IM software are based on
TCP connection. But TCP is a stream oriented transportion layer protocol,
which method in java could devide the stream into protocol package?

3. Now what i want to do is to unpack a package of protocol A, extract the
msg from it and pack it into a package of protocol B, to realize msg
transmission between different clients. I am wondering whether there is any
API in java that could help me do this.

thx alot if you guys could help me and good luck to all:)

Best regards,
Donald