Follow Me Issue with external destinations

Status
Not open for further replies.

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,417
376
83
The SIP trunk provider requires proxy authentication for outbound calls, (lets call the domain and realm qaz.com). Not normally a problem.

But when follow me bridges the call to the gateway it uses the tenant domain (wsx.com) and realm for authentication not the qaz.com specified in the gateway. So in response to the "407 Proxy Authentication Required" the from domain and realm used is wsx.com and not the qaz.com that the SIP trink provider wants to see.

I hope that makes sense, does anyone know of a fix or workaround?

I have temporarily solved the issue by emulating the follow me by creating a dial plan entry with a series of bridge statements in it to do a sequential follow me.

Kind regards,
Adrian.
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,417
376
83
Please tell me I'm missing something here or doing something stupid. I have discovered the same issue with external numbers in ring groups. The ring group clearly finds the gateway but look at the Proxy-Authorization header in these two SIP packets:

Calling 123 (UK Time service) from my desk phone
Code:
Proxy-Authorization: Digest username="AdrianF", realm="myprovider.co.uk", nonce="5cd2ee860000966c7e85efc46db2b4e54b5741c13d516858", cnonce="efcGC+xEEjeUnVJwljzHyA", algorithm=MD5, uri="sip:123@myprovider.co.uk", response="fd28a1f4b94a3aa73360fcf659690703", qop=auth, nc=00000001.

Calling 123 from a ring group
Code:
Proxy-Authorization: Digest username="AdrianF", realm="tenant.domain.uk", nonce="5cd2eff8000096fd9142241aa52384b9277b067632e87541", cnonce="VpGDX+xFEjeUnVJwljzHyA", algorithm=MD5, uri="sip:123@myprovider.co.uk", response="7b95e76a583e1a6557b7f1ee8ba3446e", qop=auth, nc=00000001.

See the problem? the INVITE does not authenticate correctly because the realm is not the one specified in the gateway record when called from a ring group or follow me (FusionPbx 4.4.2).
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
We had this years ago, no idea how to fix now, haven't got time to dig in but I think you can set a variable sip_invite_domain if I remember rightly.
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,417
376
83
@DigitalDaz Thankyou for the tip. Yes, setting sip_invite_domain=myprovider.co.uk in the outbound route does solve the problem for ring groups.

I had already tried this, with no luck when testing the Follow Me. I have now realised that Follow Me builds it's own dial string in the v_follow_me table and sets sip_invite_domain=$_SESSION['domain_name'], so it is never going to contain myprovider.co.uk.

I don't think there will be an easy fix or workaround for the Follow Me with my SIP provider setup. It will probably require a code change in app/calls/resources/classes/follow_me.php.

Thanks again.
 

efefidn

New Member
Mar 21, 2019
22
0
1
34
Hello, I opened a new topic, but I wanted to write here to get support from professionals like you, in case this might attract your attention. I want to forward an incoming call to a SIP URI in a different location. how can I do it? Can you explain simply?
Thank you.
 
Status
Not open for further replies.