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

w1ve

Guru
Joined
Nov 15, 2007
Messages
819
Reaction score
218
@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
850
Reaction score
248
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

Well-Known Member
Joined
Jan 2, 2011
Messages
1,540
Reaction score
729
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:

w1ve

Guru
Joined
Nov 15, 2007
Messages
819
Reaction score
218
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
819
Reaction score
218
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

Well-Known Member
Joined
Jan 2, 2011
Messages
1,540
Reaction score
729
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.
 

w1ve

Guru
Joined
Nov 15, 2007
Messages
819
Reaction score
218
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

Well-Known Member
Joined
Jan 2, 2011
Messages
1,540
Reaction score
729
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
819
Reaction score
218
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
819
Reaction score
218
@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.
 

avdhesh2828

New Member
Joined
Aug 11, 2020
Messages
5
Reaction score
0
Hi @billsimon and @w1ve @wardmundy
I have setup a new opensips on Ubuntu on AWS , My Opensip.cfg file have below config. I am still getting "SIP/2.0 483 Too Many Hops". Please suggest.
listen=udp:172.31.XX.XXX:5060 as 18.222.XXX.XX:5060 # CUSTOMIZE ME
listen=tcp:172.31.XX.XXX:5060 as 18.222.XXX.XX:5060 # CUSTOMIZE ME
alias=opensips01.example.com
 

avdhesh2828

New Member
Joined
Aug 11, 2020
Messages
5
Reaction score
0
@billsimon Thank you very much for your response.

Please find attached call flow with sngrep, it seems loop is generated from Private IP to Public IP. I am pretty new for opensips, opensips sip trace not working. Please let me know if this below can help or else I need to figure it out to how I can get SIP trace.
Current opensips version : version: opensips 3.0.2 (x86_64/linux

Screen Shot 2020-08-11 at 8.01.09 AM.png

Thanks,
 

avdhesh2828

New Member
Joined
Aug 11, 2020
Messages
5
Reaction score
0
3.x.x.x is opensips Servers, I am trying to register user on opensips.
172.31.x.x is private ip of opensips server
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,540
Reaction score
729
Then your listen= lines need to contain that 3.x.x.x ip address, not the 18.222.x.x. (What is the 18.222.x.x?)
 

avdhesh2828

New Member
Joined
Aug 11, 2020
Messages
5
Reaction score
0
So I have dynamic IP for opensips server.
lets in this case: 52.15.X.X, Private IP 172.31.X.X.

Please find current config and attached result, Still going to loop.
listen=udp:172.31.40.116:5060 as 52.15.105.166:5060 # CUSTOMIZE ME
listen=tcp:172.31.40.116:5060 as 52.15.105.166:5060 # CUSTOMIZE ME
alias=52.15.105.166

Thanks
 

Attachments

  • Screen Shot 2020-08-11 at 1.09.53 PM.png
    Screen Shot 2020-08-11 at 1.09.53 PM.png
    221.1 KB · Views: 4

Members online

Forum statistics

Threads
25,811
Messages
167,759
Members
19,240
Latest member
nikko
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top