Providing Port

Hi people,

I need to ask one more thing that the userid registered to call is username@sipserver:port where port ranges from 5070 to some range. Why it is necessary to provide the port when calling someone from the sip phone. The dialer can never know about the port.

I am awaiting your answer please provide a way from which the need for providing the port can be eliminated.

Thanks

Basit Ali

Isn’t there any way on the server or the client to automatically forward to or lookup for the desired port . . . ?

Basit Ali

Hi,

can you provide more information about the problem you have with ports

-dele

Aah a reply :D. I’ll explain all the steps:

  1. I login through the userid 101031 from my client which successfully connects and displays the dialpad.

  2. I then logged in from another pc using userid 101007 which also successfuly connected to the server.

The messages displayed at the openfire server console are:

2008-07-09 19:02:31,359 INFO org.red5.server.net.rtmp.RTMPHandler - Connecting to:

2008-07-09 19:02:31,375 INFO org.red5.server.net.rtmp.RTMPHandler - DEBUG - conn RTMPMinaConnection from 116.71.17.94 : 2153 to myopenfireserver.com (in: 3415 out 3073 ), scope , call Service: null Method: connect Num Params: 0

2008-07-09 19:02:31,375 INFO org.red5.server.net.rtmp.RTMPHandler - DEBUG - args {}

2008-07-09 19:02:31,375 INFO org.red5.server.jmx.JMXFactory - Object name: org.red5.server:type=Client,id=0

Red5SIP Client connected 0 service RTMPMinaConnection from 116.71.17.94 : 2153 to myopenfireserver.com (in: 3415 out 3073 )

Red5SIP Client joined app 0

2008-07-09 19:02:31,406 INFO org.red5.server.jmx.JMXFactory - Object name: org.red5.server:type=RTMPMinaConnection,connectionType=persistent,host=myopenfi reserver.com,port=1935,clientId=0

Red5SIP login 101031

Red5SIP open creating sipUser for 101031 on sip port 5070 audio port 3000

2008-07-09 19:02:31,906 INFO org.red5.server.net.rtmp.RTMPHandler - Connecting to:

2008-07-09 19:02:31,906 INFO org.red5.server.net.rtmp.RTMPHandler - DEBUG - conn RTMPMinaConnection from 116.71.17.94 : 2152 to myopenfireserver.com (in: 3415 out 3073 ), scope , call Service: null Method: connect Num Params: 0

2008-07-09 19:02:31,921 INFO org.red5.server.net.rtmp.RTMPHandler - DEBUG - args {}

2008-07-09 19:02:31,921 INFO org.red5.server.jmx.JMXFactory - Object name: org.red5.server:type=Client,id=1

Red5SIP Client connected 1 service RTMPMinaConnection from 116.71.17.94 : 2152 to myopenfireserver.com (in: 3415 out 3073 )

Red5SIP Client joined app 1

2008-07-09 19:02:31,984 INFO org.red5.server.jmx.JMXFactory - Object name: org.red5.server:type=RTMPMinaConnection,connectionType=persistent,host=myopenfi reserver.com,port=1935,clientId=1

SIPUser Constructor: sip port 5070 rtp port:3000

SIPUser login

Red5SIP register

SIPUser register

RegisterAgent: Registering contact sip:101031@11.22.33.44:5070 (it expires in 3600 secs)

RegisterAgent: Registration success:

SIP Registration success 200 OK

Red5SIP login 101031

SIPUser login

Red5SIP register

SIPUser register

RegisterAgent: Registering contact sip:101031@11.22.33.44:5070 (it expires in 3600 secs)

2008-07-09 19:02:43,406 INFO org.red5.server.net.rtmp.RTMPHandler - Connecting to:

2008-07-09 19:02:43,406 INFO org.red5.server.net.rtmp.RTMPHandler - DEBUG - conn RTMPMinaConnection from 116.71.17.94 : 2159 to myopenfireserver.com (in: 3415 out 3073 ), scope , call Service: null Method: connect Num Params: 0

2008-07-09 19:02:43,406 INFO org.red5.server.net.rtmp.RTMPHandler - DEBUG - args {}

2008-07-09 19:02:43,406 INFO org.red5.server.jmx.JMXFactory - Object name: org.red5.server:type=Client,id=2

Red5SIP Client connected 2 service RTMPMinaConnection from 116.71.17.94 : 2159 to myopenfireserver.com (in: 3415 out 3073 )

Red5SIP Client joined app 2

2008-07-09 19:02:43,421 INFO org.red5.server.jmx.JMXFactory - Object name: org.red5.server:type=RTMPMinaConnection,connectionType=persistent,host=myopenfi reserver.com,port=1935,clientId=2

Red5SIP login 101007

Red5SIP open creating sipUser for 101007 on sip port 5072 audio port 3002

SIPUser Constructor: sip port 5072 rtp port:3002

SIPUser login

Red5SIP register

SIPUser register

RegisterAgent: Registering contact sip:101007@11.22.33.44:5072 (it expires in 3600 secs)

RegisterAgent: Registration success:

SIP Registration success 200 OK

Now, if user 101031 needs to dial to 101007, dialing just 101031 on the phone doesnot connect. Or from any other sip phone if i dial to 101031@11.22.33.44 doesnot connect to the user. I have to dial 101031@11.22.33.44:5070 or 101007@11.22.33.44:5072 in order to successfuly connect to the phone.

My question was that is it supposed to work this way or am I missing something ?

Thanks for pasting your console log, but it does not explain why you nned the port number even though both sip:101007@11.22.33.44:5072 and sip:101031@11.22.33.44:5070 register sucessfully with your SIP proxy. What proxy are you using??. Can you also paste the SIP log files. They are named xxx.xxx.xxx.xxx_5072_messages.log and xxx.xxx.xxx.xxx_5070_messages.log.

-dele

Dialing at 101007@11.22.33.44 doesnot connect to the person :(. I have to dial 101007@11.22.33.44:5072 for connecting. I’ll just cleanup the logs and post some fresh ones.

Here are the logs. I’ve reconnected 101031 and 101007 and they got registered on ports 5070 and 5071 respectively.
70.85.10.26.5070_messages.log (47000 Bytes)
70.85.10.26.5071_messages.log (23496 Bytes)

I am not so sure as 70.85.10.26.5071_events.log would have told me more, but If you are using a different SIP port 8891 than 5060 on asterisk, then edit mjsip conf file sip.cfg and add

default_port=8891

instead of using mysipserver.com:8891

I have included the template mjsip config file for all possible mjsip parameter changes. SIP to Asterisk is handled by mjsip, so you might need more configuration for a non standard situation.

-dele
mjsip.cfg.txt (16478 Bytes)

Edited sip.cfg and added the line and removed the port from the sip server texbox. Tried with user 101031 and it connects :D. But still to dial to this user I have to dial “101031@11.22.33.44:5070” :(. Why can’t it recieve the call by dialing "101031@11.22.33.44" ?

Why can’t it recieve the call by dialing "101031@11.22.33.44" ?

I wish I knew why, but it seems you are better off asking this question at mjsip.org

Hmmm i’ve emailed them the problem and the link to this forum. I hope they can help too :). One thing more, will the asterisk config file be of any help in solving this problem. If yes then I may ask for it and post it here or in a personal message.

Basit Ali

If you don’t mind posting your asterisk config file here, I would like to take a look. I use a desk SIP hardphone and it works fine as well as SIP phone in Spark. I might download xlite and test it as well.