SIPUserAgent.BlindTransfer fails when trying through a proxy server #629
Replies: 1 comment 3 replies
-
The authorization headers on in-dialog requests, suhc as transfers and byes, has always been a strange part of SIP. Sometimes they're requires sometimes not. When they are required it's usually just a copy of whatever was used in the INVITE request or response which a man-in-the-middle attacker can easily access. Are you using the sipsorcery library from source or from the nuget package? It's easy for me to add a small code change to see if automatically including the authorization header in the REFER request fixes your problem. Other than that you could use the |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm currently trying to get our sip client to make a blind transfer using SipUserAgent.BlindTransfer. Making a normal Call works fine, as I can provide the username and password, but that is not possible through blind transfer.
I've been told, the Proxy-Authorization is missing in the REFER sip request and that I need to include the Proxy-Authorization header I get back in the INVITE sip request, but I don't see how I can access any such information, that I could use in blind transfer.
There is an optional field (string[] customHeaders) on BlindTransfer, but I don't know where I'm supposed to get the header from.
Any ideas on how to solve this?
I'm running against a Kamailio proxy with an Asterisk behind.
Code:
_userAgent = new SIPUserAgent(_sipTransport, null, true);
_registrationClient = new SIPRegistrationUserAgent(_sipTransport, deviceId, sipClientPassword, _asteriskSipDomain, 300);
_registrationClient.Start();
...
public async Task BlindTransfer(string transferId)
{
var targetUri = SIPURI.ParseSIPURI(_asteriskSipDomain);
targetUri.User = transferId;
var result = await _userAgent.BlindTransfer(targetUri, TimeSpan.FromSeconds(5), CancellationToken.None);
}
I've provided a sip trace as well:
407_fail_on_REFER.zip
Beta Was this translation helpful? Give feedback.
All reactions