Just Starting with FreePBX: SIP from ISP

BGM,

Yes, you need to configure a trunk for the Windstream SIP connection. From our experience, they usually bring in a device of theirs (the SIP Gateway) and install it locally on your LAN. They then give you NO other information or configuration settings to help you connect. In the one’s we have done with them - they give no username or secret. I was in your situation on our first Windstream SIP experience but had a friend who had an Asterisk box running with them (and said he had a horrible time figuring out the setup in the beginning) who sent me his config for the trunk. I will be back in the office in a couple of hours and, if you’re still having trouble, I can send you the trunk config we’re using with Windstream.

Doug

1 Like

Mr. Allen, ah! Thanks for understanding me! They are coming today to install the equipment, and I asked the rep to send me the SIP connection info and she (figures, too) sent me my own external ip addresses! Dumb. Maybe we don’t need a username or secret to connect and they just pre-allow us based on our ipaddress (which they control anyway) which seems to make some sense.

Right now they are supposed to provide us both PRI on our current system AND SIP on the new system until I get the new one working. I could do all this in straight asterisk through code files like I have been, but if I die nobody will be able to do anything here. At least with a freepbx interface they will be able to manage things.

I’ve got several phones talking to each other right now, but I need to figure out what to do to get the SIP working with Windstream so I can test it. I’m on my own here and have not purchased support, but I’m a pretty good guesser with a little help from folks like you in the forums.

Yes, please give me any tips you have. I’m looking through blog tutorials right now for directions.
I have a contact page available from my SE profile, if you are willing to give me a hand.

Here’s how our Windstream installations have gone- They ask for an available INTERNAL address on your LAN. This is what they will assign to their SIP gateway - the device will be installed on your LAN and will provide your SIP connection. This is also what you’ll configure your trunk to talk to. They do not expect/want any type of registration or username/secret combination. They do not provide any other information for the connection other than telling you to point to the IP address you gave them.

These are the trunk configuration settings within FreePBX that work for us -

Name your trunk
Enter your outgoing CID

Under Outgoing settings-
Trunk name - whatever you choose to name it
PEER Details-
host=IP address of SIP gateway
type=friend
context=from-trunk
disallow=all
allow=ulaw
dtmfmode=auto
insecure=port,invite
relaxdtmf=yes

Incoming settings -
none

Registration string -
none

You’ll need to configure your outbound route(s) to use the new SIP trunk.

Hope this helps,

Doug

Mr. Allen, wow, this is really helpful information! Those people are nice enough, but they have a certain lack of ablility to communicate.

An INTERNAL address? So they will make their SIP router a device on my network? So I’ll just trunk from my PBX to the “internal” SIP router? Now, I have my own router on this side of their main router (firewall), so how can I give their device an internal ip address?

Yes - it will be a device on/inside your local network. You’ll just need to supply them with an IP address that you are not using. If you use DHCP, you’ll want to make sure the address you give them is outside of the scope of addresses being handed out, or assign a reservation within your scope, so there is no conflict.

Mr. Allen,

They are here right now and I’ve given them the internal IP address just like you said, and I’ve put that in my SIP Trunk. And you were spot on when you said we wouldn’t need any username or password. After they are finished configuring we’ll test it - I’m using the settings you supplied.

So, I’ve set up the SIP Trunk as well as Incoming and Outgoing routes pointing to that SIP Trunk. But Windstream says they don’t see any outgoing calls hitting their router. But incoming calls they say are hitting my server.

So I’m missing something somewhere.

Do I need to set any kind of idal pattern for the SIP trunk?

From the Asterisk CLI, you will be able to see calls coming in if they are hitting the server. You should also see calls being handed off to the Windstream trunk (or however you have the flow setup). You do need dial patterns setup on the outbound route. You can use the dial patterns wizard for most of what you need.

That’s just it. Nothing is hitting the asterisk server. I’ve been watching the CLI. I’m going to check on the firewall, but my phones work just fine inside the LAN. I am able to ping their router just fine from the freepbx server.

Windstream says they see inbound calls going through their router, but they aren’t received by mine.
My asterisk doesn’t see anything at all.
There are no other routers between the two machines.

Now, my router does all the NAT work, so I don’t need to do it in Asterisk. So in my “External IP” for “Asterisk SIP Settings”, do I just put my pbx server’s ip address? … I tried both ways, actually, but it still won’t place an outbound call.

Actually, the console reads like this for an outbound call:

