FreePBX and VCX

This has probably been asked more times than some of you can count, but Google returned nothing that helped and I have been looking at this for hours, so here goes…

I need to make our VCX ring extensions from the FreePBX server that I have setup. We have the VCX configured properly. The VCX sees the FreePBX as a trusted endpoint and it is set to look at the FreePBX server when the user dials 6XXX. However, I cannot find a configuration option that allows the FreePBX server to see the incoming call from the VCX. When we dial, for instance, 6025 (which is a physical extension I have set up on the FreePBX server) the phone just rings busy and says call failed. I have looked into the Sip Trunk option (as well as every other option FreePBX offers) for the PBX, but I can’t seem to configure it properly. I’m not sure what other info I can provide, except for the private IPs, but they are usless because any arbituary ip will work for an example.

So, to consense it all…how do I make the VCX and the PBX software talk to each other? (the VCX is already set up)

Thanks for the help, and I am new at this so please take it easy on me.

Ok I’ll bite, what is a VCX?

3com/hp phone system. Just pretend it is another pbx. So how do I link an HP PBX to FreePBX.
I need to make the FreePBX server see our phone system, but I’m not sure how.

This is the typical PBX->PBX setup using a trunk. Make sure you have your SIP trunk setup properly and that you can see the call reaching the FreePBX box. The key to this kind of setup is that you need to make sure the trunk on the FreePBX box uses “from-internal” as the context. (default is from-trunk). That setting basically says “Treat calls coming into this trunk as if they were being dialed by a local phone”, rather than “treat calls coming in as if they are from a public carrier”.

I have been looking at this issue some more today, but I’m still stuck. I think what I am missing is a clear understanding of creating the sip trunk to look at an IP address instead of a DID. For instance, I found some “outbound” settings for a SIP Trunk that look like this:
disallow=all
allow=ulaw
context=from-trunk
dtmfmode=auto
fromuser=
insecure=very
qualify=yes
secret=
type=peer
username=
canreinvite=no

But, that doesn’t help me on the inbound because I need the Trunk to look for an IP address of our phone system. To explain myself further, when the phone system sees someone dial 6xxx it says “hey, they dialed a 6 first so look at their Asterisk box”, but when when the Asterisk box sees an incoming call from an internal extension that is coming from another phone system, how do I make it say “hey, someone is calling 6xxx from extension 1xxx on another phone system…and this is allowed”?

You need a trunk, as dicko said it needs to be in the from-internal context. Why did you not head that advice.

The trick is to identify the incoming message with as few parameters as possible.

BTW insecure=very is deprecated.

In this example replace x.x.x.x with your phone system IP

host=x.x.x.x
type=friend
context=from-internal
insecure=port,invite
disallow=all
allow=ulaw

Taking this apart, this will match any SIP message arriving from x.x.x.x and force the ulaw codec. It will then send the call to the from-internal context.

One of the best resources for the syntax of these variables is the sample sip.conf that is distributed with Asterisk. Make sure you look at the one for your version.

So, I have attempted to follow all of the instructions given, and I feel that I am close to a resolution, but when I dial and extension from our phone system that resides on the FreePBX, it still rings busy. I enabled debugging on the FreePBX to insure the calls from our phone system to the FreePBX server were making it and it seems they are. Here is the info from the debugging. I have went over it several times, but nothing sticks out to my noobish eyes. Let me know if there is a different type of debugging I can provide that would help.

