DNIS Passthrough from SIP trunk to SIP extension

I have a FreePBX 2.10 install that I created using a recent version (Centos 6) of the FreePBX distro and I’ve placed it in front of my legacy PBX so they can both share the SIP trunks. I have the FreePBX box registering to the SIP trunk provider and the legacy PBX registers to FreePBX. It’s working well except I can’t figure out how to pass the DNIS information to the extension the legacy PBX is using so that the call can be properly routed. I’ve searched online and the best answer I’ve found was 5 years old and didn’t seem to match up with the current .conf files in use.
Thanks!

Why would the extension need the DNIS data? Do you mean you want to route based on DNIS informwation?

How is your trunk setup?

Do you have a trace that show the inbound SIP message (assuming SIP since you did not tell us anything).

Also, please tell us everything. FreePBX and Asterisk versions, equipment, network config etc.

I have a legacy PBX that is registering to a SIP extension on FreePBX; it requires the DNIS data to properly route the call. All of the routing within FreePBX itself is working well.

I’m not sure what you want to know about my trunk but here are the peer and user details:
allow=ulaw
canreinvite=no
disallow=all
fromdomain=mypublicip
host=myprovidersip
insecure=very
nat=yes
type=peer
username=mydid
secret=mypassword
fromuser=mydid
port=5060
qualify=yes

user context is mydid

allow=ulaw
context=from-sip-external
disallow=all
host=mypublicip
insecure=very
type=user
nat=yes
canreinvite=no

No, I do not have a trace yet but we do know that the DNIS information is not being sent since that is the default behavior. And there’s no need to assume that it’s using SIP since I mentioned in the subject of the thread that it is SIP from end to end. :slight_smile:

As I mentioned above, it is FreePBX 2.10. However I did not mention the Asterisk version; it is 1.8.17.0. As far as the rest of the equipment goes, I certainly don’t expect you to support it, but I also do not see the need. The trunk works perfectly on Asterisk, it simply requires a behavior modification so that the DNIS data is passed through to either a specific extension or all of the extensions.

Didn’t you post this before?

You need to have your Legacy system connect to a trunk, not to an extension.

No, this is the first time I’ve ever posted here. My legacy system’s SIP trunks will only work in a registration scenario; will that be an issue?

No, a trunk can register to the Legacy PBX (see registration details at the bottom of the SIP trunk page) or the Legacy can register to FreePBX using the authentication parameters supplied in the SIP trunk.

Trunk tips:

[list]
[] Peer details must be supplied in SIP trunk
[
] User details are optional and should only be needed when inbound traffic arrives from a different peer than outbound. It is key not to duplicate peer info between two peers (essentially FreePBX creates two peers from the trunk page.
[] Review the sample sip.conf in the Asterisk documentation, any valid peer variables for your Asterisk version can be used in the details boxes in a FreePBX scenario
[
] When reading sample peers on the Internet for Asterisk, remember they are not designed for FreePBX. You must use valid FreePBX context declarations. Most common are from-trunk, this context routes calls to the inbound route module and from-internal, this context is the entire internal dialplan (useful for connecting PBX’s together).
[/list]

Excellent, thank you, I’ll give it a try.

Thanks again, it’s working now.