SIP Tunnel problems

neutron

Joined
Feb 1, 2009
Messages
8
Likes
0
Points
0
#1
Hi there,
Ive been trying to get my first elastix box setup for the last two weeks and after hundreds of google searches, Im out of ideas and in search of help. Thanks in advance for any assistance that can be provided.

Elastix Version: 1.3-2
Asterisk: Asterisk 1.4.22-rc5
LAN setp: Linksys wrt310n router, Elastix box has been placed in the DMZ, firewall on the router has been turned off

Everything works great, but I cant seem to get both inbound and outbound calling working at the same time over my voipvoip.com SIP trunk. It seems like a NAT issue, because when I adjust the nat setting in the trunk confguration, it will fix the problem I have with inbound, for instance, but break the outbound. Nothing I have found yet has solved both problems at once.

At the moment, I have set my trunk configuration back to the exact reccomended settings from VoipVoip.com's config guide:

Code:
Outbound Caller ID: *My 10 digit DID number*
Dial Rules: 1415+NXXXXXX (For 7 digit dialing)

Outgoing Settings

Trunk Name: voipvoip

PEER Details:

username=*my SIP number for voipvoip*
type=peer
secret=******
nat=auto
insecure=very
host=sip3.voipvoip.com
fromuser=*My SIP Number*
fromdomain=sip3.voipvoip.com
dtmfmode=rfc2833
disallow=all
allow=g729&ilbc&ulaw&alaw

Incoming Settings:

User Context: *My SIP Number*

User Details:

username=*My Sip Number from voipvoip*
type=user
secret=********
nat=auto
insecure=very
host=sip3.voipvoip.com
fromdomain=sip3.voipvoip.com
dtmfmode=rfc2833
disallow=all
allow=g729&ulaw&alaw&ilbc
context=from-trunk

Registration String:
My SIP Number:*******@sip3.voipvoip.com/My Sip Number
With this setup, I can make calls most of the time. When I try to dial in from my cell phone, the call is just silent, no ringing, no nothing. Sometimes, its an error from voipvoip.com saying that my extension is not available, as if Im not logged in. When the outbound calls stop working, inbound calls will work.

When inbound calls are working and I do a "sip show registry" I see this:

Code:
Host                            Username       Refresh State                Reg.Time                 
sip3.voipvoip.com:5060          *My SIP Number*         105 Registered           Sun, 01 Feb 2009 12:45:09
When inbound calls are working and I do a "sip show channels" I see this:

Code:
Peer             User/ANR    Call ID      Seq (Tx/Rx)  Format           Hold     Last Message   
69.90.209.56     (None)      e720f306-f0  00101/00001  0x0 (nothing)    No       Rx: OPTIONS               
69.90.209.57     (None)      9b8ab9a3-0b  00101/00001  0x0 (nothing)    No       Rx: OPTIONS               
2 active SIP channels
When inbound calls stop working, but outbound calls are working, here are the results:

"sip show registry"

Code:
 	Host                            Username       Refresh State                Reg.Time                 
sip3.voipvoip.com:5060          *My Sip Number"         105 Registered           Sun, 01 Feb 2009 12:59:10
"sip show channels"

Code:
Peer             User/ANR    Call ID      Seq (Tx/Rx)  Format           Hold     Last Message   
69.90.209.57     (None)      9b8ab9a3-e5  00101/00001  0x0 (nothing)    No       Rx: OPTIONS               
1 active SIP channel
When I add the following code to sip_custom.conf, I get different results:

Code:
nat=yes
externhost=<My IP>
externrefresh=10
localnet=33.33.33.0/255.255.255.0
bindport = 5060 ; Port to bind to (SIP is 5060)
bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine)
With that code added, I receive calls perfectly, but get an "all circuits are busy" error when I call outbound.

Can anyone help me out? Thanks for taking the time to read this.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#2
Possibly because your internal network is 33.33.33.0/255.255.0 this is a real routable network in the real world, and the SIP VIA messages are confusing to voipvoip? possible because your router is equally confused?

You shouldn't have the box in the DMZ it is a VERY dangerous place, you shouldn't turn off the firewall is a VERY dangerous thing to do. Jjust a couple of port forward rules on the router will work perfectly well, these rules are to be found in many many places here.

Try changing your lan to a private network address that follows RFC 1918 and RFC 4193. e.g. 192.168.33.0/255.255.255.0 , turn off the DMZ and see if anything changes.
 

neutron

Joined
Feb 1, 2009
Messages
8
Likes
0
Points
0
#3
Thanks dicko. Gave it a shot and Im still getting the same results. Inbound calling works great, outbound is giving me "all circuits are busy"

Edit...Its wierd, I rebooted the server a second time, inbound calling is giving me this error "NSF 01 Your call cannot be completed at this time", outbound started working.

To recap, here are the changes I made:

Local LAN is now 192.168.33.0/24
DMZ is turned off.
Ports 5060 and 10000:20000, both UDP, are forwarded to the Elastix box

Also, when I do a "show sip channels" now, my SIP number is shown under "User/ANR" instead of (none).
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#4
and

nat=yes
externhost=<externally resolvable hostname> ; (or externip = x.x.x.x if you paid for a static IP )
externrefresh=10 ; (if you use externhost)
localnet=192.168.33.0/255.255.255.0

in

the sip configuration?
 

neutron

Joined
Feb 1, 2009
Messages
8
Likes
0
Points
0
#5
In my sip_custom.conf, I put this and the rebooted:

Code:
nat=yes
externalip=<my public ip>
localnet=192.168.33.0/255.255.255.0
Ive made a bunch of test calls and so far, I can still either make inbound calls or outbound calls. When the inbound is working, the outbound is saying "all circuits are busy". When outbound works, the inbound gives me the error from voipvoip.com as if I'm not logged in.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#6
my apologies that should be

