RURI on a SIP trunk connection

Here is the scenario:

We are integrating with a cloud PBX provider. I am trying to set up a SIP trunk with them from Asterisk so that we can have extension dialing between systems.

The cloud PBX provider is requesting that extension dialing contain a specific RURI to connect. I cannot figure out how to accomplish this.

Here is what they are requiring:

RURI format below for inbound calls
RURI: [extension_number]@[]

Cloud PBX Proxy server and port to allow for inbound and outbound traffic:
Send to

Any help is GREATLY appreciated. Thank you!

Current config:

The SIP trunk shows as Avail when I show PJSIP endpoints.


(IP addresses redacted…)


exten => _10001,1,Dial(PJSIP/10001@CloudPBX)

In my current configuration, the cloud PBX provider sends back a 500 Internal Server error.

How are you supposed to send the real request URI? (The number you actually want to call?)

What does the provider mean by “extension”?

You are sending to the proxy server, not the specified RURI address. is bogus, so we cannot independently check the documentation or provide practical experience on your weird provider.

Here are the non-bogus details:

The provider is 8x8. We are trying to establish SIP Tie Trunk connectivity. Here is the format that 8x8 is requesting. 8x8 has a test extension 10001 that I am trying to connect to from extension 10010 on my Asterisk PBX.

Customer to follow RURI format below for inbound calls to the 8x8 pbx accordingly.
RURI: [extension_number]

8x8 Proxy server and port to allow for inbound and outbound traffic:
Customer will send to

Here is my pjsip.conf:

Here is my extensions.conf:

Here is what the Asterisk Console is showing me when I try to place a call:

Here is the invite from a wireshark trace using this particular configuration:

According to 8x8, the RURI should be for the call to be successful. What am I doing wrong and how can I modify the RURI to be correct?


You need the \;lr, for loose routing, on the proxy, otherwise it is treated as strict routing and the proxy address goes into the request URI.

Because you have used strict routing, the actual target URI, with the extension, will be in Route header, but you have collapsed the headers in the above.

We generally prefer text, so we can search it, and the Asterisk logging, rather than third party tools, as we are familiar with that.

That worked!!! It was a matter of applying loose routing in the proper location. Although the RURI is now correct I am now receiving a Loop Detected from 8x8, which I will work on with them. But at least I know that the requested RURI format is correct.

Thank you so very much! :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.