Skip to main content

SIP RA, SIP Proxy, bindings and JBoss ...

23 replies [Last post]
maretzke
Offline
Joined: 2004-10-04

Hello all,

sorry for this question, but after a while my confusion increases ...

What I did: I downloaded the alpha version of mobicents and build it, deployed it and everything went nice and smooth - good job! (My configuration: Windows XP, JBoss 3.2.6 with configuration "all" and binding to IP-Address).

After mobicents I tried: "ant sipdeploy" and ... compilation without problems - but the deployment failed:

sipra:

sipdeploy:
[echo] D:\Development\mobicents_cvs\mobicents/./sipra/DeploySipRA
[exec] "Deploying SIP RA type"
[exec] log4j:WARN No appenders could be found for logger (org.jnp.interfaces.NamingContext).
[exec] log4j:WARN Please initialize the log4j system properly.
[exec] Exception in thread "main" javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
...

Hmmmmh. Tried the same on an unbound instance of JBoss (removed the -b parameter) and I was able to deploy the SIP RA successfully and also the proxy server.
Unfortunately, now my sip-phones are able to register but can not reach each other ...

I am confused ... Is anybody seeing the problem?

BTW.: I tried the same when checking out latest sources from CVS and recognized the re-organisation of RAs. The target "proxy-service-deploy" vanished - is this purpose or a mistake?

Many thanks for any answer and best regards,
-- Michael.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
matebestek
Offline
Joined: 2003-10-09

Hi there,

i have the same problem as you, so if you maybe find the solution to it, please post it; i'll do the same if i succede first.

Thanks

mate

matebestek
Offline
Joined: 2003-10-09

oh, i have the services deployed (i'm tracking the parameters with the mobicents management console).

fuzzball_80
Offline
Joined: 2006-08-25

Hi everyone!

I'm playing with sipra, sip proxy service. At this time I can't register in the sip proxy.

I'm receiving SIP messages in the Jboss console but i'm getting a timeout in the client side (eyeBeam)

JBoss Output:


18:07:31,414 INFO [STDOUT] from="127.0.0.1:36224"
to="127.0.0.1:5060"
time="1170547651407"
isSender="false"
transactionId="z9hg4bk-d87543-e65e7662a26e1a02-1--d87543-"
callId="e4397107c308d962YTU3YzY0N2Y5OTA0YTMyM2MzYmFjNzY0MjhlM2I5OTk."
firstLine="REGISTER sip:nist.gov SIP/2.0"
debugLine="14322"
>
Via: SIP/2.0/UDP 127.0.0.1:36224;branch=z9hG4bK-d87543-e65e7662a26e1a02-1--d8754
3-;rport
Max-Forwards: 70
Contact:
To: "ivelin"
From: "ivelin" ;tag=212a0955
Call-ID: e4397107c308d962YTU3YzY0N2Y5OTA0YTMyM2MzYmFjNzY0MjhlM2I5OTk.
CSeq: 1 REGISTER
Expires: 3600
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY,MESSAGE,SUBSCRIBE,INFO
User-Agent: eyeBeam/release/1003s/stamp/31159
Content-Length: 0

]]>

Could you tell me where to look, to figure it out what I'm doing wrong???

I have checked out the last cvs version for mobicents, and the jboss profile. I follow the MobicentsSimplePBXExample step by step and all seems to run without problems, so I can't figure it out what is wrong with my environment.

I hope you can help me !!!

Thank you !!!

Regards

César

baranowb
Offline
Joined: 2006-01-09

Hmm did You get any errors (I know stupid question) - What You did post is output from jsip stack - it shows what was received.

Check wheather sip services have been deployed.

gzhhong
Offline
Joined: 2006-07-07

I had changed the code as you said, but the problem
maretzke mentioned remains.
1. I changed the file: ./thirdparty/sip-services/src/org/mobicents/slee/services/sip/common/SipConfigImpl.java.
2. I changed the file ./ra/sipra/ra/src/org/mobicents/slee/resource/sip/sipra.properties
3. $JBOSS_HOME/bin/run.sh -c all -b a.b.c.d, where a.b.c.d had set in step 1 and 2
4. cd $MOBICENTS_HOME/ra/sipra, ant sipradeploy
but get the debug message below:
Exception in thread "main" javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]

gzhhong
Offline
Joined: 2006-07-07

I build a registar on the proxy a.b.c.d, and config the sip terminals registration domain to: a.c.c.d. The I used the IP address a.b.c.d other than 127.0.0.1 to binding the proxy, the proxy can't forward the invite message to the right destination.