externip=x.x.x.x

just like it says in the manual, (you did read the manual, didn't you?)

(you can save a lot of time by not continually rebooting, this is not a window box (sic. typo, but I think I like it anyway) and rarely needs such brutal treatment)
 

neutron

Joined
Feb 1, 2009
Messages
8
Likes
0
Points
0
#7
No worries, sip_custom.conf now reads:

Code:
nat=yes
externip=<my public ip>
localnet=192.168.33.0/255.255.255.0
Inbound calling is getting the error from voipvoip.com that Im not logged in, Outbound is working fine.

I did not read the manual, only many many internet articles. Thank you so much for your help by the way.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#8
well, I should watch what I say, you don't need to reboot, but an amportal restart from the bash prompt or usually just from the the asterisk CLI interface a

sip reload
(to reload the configuration files)

then a
sip show registry
(which will confirm you have successfully registered for inbound calls)

and a


sip show peers,
(to show that voipvoip is available for outbound calls,


If both show you can go on to watch the asterisk box while you make a call.

If all the above still fails try donloading Elastix without Tears from this site, and start over with a fresh installation after you've finished reading it. That seems to be a well accepted way of getting a working system

Sorry I couldn't help you fix it. But good Luck
 

neutron

Joined
Feb 1, 2009
Messages
8
Likes
0
Points
0
#9
Thanks for the effort dicko. I actually did follow Elastix Without Tears right up to the point of the SIP trunk section, where I couldn't progress.

For anyone else who can give me some advice, Im stil getting either inbound or outbound calls. When one works, the other doesn't. I either get "all circuits are busy" when I dial out, or an error from voipvoip.com saying Im not logged in when I call inbound.

"sip show registry" returns:

Code:
Host                            Username       Refresh State                Reg.Time                 
sip3.voipvoip.com:5060          <my-sip-number>         105 Registered           Sun, 01 Feb 2009 16:58:18
"sip show peers" returns:

Code:
Name/username              Host            Dyn Nat ACL Port     Status               
voipvoip/my-sip-number        69.90.209.57                5060     OK (21 ms)           
201/201                    (Unspecified)    D   N      0        UNKNOWN              
200/200                    192.168.33.101   D   N      5060     OK (11 ms)           
3 sip peers [Monitored: 2 online, 1 offline Unmonitored: 0 online, 0 offline]
 

wiseoldowl

Joined
Aug 19, 2008
Messages
251
Likes
0
Points
0
#10

wiseoldowl

Joined
Aug 19, 2008
Messages
251
Likes
0
Points
0
#11
OH... I see your problem. See all this?

Incoming Settings:

User Context: *My SIP Number*

User Details:

username=*My Sip Number from voipvoip*
type=user
secret=********
nat=auto
insecure=very
host=sip3.voipvoip.com
fromdomain=sip3.voipvoip.com
dtmfmode=rfc2833
disallow=all
allow=g729&ulaw&alaw&ilbc
context=from-trunk

Remove it. All of it. Blank those field out completely. Your User Context and User Details should be empty.

Now, take this one line:

context=from-trunk

Paste that at the bottom of your PEER details. Not the USER details, the PEER details.

Click the button, click the bar and you should be good to go. I'm betting this will work, unless you have that "one in a thousand" provider that actually does treat you as a peer rather than an extension. With the majority of VoIP providers you don't use the USER section at all (it is totally ignored), but you still need the context statement so that incoming calls have someplace to go, therefore it gets moved to the PEER details.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#12
The server shows everything is good to go, you don't by any chance have any other voip services on port 5060 anywhere on your network do you, that inbound/outbound behaviour suggests that perhaps you might.

Edit:-

missed your post wiseoldowl, good catch
 

neutron

Joined
Feb 1, 2009
Messages
8
Likes
0
Points
0
#13
wiseoldowl -
Thanks, I made the changes but still no change. The trunk still shows registered and SIP peer still shows "OK". Still the same problems.

dicko - the elastix box is definitely the only thing sending out on 5060. Im just trying to get this thing going in my test network at home, so Im the only user.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#14
Then all I can suggest is try another provider. to eliminate the voipvoip variable
 

neutron

Joined
Feb 1, 2009
Messages
8
Likes
0
Points
0
#15
Yup, thats what I decided this morning too. Just waiting for voipstreet.com to activate my new account. Seemed wierd though, because voivoip advertised support for Asterisk/Elastix. Can you recommend some good SIP trunking services? And thank you both for the help.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#16
Where you live (are code 415) you can't go wrong with Vitelity.
The good thing is I believe you've got the box set up right now
 

neutron

Joined
Feb 1, 2009
Messages
8
Likes
0
Points
0
#17
I just setup an account with Vitelity and everything is working perfectly. Thanks for everything dicko.

I noticed they use two different trunks, one for inbound and one for outbound. At some point, Im going to setup the voivoip connection that way and see if it fixes it...for now, Im done working on this. Thanks.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#18
Your welcome,

Seperate trunks are quite normal, further vitelity uses round-robin dns resolution of both inbound and outbound server names so don't be tempted to use an ip address here (as some might advise for other reasons). it allows them to manage busy times and bypass bad servers.

I personally have long separated inbound and outbound trunks for this and other reasons. If you try and do the same PLEASE at least read the sip.conf pages at voip-info.org, it will(and would have) saved you "many hours of google searching". and don't try and register your outbound trunk it should not be necessary.

Anyway, welcome to Elastix and voip.
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,967
Messages
131,026
Members
17,677
Latest member
John-V
Top