[2014-11-18 20:57:55] VERBOSE[22553][C-0000004a] pbx.c: -- Executing [[email protected]:1] ResetCDR("SIP/1234-00000065", "") in new stack
[2014-11-18 20:57:55] VERBOSE[22553][C-0000004a] pbx.c: -- Executing [[email protected]:2] NoCDR("SIP/1234-00000065", "") in new stack
[2014-11-18 20:57:55] VERBOSE[22553][C-0000004a] pbx.c: -- Executing [[email protected]:3] Progress("SIP/1234-00000065", "") in new stack
[2014-11-18 20:57:55] VERBOSE[22553][C-0000004a] pbx.c: -- Executing [[email protected]:4] Wait("SIP/1234-00000065", "1") in new stack
[2014-11-18 20:57:56] VERBOSE[22553][C-0000004a] pbx.c: -- Executing [[email protected]:5] Progress("SIP/1234-00000065", "") in new stack
[2014-11-18 20:57:56] VERBOSE[22553][C-0000004a] pbx.c: -- Executing [[email protected]:6] Playback("SIP/1234-00000065", "silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer") in new stack
[2014-11-18 20:57:56] VERBOSE[22553][C-0000004a] file.c: -- <SIP/1234-00000065> Playing 'silence/1.ulaw' (language 'en')
[2014-11-18 20:57:57] VERBOSE[22553][C-0000004a] file.c: -- <SIP/1234-00000065> Playing 'cannot-complete-as-dialed.ulaw' (language 'en')
[2014-11-18 20:57:59] VERBOSE[22553][C-0000004a] file.c: -- <SIP/1234-00000065> Playing 'check-number-dial-again.ulaw' (language 'en')
[2014-11-18 20:58:02] VERBOSE[22553][C-0000004a] pbx.c: -- Executing [[email protected]:7] Wait("SIP/1234-00000065", "1") in new stack
[2014-11-18 20:58:03] VERBOSE[22553][C-0000004a] pbx.c: -- Executing [[email protected]:8] Congestion("SIP/1234-00000065", "20") in new stack
[2014-11-18 20:58:03] WARNING[22553][C-0000004a] channel.c: Prodding channel 'SIP/1234-00000065' failed
[2014-11-18 20:58:03] VERBOSE[22553][C-0000004a] pbx.c: == Spawn extension (from-internal, 15553332222, 8) exited non-zero on 'SIP/1234-00000065'
[2014-11-18 20:58:03] VERBOSE[22553][C-0000004a] pbx.c: -- Executing [[email protected]:1] Hangup("SIP/1234-00000065", "") in new stack
[2014-11-18 20:58:03] VERBOSE[22553][C-0000004a] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/1234-00000065'

On our boxes, we always put the external public IP of the site, or the specific Internet gateway that the Asterisk/FreePBX box uses. Without knowing your setup here are just a couple of other simple things I can think offhand-

IP connectivity between your FPBX box and Windstream’s device - you can successfully ping them and they can successfully ping you.

dial patterns on the trunk so that FPBX knows to pass the calls out the trunk.

passing the correct CallerID on the trunk - the Windstream device will reject outbound calls if not.

Correct network settings and codec(s) under advanced SIP settings

Mr. Allen,
Okay, after I added the outgoing connection settings I am now able to call out!
However, I still can’t receive calls. How do I specify what my DIDs are? Do I need to do that?

Maybe allow “anonymous SIP calls” and you could perhaps use [from-did-direct] for the trunk context

Well, the context surely wasn’t the answer:

[2014-11-19 14:34:36] NOTICE[3357][C-00000091] 
chan_sip.c: Call from 'MYtrunk' (192.168.1.6:5060) to extension 
'1234567891' rejected because extension not found in context 
'from-did-direct'.

but with the [from-trunk] context, I get this:

[2014-11-19 14:37:02] VERBOSE[28775][C-00000093] app_dial.c:     -- SIP/RCHtrunk-000000f5 requested media update control 26, passing it to SIP/MYtrunk-000000f4

In the console, I can see the incoming call hitting the PBX. Then it gives this response:

[2014-11-19 14:37:02] VERBOSE[3357][C-0000009e] chan_sip.c:     -- Got SIP response 503 "Service Unavailable" back from 192.168.1.6:5060
[2014-11-19 14:37:02] VERBOSE[28797][C-0000009e] app_dial.c:     -- SIP/MYtrunk-0000010b is circuit-busy
[2014-11-19 14:37:02] VERBOSE[28797][C-0000009e] app_dial.c:   == Everyone is busy/congested at this time (1:0/1/0)

The from-did-direct context is for when only the last few digits are sent which then map directly to extensions, as most PRI’s do. I guess they send the whole number over SIP, and you will need inbound routes for each DID.

(is your name really “dicko” ?)
Aaaaawwwwww, I don’t want to create inbound routes for each one. I left the field blank in the inbound routes page so as to match ANY inbound calls. Maybe I can wildcard the inbound routes?

But I discovered inbound does work! I had the wrong destination in the Inbound Route.
Okay, inbound and outbound work now. So I’ve come to the end of my thread.
Thanks, y’all for your help.

Is your name really BGM? :smile:

I was out of the office yesterday afternoon and didn’t see your reply. Glad you got it working!

Doug

Well those are my initials, and I gave a link to my profile…
Yes, I’m glad it’s working too; I appreciate your help - it got me real far.
Now I’m stuck on the next part: Incoming Route destination for matching DIDs

This is an OLD topic, but I just set up a trunk with Windstream, and this was helpful, so thank you very much.

Also, I would like to add that they requested that we have Asterisk SIP register for this trunk, and I found that a simple username:[email protected] in the register string worked for me (where xxx.xxx.xxx.xxx is the IP Address for the peer). If they do not have you using a password, just use username:@xxx.xxx.xxx.xxx.

Hopefully that will help someone in the future.

We also use a Windstream SIP trunk here and I was hitting a wall until I saw your post Rymes. THANK YOU !!!

Another update: While setting up another trunk, they made clear that you can specify any password and it will work. Windstream uses other means to secure the trunk and ignores whichever password you send.

This means that you can set up a decent password for this trunk in order to keep FreePBX from complaining about a trunk with an insecure password!