The proxy can handle registration and concel message correctly.

Message was edited by: gzhhong

torosvi
Offline
Joined: 2005-07-20

Maybe you should look at the following posts:
http://forums.java.net/jive/thread.jspa?threadID=16833&tstart=0
http://forums.java.net/jive/thread.jspa?threadID=16625&tstart=0

Let me know which Exceptions or Error messages are thrown in your environment to find a solution more easily.

Cheers,

Victor

gzhhong
Offline
Joined: 2006-07-07

Dear all,

What I want to do is configure a registar other than nist.gov and bind proxy with an IP other that 127.0.0.1.

1. vi $MOBICENTS_HOME/ra/sipra/ra/src/org/mobicents/slee/resource/sip/sipra.properties
make the change: javax.sip.IP_ADDRESS=a.b.c.d //the ip you want to bind with your proxy.

2. vi $MOBICENTS_HOME/ra/sipra/ra/src/org/mobicents/slee/resource/sip/passwords.xml
make the change at the second line: AUTHENTICATION realm="a.b.c.d" //the original value is nist.gov
a.b.c.d is the registar's IP. Because we will install the registar and proxy on the same mechine a.b.c.d, we have to make such changes.

3. change $MOBICENTS_HOME/thirdparty/sip-services/src/org/mobicents/slee/services/sip/common/SipConfigImpl.java
public String[] getLocalDomainNames() {

return new String[]{"a.b.c.d","ascc.lucent.com","leon.ascc.lucent.com"}; //the original value is "nist.gov",...
}
in the same class, change the host from 127.0.0.1 to a.b.c.d
// private static String host = "127.0.0.1"; the original
private static String host = "a.b.c.d"; //the new value

4. change $MOBICENTS_HOME/thirdparty/sip-services/src/org/mobicents/slee/services/sip/registrar/Registrar.java
private String[] localDomainNames = {"a.b.c.d", "antd.nist.gov", "nist.gov;transport=udp"}; //the original value is "nist.gov"

5. ant clean, ant make, ant auto-deploy-sip, run.sh -c all -b a.b.c.d

6. let two softphones registed on a.b.c.d realm/domain. Then you can make a phone call.

Please check the page and do any modification if necessary.

Thanks

Message was edited by: gzhhong

torosvi
Offline
Joined: 2005-07-20

> Dear all,
>
> What I want to do is configure a registar other than
> nist.gov and bind proxy with an IP other that
> 127.0.0.1. I had finished the job and post the
> comments on:
> http://wiki.java.net/bin/view/Communications/Mobicents
> SimplePBXExample#Comments
>
> Please check the page and do any modification if
> necessary.
>
> Thanks

Sorry, but I disagree with your comments at wiki page:

[i]>Comments on how to bind a proxy with an IP other than
>127.0.0.1 and change registar from nist.gov as you want

>1. vi >$MOBICENTS_HOME/ra/sipra/ra/src/org/mobicents/slee/resource/sip/sipra.properties
>make the change: javax.sip.IP_ADDRESS=a.b.c.d //the ip >you want to bind with your proxy.
[/i]
If you leave javax.sip.IP_ADDRESS line commented, the IP address you write when you run Mobicents will be used for binding.

[i]>2. vi >$MOBICENTS_HOME/ra/sipra/ra/src/org/mobicents/slee/resource/sip/passwords.xml
>make the change at the second line: AUTHENTICATION >realm="a.b.c.d" //the original value is nist.gov
>a.b.c.d is the registar's IP. Because we will install the >registar and proxy on the same mechine a.b.c.d, we have >to make such changes.[/i]

I am not sure if this change is really necessary for what you want to do.

[i]>3. change >$MOBICENTS_HOME/thirdparty/sip-services/src/org/mobicents/slee/services/sip/common/SipConfigImpl.java
>public String[] getLocalDomainNames() {
>
>return new >String[]{"a.b.c.d","ascc.lucent.com","leon.ascc.lucent.com"}; >//the original value is "nist.gov",...
>}[/i]

What I would do is to write for example:
String[]{host,"nist.gov, ""ascc.lucent.com","leon.ascc.lucent.com"};

Because [b]host[/b] is defined as a String and although starts with the value of 127.0.0.1, it is updated with the method "setRealHost(String host)" where host is precisely the IP address you used when you run Mobicents for binding.

[i]>in the same class, change the host from 127.0.0.1 to >a.b.c.d
>// private static String host = "127.0.0.1"; the original
>private static String host = "a.b.c.d"; //the new value
[/i]
Taking into account my last comment, this change should not be applied.

