I have a need to on outbound calls on on Tie trunk t send a specifiv RURI as @MyTrunk.com
I have done about all I can to et this to cooperate and nothing changes. Essentially it must be as shown below. I have tried using PJSIP Adding trunk.MyTrunk.com to SIP Server (No Port)
in PJSIP advanced
Domain = trunk.MyTrunk.com
Proxy as sip:my.proxy.com:5560;\lr
and various other methods to know avail. Either Ring No Answer or Loop detected as the Request-URI never changes from my.proxy.com:5560 to what I need
Backlash must precede the character that it is escaping. not follow it. \lr is a comment, so you have a non-loose routing specification and the next hop addrses goes in the RURI, with the final target in the Route header.
I have been at this some time, I have tried everything and yet the RURI stays the same. FreePBX 16 Astrizk 18 sng PJSIP something is not allowing the rewrite of the RURI.
Digging into everything logs etc and just do not see why
I can’t speak for FreePBX, but with Asterisk configuration entries I could see what based on configuration it should be doing and if that matches what it is actually doing (thus pointing to FreePBX configuration in some capacity).
For example the “Domain” option may just be setting from_domain, which would only alter the domain in the From header - not the request URI.
To change the request URI requires altering the URI on the AOR, or in the Dial string. This combined with an outbound proxy would send the SIP traffic to the outbound proxy, but the request URI would be a different URI.
I have pretty much tried setting custom destination, AOR changes, modified manually everything I know what to do, it just refused to remap the RURI. I get two things either a RIng Now Answer as everyting is great but the RURI or a Loop Detect. I wil keep plugging at it
It would be Server that was used to create the Contact for the AOR, and that seems to be set, so the only ways it is going to behave as shown is if the ;lr is not being detected. Given that many many people use that, I have to assume that either the backlash is still in the wrong place, or missing, or the configuration hasn’t actually been applied.
The request URI is coming from the Proxy setting
You might get some of the failure modes if the proxy doesn’t like having a Route header, but the RURI would be correct. If you are getting that, you need an extra parameter om the route URI, ;hide, and again, the ; must be escaped, so it is \;hide.
I have a proper remap now. it is showing properly in the RURI and the config is set. Just tweaking now. had to force the restart and confirm trunk was showing up proper domain, proxy etc. AOR seesm to be fine, just now correcting route to remove the 482 loop.
I have no idea why this one trunk has been so difficult. Being my lab box its probably something residual that I cannot see
Wanted to thank all for the advise and assistance and provide an update.
After doing everything I understand to be true and correct. Proxy, From Domain etc, My intial setup was correct but kept delving into the 482 Loop being sent back from the Service provider.
Cause for my instance the Route was not translating to the IP as example
sip:my.proxy.com:5560;lr
Has two Public IPs we will use 1.1.1.1 & 2.2.2.2
Calls may present to or come from any of these two via my.proxy.com:5560
Problem now to solve is why FreePBX does not populate the route outbound in the invite to the IP address?
Instead of
Route: sip:my.proxy.com:5560;lr
Route URI: sip:my.proxy.com:5560:5500;lr
Route Host Part: my.proxy.com:5560
Route Host Port: 5500
Route URI parameter: lr
It should be either or one of the two mentioned
Route: sip:1.1.1.1:5560;lr
Route URI: sip:1.1.1.1:5560:5500;lr
Route Host Part: 1.1.1.1:5560
Route Host Port: 5500
Route URI parameter: lr
Solution or better work around is to add the one of the IPs in the Outbound Proxy
As sip:1.1.1.1:5500;lr
Its a bandaid but works for the POC I have been working on.
It treats the Proxy setting as though it had been received in a Record-Route header, although I think ;hide option may be a local addition. Once you understand that, it is behaving as expected.
I don’t understand what you are trying to say here, but I think you still haven’t understood how the proxy setting works. You need to read the part of RFC 3261 about loose routing.
Thanks for the tip, I am familiar with the the RFCs. WHat I am blatantly saying is FreePBX | PJSIP | Asterisk whichever one or a combination of the two does not do a pre DNS check of an FQDN to get a response back from the Query and map the IP that is part of that query. Unlike FreeSwitch which does its job FreePBX struggles here. Part of the reason I cringe when customer advise they are using. Per haps my suggestion is to stop telling other snarky answers