TIPS OpenSips on Debian 8 -- Registering my first client phone fails...

w1ve

Guru
Joined
Nov 15, 2007
Messages
642
Reaction score
98
@wardmundy. followed your tutorial to the T, however, when registering I always get Registration Failed (Too Many Hops (483))

Any idea what's wrong?

Thanks!
 

dallas

Active Member
Joined
Oct 21, 2007
Messages
212
Reaction score
27
Location
Sydney, Australia
I found this on the OpenSIP Users mailing list. It's a bit old, but it may lead you to a solution. I think you need a port number in you registration request.


[OpenSIPS-Users] 483 error Too Many Hops

It looks like I'm having a NAT issue, when the client is trying to register
to the opensip server, my opensips server doesn't realize that
52.34.116.253 is itself, it only know that 172.31.23.32 (the private IP) is
its IP address. So when my request send to 52.34.116.253 (my opensips
server public IP), it doesn't realize that is itself, so my server forward
the request to 52.34.116.253, which is itself, again and again.
 

billsimon

Experienced in Asterisk, FreePBX, and SIP
Joined
Jan 2, 2011
Messages
966
Reaction score
303
I have a good deal of experience with opensips and would be glad to answer any questions.

If the proxy is looping requests a common reason is that it doesn't know its own name. Make sure the config has alias= lines for every name you are using for your proxy.

The header of your opensips.cfg should include all the IPs and DNS names, including NAT addresses, like this:

listen=udp:192.168.100.5:5060 as 52.53.54.55:5060
listen=tcp:192.168.100.5:5060 as 52.53.54.55:5060
alias=my.fqdn.example.com
alias=my-other.fqdn.example.com
 
Last edited:
  • Like
Reactions: w1ve and wardmundy

w1ve

Guru
Joined
Nov 15, 2007
Messages
642
Reaction score
98
Thanks Bill,

/etc/opensips/opensips.cfg
/etc/opensips/opensips.cfg.orig
/root/opensips.cfg
/root/kvm/opensips.cfg

I presume /etc/opensips/opensips.cfg is the correct one to edit?
 

w1ve

Guru
Joined
Nov 15, 2007
Messages
642
Reaction score
98
So Thanks Bill, I can now register my extension.
Real newbie at openSips.
So, I can make calls between registered softphones.

I created a gateway to a provider that has IP Authentication.
In my gateway, I have the DNS name for this provider. Should this be only the IP Address?
The type is set to proxy.

When I dial a full 10-digit number, nothing happens, the call terminates.
How do I enable SIP trace so I can see what is going on?
 

billsimon

Experienced in Asterisk, FreePBX, and SIP
Joined
Jan 2, 2011
Messages
966
Reaction score
303
Install sngrep to make your SIP debugging easier: https://github.com/irontec/sngrep

You can enable debug output in opensips by adding "debug_mode=yes" near the top of your config file (it's probably already there and commented out).

As far as the name for the gateway, opensips will work with DNS names (SRV lookups or A records) or IP addresses; just do whatever your provider wants.
 
  • Like
Reactions: w1ve

w1ve

Guru
Joined
Nov 15, 2007
Messages
642
Reaction score
98
Again, much thanks. Came back today to configure more... SSH, no trouble.
However, cannot access web site.
http://127.0.0.1 403 ACCESS FORBIDDEN
Public IP: Same.

Any ideas?

netstat -tulpn shows apache2 running on ipv6 port 80, nothing for ipV4 (which I guess is common.)
 

billsimon

Experienced in Asterisk, FreePBX, and SIP
Joined
Jan 2, 2011
Messages
966
Reaction score
303
I dunno; once you troubleshoot apache, come back and we can talk about opensips. :)

HTTP 403 error is usually wrong password...
 

w1ve

Guru
Joined
Nov 15, 2007
Messages
642
Reaction score
98
On the web site which has no password ... this is the root of the site, which should be the login...
OK.. Yep... will tinker.
 

w1ve

Guru
Joined
Nov 15, 2007
Messages
642
Reaction score
98
@billsimon Apache and I are now on speaking terms. @wardmundy's articles have piqued my interest, but I'm stuck a bit moving forward. If you don't mind more newbie questions, I'll ask away. If they are too dumb or you want to point me to a (valuable) online resource, that would be fine. It seems most OpenSips docs just tell you what configurations fields are, they don't explain how to use them!

So -- my goal is to use OpenSips are a Session Border Controller. All my PBX instances are cloud hosted. I want endpoints for multiple domains to register via OpenSips. I understand how to do that, and it is working.

What I want to understand is how routing works.

So, let's say I want to route all 10-digit NA calls to a particular provider, which uses IP Auth. This provider has a steering prefix. I'm not sure where to put the Steering prefix in.
Any enlightenment is appreciated, and any tips of brilliance will be accepted gracefully.
 

Members online

Latest Posts

PIAF 5 - Powered by 3CX

Forum statistics

Threads
22,364
Messages
137,341
Members
14,574
Latest member
ipv6freely