【发布时间】:2015-06-25 13:38:27
【问题描述】:
我正在尝试从独立的 UCMA 应用程序向基于连接 IP 地址进行身份验证的 SIP 提供商 (Gamma) 进行出站呼叫。这是我试图实现这一目标的代码(直接来自 Michael Greenlee (http://blog.greenl.ee/2012/06/15/outbound-calls-ucma-lync-server/):
ApplicationEndpointSettings endpointSettings =
new ApplicationEndpointSettings("sip:02037571***@80.229.80.***"); // My Ext. IP
...
CallEstablishOptions options = new CallEstablishOptions();
options.ConnectionContext = new ConnectionContext("88.215.61.***", 5060); // Gamma Ext. IP
Conversation conv = new Conversation(_endpoint);
AudioVideoCall avcall = new AudioVideoCall(conv);
avcall.BeginEstablish("sip:07709411***@88.215.61.***", options,
ar2 =>
{
try
{
avcall.EndEstablish(ar2);
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
},
null);
尝试拨号失败,Gamma 返回 403 Forbidden-Source Endpoint Lookup Failed。
我已将wireshark 跟踪与这次失败的尝试以及可以成功拨出的硬件PBX 的跟踪进行比较。
工作硬件 PBX:
From: "02037571***"<sip:02037571***@80.229.80.***>;tag=39E432463135364100006C30
SIP Display info: "02037571***"
SIP from address: sip:02037571040@80.229.80.***
SIP from address User Part: 02037571***
SIP from address Host Part: 80.229.80.***
SIP from tag: 39E432463135364100006C30
To: <sip:07709411420@88.215.61.***:5060>
SIP to address: sip:07709411420@88.215.61.***:5060
SIP to address User Part: 07709411***
SIP to address Host Part: 88.215.61.***
SIP to address Host Port: 5060
Contact: <sip:02037571040@80.229.80.***:5060>
Contact URI: sip:02037571040@80.229.80.***:5060
Contact URI User Part: 02037571***
Contact URI Host Part: 80.229.80.***
Contact URI Host Port: 5060
UCMA 申请失败:
FROM: ""<sip:02037571***@80.229.80.***>;epid=C18B8F5C05;tag=be8d09ca4
SIP Display info: ""
SIP from address: sip:02037571***@80.229.80.***
SIP from address User Part: 02037571***
SIP from address Host Part: 80.229.80.***
SIP from tag: be8d09ca4
TO: <sip:07709411420@88.215.61.***:5060>
SIP to address: sip:07709411420@88.215.61.***:5060
SIP to address User Part: 07709411***
SIP to address Host Part: 88.215.61.***
SIP to address Host Port: 5060
CONTACT: <sip:ADRIANHAND49F2.UnifyBusiness.local:5060;transport=Tcp;maddr=172.32.42.62;ms-opaque=260fcc58fdb93b58>;automata;actor="attendant";text;audio;video;image
Contact URI: sip:ADRIANHAND49F2.UnifyBusiness.local:5060;transport=Tcp;maddr=172.32.42.62;ms-opaque=260fcc58fdb93b58
Contact URI Host Part: ADRIANHAND49F2.UnifyBusiness.local
Contact URI Host Port: 5060
Contact URI parameter: transport=Tcp
Contact URI parameter: maddr=172.32.42.62
Contact URI parameter: ms-opaque=260fcc58fdb93b58
如您所见,FROM 和 TO 部分非常相似,但 CONTACT 部分包含我的机器和域的详细信息,而不是我指定为应用程序端点的详细信息,以及我机器的 LAN IP(maddr =172.32.42.62)。
如果我调试和检查 _endpoint,EndpointUri 属性包含 ADRIANHAND49F2.UnifyBusiness.local 字符串,我认为这是 Gamma 拒绝我尝试拨打电话的原因。这个属性是只读的,所以我有点卡住了——有人可以帮我连接到我的 SIP 提供商吗?感谢所有想法,谢谢!
【问题讨论】: