Liblinphone SIP错误:403电话检查失败

Liblinphone SIP错误:403电话检查失败,sip,linphone,Sip,Linphone,我使用开源sip库在Swift中拨打呼出电话: func inviteCall(lc: COpaquePointer){ let identity = "sip:07XXXXXX@XXX.XXX.XXX.XX:5060" let callee = linphone_address_new(identity) var call: COpaquePointer = linphone_core_invite_address(lc, callee) for _ in 1

我使用开源sip库在Swift中拨打呼出电话:

func inviteCall(lc: COpaquePointer){
    let identity = "sip:07XXXXXX@XXX.XXX.XXX.XX:5060"
    let callee = linphone_address_new(identity)
    var call: COpaquePointer = linphone_core_invite_address(lc, callee)

    for _ in 1...20{
        linphone_core_iterate(lc); /* first iterate initiates registration */
        ms_usleep(1000 * 1000);

    }   
}
我从SIP服务器获得了以下eror消息:

2016-06-09 10:38:01:490 ortp-message-channel [0x7ffe73845000]: received [315] new bytes from [UDP://1.1.1.1:5060]:
SIP/2.0 403 Phone Check Failed
Via: SIP/2.0/UDP 172.20.10.2:5060;branch=z9hG4bK.wT4sI9IJA;rport=61355;received=180.217.232.152

From: <sip:XXXXXX@1.1.1.1>;tag=q6lu03sDI
To: sip:XXXXXX@1.1.1.1;tag=00ddf5d9798df559a35d085b6da2ca8e.8b81
CSeq: 21 INVITE
Call-ID: al9nF3pfWh
Content-Length: 0

我发现了问题。我们不能同时执行
register
invite
sip命令。我认为这是问题的根源

INVITE sip:XXXXXXX216@XXX.XXX.XXX.XXX:5060 SIP/2.0
Via: SIP/2.0/UDP 172.20.10.2:5060;branch=z9hG4bK.wT4sI9IJA;rport
From: <sip:XXXXXXX2519@XXX.XXX.XXX.XXX>;tag=q6lu03sDI
To: sip:XXXXXXX216@XXX.XXX.XXX.XXX
CSeq: 21 INVITE
Call-ID: al9nF3pfWh
Max-Forwards: 70
Supported: replaces, outbound
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, UPDATE
Content-Type: application/sdp
Content-Length: 473
Contact: <sip:XXXXXXX2519@180.217.232.152:61355>;+sip.instance="<urn:uuid:5b5a5dd0-5447-4066-9a3a-b652eb4db075>"
User-Agent: (belle-sip/1.4.2)
Proxy-Authorization:  Digest realm="XXX.XXX.XXX.XXX", nonce="5758d7b1e9287b8975df56f3b8a5e9f3f455b585", username="XXXXXXX2519",  uri="sip:XXXXXXX216@XXX.XXX.XXX.XXX:5060", response="cf978e8e12c032aafa9a03e5d9450e9f", cnonce="7fb0fe3c", nc=00000001, qop=auth

v=0
o=XXXXXXX2519 238 1151 IN IP4 172.20.10.2
s=Talk
c=IN IP4 172.20.10.2
t=0 0
a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics
m=audio 7078 RTP/AVP 96 97 98 0 8 101 99 100
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1
a=rtpmap:97 speex/16000
a=fmtp:97 vbr=on
a=rtpmap:98 speex/8000
a=fmtp:98 vbr=on
a=rtpmap:101 telephone-event/48000
a=rtpmap:99 telephone-event/16000
a=rtpmap:100 telephone-event/8000
a=rtcp-fb:* trr-int 5000