<— SIP read from UDP:10.150.5.201:5060 —>
INVITE sip:[email protected]:5060 SIP/2.0
via: SIP/2.0/UDP 10.150.5.201:5060;branch=z9hG4bK004adcfa-df9b-e311-9ca1-af7e531b125f
from: "test user"sip:[email protected]:5060;vcx-user=phone;tag=6b9cc44105
to: sip:[email protected]
call-id: 004adcfa-df9b-e311-9c9b-d8c1c8796b51
cseq: 1 INVITE
timestamp: 1393260005
date: Mon, 24 Feb 2014 16:40:05 GMT
Max-Forwards: 70
contact: sip:[email protected]
allow: INVITE,ACK,BYE,CANCEL,REFER,SUBSCRIBE,NOTIFY,PRACK,UPDATE,OPTIONS,MESSAGE,FEATURE
supported: timer,100rel
user-agent: 3Com VCX 7210 IP CallProcessor/v10.0.8
p-asserted-identity: "test user"sip:[email protected]
session-expires: 3600;refresher=uac
min-se: 1800
Allow-Events: talk, hold, conference, LocalModeStatus
remote-party-id: “test user” sip:[email protected];party=calling;screen=no;privacy=off
content-type: application/sdp
content-length: 617

v=0
o=- 2147356841 0 IN IP4 10.150.5.7
s=SIP Call
c=IN IP4 10.150.5.7
t=0 0
m=audio 3000 RTP/AVP 0 18 106 107 113 110 111 112 98 97 115 96 9 8 101
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=yes
a=rtpmap:106 BV16/8000
a=rtpmap:107 BV32/16000
a=rtpmap:113 L16/16000
a=rtpmap:110 PCMU/16000
a=rtpmap:111 PCMA/16000
a=rtpmap:112 L16/8000
a=rtpmap:98 G726-16/8000
a=rtpmap:97 G726-24/8000
a=rtpmap:115 G726-32/8000
a=rtpmap:96 G726-40/8000
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=silenceSupp:on - - - -
a=ptime:30
<------------->
— (20 headers 26 lines) —
Sending to 10.150.5.201:5060 (NAT)
Sending to 10.150.5.201:5060 (NAT)
Using INVITE request as basis request - 004adcfa-df9b-e311-9c9b-d8c1c8796b51
Found peer ‘1100’ for ‘1100’ from 10.150.5.201:5060

<— Reliably Transmitting (no NAT) to 10.150.5.201:5060 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.150.5.251:5060;branch=z9hG4bK004adcfa-df9b-e311-9ca1-af7e531b125f;received=10.150.5.251
From: "test user"sip:[email protected]:5060;vcx-user=phone;tag=6b9cc44105
To: sip:[email protected];tag=as1cb76975
Call-ID: 004adcfa-df9b-e311-9c9b-d8c1c8796b51
CSeq: 1 INVITE
Server: FPBX-2.11.0(11.7.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="1076d45d"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘004adcfa-df9b-e311-9c9b-d8c1c8796b51’ in 32000 ms (Method: INVITE)

<— SIP read from UDP:10.150.5.251:5060 —>
ACK sip:[email protected]:5060 SIP/2.0
via: SIP/2.0/UDP 10.150.5.201:5060;branch=z9hG4bK004adcfa-df9b-e311-9ca1-af7e531b125f
from: "test user"sip:[email protected]:5060;vcx-user=phone;tag=6b9cc44105
to: sip:[email protected];tag=as1cb76975
call-id: 004adcfa-df9b-e311-9c9b-d8c1c8796b51
cseq: 1 ACK
timestamp: 1393260005
date: Mon, 24 Feb 2014 16:40:05 GMT
Max-Forwards: 70
contact: sip:[email protected]
content-length: 0

<------------->
— (11 headers 0 lines) —
localhostCLI> sip set debug off
SIP Debugging Disabled
localhost
CLI>

To add further to my issue, setting up the trunk seems to be the most confusing. I don’t have an outbound SIP trunk to point the trunk to, because I just want to be able to dial extensions that reside on the FreePBX from our phone system. I see the phone system hitting the FreePBX box, so it has to be the trunk configuration. You’ll notice that in the peer details i have the same info for outgoing and incoming settings. Granted the settings probably apply to the incoming because I don’t have a SIP trunk that I want to dial out on.

You don’t need to duplicate incoming settings, that is only used if they are different peers.

A peer is always two ways so I don’t understand your comment. If you set an outbound route to this trunk you should be able to also call your old phone system.

The command should be insecure=port,invite

Do you have log when the call comes in?

Are you sending the right digits from the old system?