PDA

View Full Version : Asterisk help



firestorm_v1
06-16-2009, 12:08 PM
Hello all!

I'm a new asterisk user and for a while now I was using a couple of free VoIP providers for inbound and outbound testing. When I started working at another company, one of the perks was that I got a free VOIPo account.

My very first reaction was joy at thinking how cool it'd be to finally deploy my own VoIP gateway for the house. I have a Dell 1U rackmount server that I scored from Goodwill for $30 because it wouldn't post. (they weren't using ECC RAM.)

Well, I got the latest Trixbox/Asterisk/FreePBX ISO image and installed it and have run into a problem. Any VoIP device (softphone, Wifi-Phone, PAP2) can call out from the VOIPo trunk, but any attempt to call in gets a busy signal.

I have checked Google and scoured the Asterisk/FreePBX/Trixbox forums hoping to find a solution but have come up with bupkiss. In fact, some of the settings for the inbound calling, caused me to lose outbound call as well but I was able to get that fixed.

Here's where I need help. I need to find what I'm doing wrong and I hope I'm not the only person with VOIPo that has done this (much less pulled it off). I'm looking forward to getting this thing running and I have great plans for developing it from a testing box that I mess with on occasion to something that I can use full-time.

I have tried entering my credentials into a Zyxel P2000W (WiFi VOIP phone), X-lite for PC, and the PAP2, all work flawlessly both incoming and outgoing, so I know it's not a network issue.

Important information:
Inbound calls fail, but outbound calls work great only when through Asterisk server.
(Perfect quality, even on the old Zyxel Wifi phone.)
{VOIPo assigned #}=Ten digit phone number, no leading "1"
{VOIPo password}= VOIPO Assigned password.
I have "Allow Anonymous Inbound SIP Calls" set to "Yes" but setting it to "No" causes the same symptom and does not change the logfile output.

OS/Asterisk versions:
Asterisk version: Asterisk 1.4.22-3 RPM
CentOS release 5.3 (Final)



Inbound Route settings:
All default, except for the following items
- DID Number = {VOIPo assigned #}
- Destination - Ring Group 600 (all phones), (right now, only ext. 200 exists)

Trunk Settings:
(All fields not mentioned are using their default settings)
- Outbound Caller ID = {VOIPo assigned #}
- Maximum Channels =
- Dial Rules NXXNXXXXXX
- Trunk Name = VOIPo
===Outgoing Settings===
PEER Details:
host=central01.voipwelcome.com
username={VOIPo assigned #}
secret={VOIPo assigned password}
type=peer
context=from-trunk

===Incoming Settings===
USER Context = {VOIPo assigned #}
User Details:
secret={VOIPo password}
type=user
context=from-trunk
disallow=all
allow=ulaw
insecure=very


Registration String:
{VOIPo assigned #}:{VOIPo password}@central01.voipwelcome.com

When I get a call, this is the result of enabling SIP debug (level 10)


Here is a sample of the sip debug info:



<------------>
[Jun 16 12:54:22] VERBOSE[2706] logger.c: Scheduling destruction of SIP dialog 'f4c8cf11-9d306831-59925@67.228.251.106' in 32000 ms (Method: OPTIONS)
[Jun 16 12:54:25] VERBOSE[2706] logger.c: Really destroying SIP dialog '396f1aae60b012da1be594557674bc4f@127.0.0.1' Method: REGISTE R
[Jun 16 12:54:47] VERBOSE[2706] logger.c:
<--- SIP read from 67.228.251.106:5060 --->
INVITE sip:s@192.168.0.14 SIP/2.0
Record-Route: <sip:67.228.251.106;lr=on;ftag=gK0d74ea75;vsf=R1NEd nlmMjhPZklRTmJBTjNHU0R2eWYyOE9mSWo+ETUgHjcyNhcUFQ8 Bf159aX9acXYLfDA0FUQJQFwmCCgjNw-->
Record-Route: <sip:75.126.236.179;lr=on;ftag=gK0d74ea75>
Via: SIP/2.0/UDP 67.228.251.106;branch=z9hG4bKe9e6.3aaa9112.0
Via: SIP/2.0/UDP 75.126.236.179;rport=5060;branch=z9hG4bKe9e6.c271a bc4.0
Via: SIP/2.0/UDP 64.156.174.74:5060;rport=5060;branch=z9hG4bK0dB3f0 a756d33aed219
f: "{Incoming Caller ID Name}" <sip:{Calling Phone #}@64.156.174.74>;tag=gK0d74ea75
t: <sip:{VOIPo Phone #}@75.126.236.179>
i: 386786062_71891924@64.156.174.74
CSeq: 32189 INVITE
Max-Forwards: 68
Allow: INVITE,ACK,CANCEL,BYE,REGISTER,REFER,INFO,SUBSCRIB E,NOTIFY,PRACK,UPDATE,OPTIONS
Accept: application/sdp, application/isup, application/dtmf, application/dtmf-relay, multipart/mixed
m: <sip:{Calling Phone #}@64.156.174.74:5060;nat=yes>
Supported: timer
Session-Expires: 1800
Min-SE: 90
Content-Length: 356
Content-Disposition: session; handling=required
c: application/sdp

v=0
o=Sonus_UAC 15405 4467 IN IP4 64.156.174.74
s=SIP Media Capabilities
c=IN IP4 67.228.251.106
t=0 0
m=audio 62624 RTP/AVP 0 18 4 101
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no;bitrate=6.3
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=ptime:30
a=nortpproxy:yes

<------------->
[Jun 16 12:54:47] VERBOSE[2706] logger.c: --- (20 headers 16 lines) ---
[Jun 16 12:54:47] VERBOSE[2706] logger.c: Sending to 67.228.251.106 : 5060 (no NAT)
[Jun 16 12:54:47] VERBOSE[2706] logger.c: Using INVITE request as basis request - 386786062_71891924@64.156.174.74
[Jun 16 12:54:47] VERBOSE[2706] logger.c: Found peer 'VOIPo'
[Jun 16 12:54:47] VERBOSE[2706] logger.c:
<--- Reliably Transmitting (no NAT) to 67.228.251.106:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 67.228.251.106;branch=z9hG4bKe9e6.3aaa9112.0;recei ved=67.228.251.106
Via: SIP/2.0/UDP 75.126.236.179;rport=5060;branch=z9hG4bKe9e6.c271a bc4.0
Via: SIP/2.0/UDP 64.156.174.74:5060;rport=5060;branch=z9hG4bK0dB3f0 a756d33aed219
From: "{Incoming Caller ID Name}" <sip:{Calling Phone #}@64.156.174.74>;tag=gK0d74ea75
To: <sip:{VOIPo Phone #}@75.126.236.179>;tag=as5840874d
Call-ID: 386786062_71891924@64.156.174.74
CSeq: 32189 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Proxy-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="137a0d35"
Content-Length: 0


<------------>
[Jun 16 12:54:47] VERBOSE[2706] logger.c: Scheduling destruction of SIP dialog '386786062_71891924@64.156.174.74' in 32000 ms (Method: INVITE)
[Jun 16 12:54:47] VERBOSE[2706] logger.c:
<--- SIP read from 67.228.251.106:5060 --->
ACK sip:s@192.168.0.14 SIP/2.0
Via: SIP/2.0/UDP 67.228.251.106;branch=z9hG4bKe9e6.3aaa9112.0
f: "{Incoming Caller ID Name}" <sip:{Calling Phone #}@64.156.174.74>;tag=gK0d74ea75
Call-ID: 386786062_71891924@64.156.174.74
To: <sip:{VOIPo Phone #}@75.126.236.179>;tag=as5840874d
CSeq: 32189 ACK
Max-Forwards: 70
User-Agent: Kamailio (1.4.3-notls (i386/linux))
Content-Length: 0


<------------->
[Jun 16 12:54:47] VERBOSE[2706] logger.c: --- (9 headers 0 lines) ---
[Jun 16 12:54:49] VERBOSE[2706] logger.c:
<--- SIP read from 192.168.0.5:49248 --->




I'll try anything, but while I do have the PAP2, I can't afford the digium card needed to bring a POTs line into the server. (theyre about $300!).

Thank you for your help!

dswartz
06-16-2009, 01:13 PM
put the DID on the end of your registration string like this:

user:secret@central01.voipwelcome.com/DID

firestorm_v1
06-16-2009, 05:36 PM
Hello dswartz. I went ahead and tried your suggestion, and still a no-go. Same as above but still no incoming calls.

dswartz
06-16-2009, 06:16 PM
busy or fast busy?

fisamo
06-16-2009, 06:16 PM
Not to insult your intelligence, but I have to ask...

Let's say your Voipo number is 9195551234 and your assigned password is hg2y08x1.

Your register string should look like this:

9195551234:hg2y08x1@central01.voipwelcome.com/9195551234

You should have an inbound route that directs 9195551234 to a valid extension or ring group. (which it sounds like you already do)

Have you considered setting up a 'catchall' route to your desk phone? (Any DID/Any CID)

scott2020
06-17-2009, 07:10 AM
A friend of mine had a similar problem. He was trying to register to central01 and his DID was assigned to east.voipwelcome.com (east01, whatever the exact name is). I thought people could register to any of them (central, east, etc) but in his case, it made a difference.

firestorm_v1
06-17-2009, 08:21 AM
Hello:

dswartz: There's about a 30sec pause of dead air (and I can see incoming SIP transactions from various IPs with the callerID info) then it cuts to a normal fast busy.

Fisamo:
I have tried it with the format described and without the /{DID} at the end. It did not appear to change things except without the DID at the end, I got "Ignoring this INVITE request". I have two inbound routes in place, one for anyDID/anyCID and one for the number assigned to me by VOIPo. Both of them have a target of Extension 200.

scott2020:
That might be the case, but what's really throwing me for a loop is that I plug my cred. into X-Lite or into my Wifi phone connected to the network (not through Asterisk) and both of them can send and receive calls without issue. Now an odd thing is that for the Zyxel wifi phone, I can't use hostnames so I have to use IP addressess, but I have never had a problem with its functionality.

Curiouser and curiouser...

Don't worry about insulting my intelligence, if you have something you want me to try, then by all means speak up. Chances are, you're thinking of something I'm missing or have easily overlooked.

dswartz
06-17-2009, 09:19 AM
Here is my config:

Outgoing:

trunkname voipo.com

username=user
fromuser=user
fromdomain=east01.voipwelcome.com
type=peer
secret=secret
qualify=yes
host=east01.voipwelcome.com
disallow=all
allow=ulaw
insecure=invite

Incoming:

User context: VOIPO_in

type=peer
secret=secret
qualify=yes
insecure=very
host=east01.voipwelcome.com
disallow=all
allow=ulaw
context=custom-voipo

p.s. I may be off base here, but I seem to recall having problems if I didn't use 'peer' for inbound.

scott2020
06-17-2009, 02:39 PM
Here's what I have

For Outgoing:



disallow=all
username=myDIDNumber
type=peer
secret=mypassword
qualify=yes
nat=yes
insecure=port,invite
host=central01.voipwelcome.com
fromuser=myDIDnumber
fromdomain=codeblue.voipo.com
context=from-sip
allow=ulaw


For incoming:


disallow=all
type=peer
secret=mySIPpassword
qualify=yes
nat=yes
insecure=port,invite
host=central01.voipwelcome.com
context=from-sip (this will be different possibly)
allow=ulaw


My register string is like yours, but with the / and DID after it.

firestorm_v1
06-17-2009, 03:21 PM
context=custom-voipo


Dswartz:
I tried your config but I have never seen this context used. How did you define it?

scott2020:
I tried your config too and I don't know if I've taken a step forward or a step back. The line rings once, and then I get a male voice that says "The number or code that you have dialed is incorrect. Please check the number or code and try again."

I noticed that the log goes nuts when I call it, and it looks like the call IS hitting the server:
[Jun 17 16:10:18] --- (20 headers 16 lines) ---
[Jun 17 16:10:18] Sending to 67.228.251.106 : 5060 (no NAT)
[Jun 17 16:10:18] Using INVITE request as basis request - 420301830_32241846@64.156.174.74
[Jun 17 16:10:18] Found peer 'VOIPo'
[Jun 17 16:10:18] Found RTP audio format 0
[Jun 17 16:10:18] Found RTP audio format 18
[Jun 17 16:10:18] Found RTP audio format 4
[Jun 17 16:10:18] Found RTP audio format 101
[Jun 17 16:10:18] Peer audio RTP is at port 67.228.251.106:43066
[Jun 17 16:10:18] Found audio description format PCMU for ID 0
[Jun 17 16:10:18] Found audio description format G729 for ID 18
[Jun 17 16:10:18] Found audio description format G723 for ID 4
[Jun 17 16:10:18] Found audio description format telephone-event for ID 101
[Jun 17 16:10:18] Capabilities: us - 0x4 (ulaw), peer - audio=0x105 (g723|ulaw|g729)/video=0x0 (nothing), combined - 0x4 (ulaw)
[Jun 17 16:10:18] Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
[Jun 17 16:10:18] Peer audio RTP is at port 67.228.251.106:43066
[Jun 17 16:10:18] Looking for {My Voipo #} from-sip (domain 192.168.0.14)
[Jun 17 16:10:18]


Another question is that I have the catchall route set to Extension 200 (softphone). Should I set this to Ring Group 600 (Ring all phones) or should I wait until I can confirm its operation first?

I can't thank you all enough for your help with this. I am very excited at the possibility of getting this up and running. :)

firestorm_v1
06-17-2009, 03:50 PM
Here's something interesting. I looked in my vPanel to see what it was saying about registered devices. It shows: sip: (VOIPo phone number)@192.168.0.14

Shouldn't that be my WAN IP address? Is there anything in Asterisk I can use to adjust that so that it shows my IP? What are the ramifications of it using the .14 address (That is the IP of the trixbox server on my local network.

caseydoug
06-17-2009, 06:21 PM
I can't give you asterisk advice, but as I recall, vPanel gave me an internal IP address when I didn't use STUN, but changed to my WAN IP address when I used STUN. The phone worked in both cases, and I was told this is normal behavior.

dswartz
06-17-2009, 10:00 PM
oh, sorry, that is something i put in extensions_custom.conf to massage CID and such. you can make it just what others have done instead. i think the internal IP address is suspicious.

VOIPoDylan
06-18-2009, 01:36 AM
Try your BYOD credentials, they're available in vPanel.
Navigate over to vPanel > Features > Preferences > "Softphone / BYOD".

Toggle your softphone status to On and hit Save. Use the credentials provided.

usa2k
06-18-2009, 07:33 AM
I see that menu too.
Did VOIPo change their mind again to continue BYOD?

scott2020
06-18-2009, 08:20 AM
Here's something interesting. I looked in my vPanel to see what it was saying about registered devices. It shows: sip:2817107009@192.168.0.14

Shouldn't that be my WAN IP address? Is there anything in Asterisk I can use to adjust that so that it shows my IP? What are the ramifications of it using the .14 address (That is the IP of the trixbox server on my local network.

Vpanel shows my external IP address.

In your sip.conf did you set your externip= or externhost= information? Also, my sip.conf has nat=yes in it. You also need to set the localnet=. If you are using PBX In a flash, trixbox, etc you might need to edit a custom config file since the standard ones get overwritten. I am running AstLinux so it is a basic Asterisk install.



externhost=fully qualified domain name of my outside IP
localnet=192.168.1.0/255.255.255.0
externrefresh=300
nat=yes


externhost can also be externip=xx.xx.xx.xx if you have a static IP.

firestorm_v1
06-18-2009, 07:23 PM
Well, I am pleased to announce that the new sip credentials worked great! I was able to call out and receive a call.

The problem now, is that I was only able to receive ONE call. Now, I get the same "The number or code you dialed is invalid..." error on any inbound call. I have a feeling we're so close it's almost painful!

So here's what I have so far:

- I have an inbound route with any CID and any DID forwarded to X-200. (I haven't tried my "Ring All Extensions" yet..)
- X-200 and the WiFi phone can both call out till the cows come homw. This has remained unchanged.

- My registration string for the trunk is: (phone #): (BYOD password)@sip.voipwelcome.com/(phone #)
Note: There is no space between my BYOD password and the colon, just if I try to do so here, it shows up as a :(


My Outgoing Settings:
disallow=all
username=(Phone #)
type=peer
secret=(BYOD password)
qualify=yes
nat=yes
insecure=port,invite
host=sip.voipwelcome.com
fromuser=(Phone #)
fromdomain=sip.voipwelcome.com
context=from-sip
allow=ulaw

My Incoming settings:
disallow=all
type=peer
secret=(BYOD Password)
qualify=yes
nat=yes
insecure=port,invite
host=sip.voipwelcome.com
context=from-sip
allow=ulaw

What am I missing? Do I need to address the issue right now with the device registration from vPanel where it shows (phone #)@Local net IP address

firestorm_v1
06-18-2009, 07:51 PM
Vpanel shows my external IP address.

In your sip.conf did you set your externip= or externhost= information? Also, my sip.conf has nat=yes in it. You also need to set the localnet=. If you are using PBX In a flash, trixbox, etc you might need to edit a custom config file since the standard ones get overwritten. I am running AstLinux so it is a basic Asterisk install.



externhost=fully qualified domain name of my outside IP
localnet=192.168.1.0/255.255.255.0
externrefresh=300
nat=yes


externhost can also be externip=xx.xx.xx.xx if you have a static IP.

Hello scott2020:

On your items described above, what do I do if the Asterisk server has two local networks? I've got a 192.168 network that's the "main" network and a 10.0 network for the VOIP phones, ATAs, etc..
Do I need two localnet directives?

firestorm_v1
06-18-2009, 07:53 PM
Something else I've noticed too:

On the vPanel, when you enable the SIP/BYOD devices and you click SAVE, it changes the password!

scott2020
06-20-2009, 09:09 PM
Hello scott2020:

On your items described above, what do I do if the Asterisk server has two local networks? I've got a 192.168 network that's the "main" network and a 10.0 network for the VOIP phones, ATAs, etc..
Do I need two localnet directives?

Hi
You can put as many localnet= lines in the configuration as you need. Just put them one line at a time with the IP and subnet masks. I do that on my box at work because there are several local networks.
Scott

firestorm_v1
06-25-2009, 10:10 AM
Ok, I give up.

I had VOIPo put a trace on my line and they said that they're getting a 404 when they send the call my way. I have scoured (yet again) for information about this error and about getting the server working but it's to no avail.

I appreciate everyone's effort in assisting me with this endeavor, but I've given up and I feel like I've bashed my head against this brick wall for three weeks. The one call I did receive was a false positive and I don't know why I can't get it to work.

Thank you, everyone.