Shoretel/FreePBX Integration Pains

I am really trying to get calls to work between ShoreTel 12.3 and FreePBX. I have the trunks set up, and they appear to be working, however when I call from Shoretel to a asterisk extension I get the following recorded message:

“The number you have dialed is not in service. Please check the number and dial again.”

This is a asterisk message and I can see the call is hitting the asterisk system, but for some reason it is not going to the extension I am dialing. Do any of you have any idea what might be causing this?

I am considering updating ShoreTel to 13.2, as my re-seller told me the sip handling is greatly improved.

Here are the log messages I am getting for this call.

[2013-05-24 15:45:38] VERBOSE[20588][C-000000c3] pbx.c: – Executing [[email protected]:1] NoOp(“SIP/anonymous.invalid-00000170”, “Received incoming SIP connection from unknown peer to 2901”) in new stack
[2013-05-24 15:45:38] VERBOSE[20588][C-000000c3] pbx.c: – Executing [[email protected]:2] Set(“SIP/anonymous.invalid-00000170”, “DID=2901”) in new stack
[2013-05-24 15:45:38] VERBOSE[20588][C-000000c3] pbx.c: – Executing [[email protected]:3] Goto(“SIP/anonymous.invalid-00000170”, “s,1”) in new stack
[2013-05-24 15:45:38] VERBOSE[20588][C-000000c3] pbx.c: – Goto (from-sip-external,s,1)
[2013-05-24 15:45:38] VERBOSE[20588][C-000000c3] pbx.c: – Executing [[email protected]:1] GotoIf(“SIP/anonymous.invalid-00000170”, “0?checklang:noanonymous”) in new stack
[2013-05-24 15:45:38] VERBOSE[20588][C-000000c3] pbx.c: – Goto (from-sip-external,s,5)
[2013-05-24 15:45:38] VERBOSE[20588][C-000000c3] pbx.c: – Executing [[email protected]:5] Set(“SIP/anonymous.invalid-00000170”, “TIMEOUT(absolute)=15”) in new stack
[2013-05-24 15:45:38] VERBOSE[20588][C-000000c3] func_timeout.c: – Channel will hangup at 2013-05-24 15:45:53.705 MDT.
[2013-05-24 15:45:38] VERBOSE[20588][C-000000c3] pbx.c: – Executing [[email protected]:6] Answer(“SIP/anonymous.invalid-00000170”, “”) in new stack
[2013-05-24 15:45:38] VERBOSE[20588][C-000000c3] pbx.c: – Executing [[email protected]:7] Wait(“SIP/anonymous.invalid-00000170”, “2”) in new stack
[2013-05-24 15:45:40] VERBOSE[20588][C-000000c3] pbx.c: – Executing [[email protected]:8] Playback(“SIP/anonymous.invalid-00000170”, “ss-noservice”) in new stack
[2013-05-24 15:45:40] VERBOSE[20588][C-000000c3] file.c: – <SIP/anonymous.invalid-00000170> Playing ‘ss-noservice.ulaw’ (language ‘en’)
[2013-05-24 15:45:45] VERBOSE[20588][C-000000c3] pbx.c: – Executing [[email protected]:9] PlayTones(“SIP/anonymous.invalid-00000170”, “congestion”) in new stack
[2013-05-24 15:45:45] VERBOSE[20588][C-000000c3] pbx.c: – Executing [[email protected]:10] Congestion(“SIP/anonymous.invalid-00000170”, “5”) in new stack
[2013-05-24 15:45:50] VERBOSE[20588][C-000000c3] pbx.c: == Spawn extension (from-sip-external, s, 10) exited non-zero on ‘SIP/anonymous.invalid-00000170’
[2013-05-24 15:45:50] VERBOSE[20588][C-000000c3] pbx.c: – Executing [[email protected]:1] Hangup(“SIP/anonymous.invalid-00000170”, “”) in new stack
[2013-05-24 15:45:50] VERBOSE[20588][C-000000c3] pbx.c: == Spawn extension (from-sip-external, h, 1) exited non-zero on ‘SIP/anonymous.invalid-00000170’

I have been working on this for a week, so hopefully someone here has some ideas. Thanks in advance for any pointers you can offer.

You might need the trunking you have from Shoretel to be in the “from-internal” context.

Thanks for the suggestion. My original settings were:

context=shoretel
nat=no

I updated them to:

context=from-internal
nat=no

However there was no change in behavior, or in the logging.

What does your entire trunk config look like in FreePBX? Is the shoretel in the same network as the FreePBX box or is it traversing a NAT connection to the Internet or a VPN site to site?

Skyking,

Here is my config, thanks for helping out.

Trunk name:shoretel_trunk

PEER details:

host=xxx.xx.xx.xxx
port=5060
type=peer
disallow=all
allow=ulaw&g729&h261&h263p&h263&h264
jbenable=yes
jbforce=yes
jbmaxsize=700
dtmfmode=rfc2833
reinvite=yes
canreinvite=yes
videosupport=yes
trunk=no
qualify=yes

User context: shoretel

User details:

context=from-internal
nat=no

Right now it is connecting through a NAT connection to the Internet, but I have the same problem with my test system that is on the same network as shoretel.

Just when you think you have seen every way to overcomplicate things.

1 - Put nothing in the user details
2 - Change type to friend
3 - Put the context in the peer details
4 - Make sure the Shoretel LAN (if different subnet than FreePBX) is in the localnet list
5 - Take out trunk=no that is not valid
6 - Do you really want canreinvite set to yes?
7 - What is the connection? Is it that bad you need a giant jitter buffer?