[i]>4. change >$MOBICENTS_HOME/thirdparty/sip-services/src/org/mobicents/slee/services/sip/registrar/Registrar.java
>private String[] localDomainNames = {"a.b.c.d", >"antd.nist.gov", "nist.gov;transport=udp"}; //the >original value is "nist.gov"[/i]

I think that you do not need to do this change because localDomainNames variable is never read locally. I think that it is just a junk line. With the change at point 3 should be enough.

I also encourage you to look at the links I gave you in my last post.

Cheers,

Victor

gzhhong
Offline
Joined: 2006-07-07

I had check the two links:
http://forums.java.net/jive/thread.jspa?threadID=16833&tstart=0
http://forums.java.net/jive/thread.jspa?threadID=16625&tstart=0

The slee-ds.xml file had been upgraded by using ${jboss.bind.address} instead of localhost.

The thirdparty/sip-services/src/org/mobicents/slee/services/sip/proxy/JainSipProxySbb.java had been changed as below:
// SipConfigImpl.setRealPort(provider.getListeningPoint().getPort());
// SipConfigImpl.setRealHost(provider.getSipStack().getIPAddress());
// SipConfigImpl.setRealPort(provider.getListeningPoint().getPort());
SipConfigImpl.setRealPort(provider.getListeningPoints()[0].getPort());
// SipConfigImpl.setRealHost(provider.getSipStack().getIPAddress());
SipConfigImpl.setRealHost(provider.getListeningPoints()[0].getIPAddress());

But if I do not change file MOBICENTS_HOME/thirdparty/sip-services/src/org/mobicents/slee/services/sip/common/SipConfigImpl.java
and $MOBICENTS_HOME/thirdparty/sip-services/src/org/mobicents/slee/services/sip/registrar/Registrar.java, I can't make a call successfully. After the caller initiating a call, the proxy can't forword the invite message to the correct destination.

torosvi
Offline
Joined: 2005-07-20

I suppose that you are using the latest version from CVS, right? If not, maybe you should update your environment.

About changing the file MOBICENTS_HOME/thirdparty/sip-services/src/org/mobicents/slee/services/sip/common/SipConfigImpl.java
what I said is that I would write:
String[]{host,"nist.gov, "ascc.lucent.com","leon.ascc.lucent.com"};

Because host will be set to the IP Address you use to run Mobicents due to " SipConfigImpl.setRealHost(provider.getListeningPoints()[0].getIPAddress());"

Doing this changes what happens exactly?
In which part of the code the Proxy does not behave properly?

I would need more information in order to be able to help you.

Victor

torosvi
Offline
Joined: 2005-07-20

I have just tested what I was suggesting to you and it seems to work.

Try it.

Cheers,

Victor

gzhhong
Offline
Joined: 2006-07-07

You are right, I tried the modifications and it worked correctly. But it seems that the CANCEL message still can't forward from proxy to the destination. When the caller initiate a call and cancel it before the called answering, the callee still ringing.
Is there any comment?

torosvi
Offline
Joined: 2005-07-20

> You are right, I tried the modifications and it
> worked correctly. But it seems that the CANCEL
> message still can't forward from proxy to the
> destination. When the caller initiate a call and
> cancel it before the called answering, the callee
> still ringing.
> Is there any comment?

Yes, I noticed it too. I think that it is a bug. I will take care of it.

Regards,

Victor

torosvi
Offline
Joined: 2005-07-20

I figured it out.

I will attach a patch to the Bugzilla Issue and explain what is happening when I have some time. I will try to do it as soon as possible.

Regards,

Victor

torosvi
Offline
Joined: 2005-07-20

Hi all!

I am going to explain what I consider is a bug in the SIP Proxy:

We are going to see a particular case in which there is a problem with ACKs:

If you use addresses for the SIP Clients which are considered Local taking into account the Local Domain Names list in the SipConfigImpl class and you make a call from SIP Client A to SIP Client B.

B accepts the call, then A will send an ACK to B. If you look at an ACK message, you can notice that in the Request-line the user in the SIP address disappears, so imagine that user B is registered as [i]sip:torosvi@a.b.c.d:5061[/i] -> ACK from A to B will use [i]sip:a.b.c.d:5061[/i] in the Request-line. Therefore, if a.b.c.d is one of the Local Domain Names, it will start a search in the Registered Users, but obviously any [i]sip:a.b.c.d:5061[/i] will be found, so it will be considered that the user to whom the ACK was addressed to is Temporarily Unavailable.

On the contrary, if a.b.c.d were not considered Local, the problem would not exist because the ACK will be sent using normal SIP routing rules.

The solution I thought first and you can see in the patch I attached to the Bugzilla issue (https://mobicents.dev.java.net/nonav/issues/showattachment.cgi/87/Abstra...) consists in considering the address as local not only if the domain is one of the Local Domain Names, but also if the user is not null. However, after being writing this post, I think that another solution could be never use real IP address for Local Domain Names list. So we can think in some kind of restriction to avoid it.

Looking forward your comments.

Regards,

Victor

torosvi
Offline
Joined: 2005-07-20

From now on the discussions related to SIP Proxy updating will be in the following thread:
http://forums.java.net/jive/thread.jspa?threadID=16833&tstart=0

Victor

fram
Offline
Joined: 2004-05-13

Hi Michael,
the new target for the proxy example is proxydeploy, if you are able to register to the proxy service but the proxy does not forward the call, please take a look at the following class com.opencloud.slee.services.sip.common.SipConfigImpl.
You should find a field called host, it's value is 127.0.0.1 change the value to your SIP Stack IP address and do the same for the UDP port. I'd like to change this hardcoded configuration and use profiles.
You'll notice a lot of changes in theservice, Ranga and I are modifying the sip example to test the fault tollerance capability of the container.

Francesco

ivelin
Offline
Joined: 2003-07-13

Please update the wiki page on the sip example as chages to the code are made.

The hardcoded IP address should be changed to at least read the jboss.bind.address system property.
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossRunParameters

Ivelin

fram
Offline
Joined: 2004-05-13

I don't think it's appropriate to use the jboss bind address because that could not be the address on which the RA is configured on. If you start the container with the -b 127.0.0.1 option this will cause some problem.
A quick solution could be to ask the resource adaptor for the Sip Stack address and to use that indside the proxy.
Francesco

maretzke
Offline
Joined: 2004-10-04

Hey Francesco,

I've just checked out latest sources and found the "proxydeploy" target.

What I did:
Started JBoss 3.2.6 with binding to 127.0.0.1.
Deployed mobicents with "ant" (no errors).
Deployed sip ra with "ant sipradeploy" (no errors).
Deployed proxy service with "ant proxydeploy" (did not work).

In the console of JBoss I see the following messages. Note that I modified BaseProxySbb.java already and added some debug messages:

public void onTimerEvent(TimerEvent timerEvent, ActivityContextInterface aci) {
try {
System.out.println("About to create the udpForwarder!");
UdpForwarder udpForwarder =
(UdpForwarder) Naming.lookup("rmi://127.0.0.1:2000/UdpForwarder");
System.out.println("About to get the host.");
String host = SipConfigImpl.getRealHost();
System.out.println("About to get the port.");
int port = SipConfigImpl.getRealPort();
System.out.println("About to ping.");
Ping ping = new Ping( host, port);
Ping lastPing = udpForwarder.handlePing(ping);
SipConfigImpl.setLastPing(ping);

} catch ( Exception ex ) {
// bad things happened when sending ping.
SipConfigImpl.setLastPing(null);
System.out.println("BaseProxySbb: Caught an Exception: " + ex);
ex.printStackTrace();
//System.out.println("bad things happened");
}
}

The code crashes in the line where the lookup happens. Using netstat -a on my XP machine does not show any processes listening on port 2000 ...

Hmmmh. Any Ideas?
BTW.: For curiousity reasons I changed the port to 2005 and 1098 (jndi of JBoss). Both times a crash; with 2005 I got the same error message as below; with 1098 the jndi registry says there is no such entity in the registry ...

-- Michael.

Below is the console log from JBoss:

14:13:39,727 INFO [DeploymentManager] Installation of deployable unit successful
14:13:40,248 INFO [ActivityContextFactoryImpl] Creating AC for key 570d7cfbb5a60491:-13c7d8d6:105771b9a1c:-7fce
14:13:40,328 INFO [EventRouterImpl] number of child sbbs for service = 0
14:13:40,358 INFO [STDOUT] Called setSbbContext JainSipProxy!!!
14:13:40,358 INFO [STDOUT] setSbbContext: got the acif null
14:13:40,358 INFO [STDOUT] setSbbContext: got the fp org.mobicents.slee.resource.sip.SipFactoryProvider@2f97ff
14:13:40,358 INFO [STDOUT] setSbbContext: got the af
14:13:40,368 INFO [STDOUT] setSbbContext: got the hf
14:13:40,368 INFO [STDOUT] setSbbContext: got the mf
14:13:40,478 INFO [SbbEntity] invoking event handler onServiceStarted on com.opencloud.slee.services.sip.proxy.JainSipProxySbbImpl ID SbbID[ProxySbb#NIST#1.0] sbbEntity org.mobicents.slee.runtime.Sbb
Entity@16bd01d currentEvent SleeEventImpl.toString() = {
eventID = EventTypeID[javax.slee.serviceactivity.ServiceStartedEvent#javax.slee#1.0], #5
activitycontext = 570d7cfbb5a60491:-13c7d8d6:105771b9a1c:-7fce
eventObject = org.mobicents.slee.runtime.serviceactivity.ServiceStartedEventImpl@12c55fd
address = null}
14:13:40,508 INFO [ActivityContextFactoryImpl] Creating AC for key 570d7cfbb5a60491:-13c7d8d6:105771b9a1c:-7fcb
14:13:40,568 INFO [SbbEntity] invoking event handler onTimerEvent on com.opencloud.slee.services.sip.proxy.JainSipProxySbbImpl ID SbbID[ProxySbb#NIST#1.0] sbbEntity org.mobicents.slee.runtime.SbbEnti
ty@341db1 currentEvent SleeEventImpl.toString() = {
eventID = EventTypeID[javax.slee.facilities.TimerEvent#javax.slee#1.0], #1
activitycontext = 570d7cfbb5a60491:-13c7d8d6:105771b9a1c:-7fcb
eventObject = org.mobicents.slee.runtime.facilities.TimerFacilityImpl$TimerEventImpl@1a1ee47
address = null}
14:13:40,578 INFO [STDOUT] About to create the udpForwarder!
14:13:41,560 INFO [STDOUT] BaseProxySbb: Caught an Exception: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
java.net.ConnectException: Connection refused: connect
14:13:41,560 INFO [STDOUT] java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
java.net.ConnectException: Connection refused: connect
14:13:41,560 INFO [STDOUT] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:574)
14:13:41,560 INFO [STDOUT] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
14:13:41,560 INFO [STDOUT] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
14:13:41,560 INFO [STDOUT] at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
14:13:41,560 INFO [STDOUT] at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
14:13:41,560 INFO [STDOUT] at java.rmi.Naming.lookup(Naming.java:84)
14:13:41,560 INFO [STDOUT] at com.opencloud.slee.services.sip.proxy.BaseProxySbb.onTimerEvent(BaseProxySbb.java:396)
14:13:41,570 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:13:41,570 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
14:13:41,570 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
14:13:41,570 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
14:13:41,570 INFO [STDOUT] at org.mobicents.slee.runtime.SbbEntity.invokeEventHandler(SbbEntity.java:1407)
14:13:41,570 INFO [STDOUT] at org.mobicents.slee.runtime.EventRouterImpl.routeTheEvent(EventRouterImpl.java:1083)
14:13:41,570 INFO [STDOUT] at org.mobicents.slee.runtime.EventRouterImpl.access$100(EventRouterImpl.java:74)
14:13:41,570 INFO [STDOUT] at org.mobicents.slee.runtime.EventRouterImpl$EventExecutor.run(EventRouterImpl.java:152)
14:13:41,570 INFO [STDOUT] at EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:88)
14:13:41,570 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
14:13:41,580 INFO [STDOUT] Caused by: java.net.ConnectException: Connection refused: connect
14:13:41,580 INFO [STDOUT] at java.net.PlainSocketImpl.socketConnect(Native Method)
14:13:41,580 INFO [STDOUT] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
14:13:41,580 INFO [STDOUT] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
14:13:41,580 INFO [STDOUT] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
14:13:41,580 INFO [STDOUT] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
14:13:41,590 INFO [STDOUT] at java.net.Socket.connect(Socket.java:507)
14:13:41,590 INFO [STDOUT] at java.net.Socket.connect(Socket.java:457)
14:13:41,590 INFO [STDOUT] at java.net.Socket.(Socket.java:365)
14:13:41,590 INFO [STDOUT] at java.net.Socket.(Socket.java:178)
14:13:41,590 INFO [STDOUT] at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
14:13:41,590 INFO [STDOUT] at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
14:13:41,590 INFO [STDOUT] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:569)
14:13:41,600 INFO [STDOUT] ... 16 more

mranga
Offline
Joined: 2003-06-06

Michael,

That is the front end stateless proxy forwarder which we are integrating for the failover trials.

Will get my act together soon :-)

Thanks much for bearing with us.

Ranga

fram
Offline
Joined: 2004-05-13

Hi Michael,
I've a modified version of the proxy that does not use the front-end forwarder I can commit that until we fix the bug.
Francesco