我正在尝试通过自定义sip客户端拨打电话。我能够成功注册我的SIP配置文件并成功接收来电,但拨打电话时遇到了问题。
在logcat中我收到以下错误:
sip errorcode -6
com.android.server.sip.SipSession Group$Make CallCommand
而以下是freeswitch的siptrace:
------------------------------------------------------------------------
INVITE sip:9198@10.129.28.241 SIP/2.0
Call-ID: ecfe2bbb0c4be0ca556d4f69c4d29188@10.129.28.75
CSeq: 5490 INVITE
From: <sip:1019@10.129.28.241>;tag=3095854940
To: <sip:9198@10.129.28.241>
Via: SIP/2.0/UDP 10.129.28.75:47642;branch=z9hG4bKa80387f35fdf1701b2cb37f1de0c3edb353031;rport
Max-Forwards: 70
Contact: <sip:1019@10.129.28.75:47642;transport=udp>
Content-Type: application/sdp
Content-Length: 297
v=0
o=- 1389522189651 1389522189669 IN IP4 10.129.28.75
s=-
c=IN IP4 10.129.28.75
t=0 0
m=audio 33590 RTP/AVP 96 97 3 0 8 127
a=rtpmap:96 GSM-EFR/8000
a=rtpmap:97 AMR/8000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:127 telephone-event/8000
a=fmtp:127 0-15
------------------------------------------------------------------------
send 374 bytes to udp/[10.129.28.75]:47642 at 10:23:21.404790:
------------------------------------------------------------------------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.129.28.75:47642;branch=z9hG4bKa80387f35fdf1701b2cb37f1de0c3edb353031;rport=47642
From: <sip:1019@10.129.28.241>;tag=3095854940
To: <sip:9198@10.129.28.241>
Call-ID: ecfe2bbb0c4be0ca556d4f69c4d29188@10.129.28.75
CSeq: 5490 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.5.8b+git~20140103T212148Z~ae7371e7c5~64bit
Content-Length: 0
------------------------------------------------------------------------
2014-01-12 15:53:21.402024 [NOTICE] switch_channel.c:1055 New Channel sofia/internal/1019@10.129.28.241 [8fba409c-7b73-11e3-bc5c-b3f2a23fd7a2]
send 892 bytes to udp/[10.129.28.75]:47642 at 10:23:21.406530:
------------------------------------------------------------------------
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 10.129.28.75:47642;branch=z9hG4bKa80387f35fdf1701b2cb37f1de0c3edb353031;rport=47642
From: <sip:1019@10.129.28.241>;tag=3095854940
To: <sip:9198@10.129.28.241>;tag=67DrgHp353eFa
Call-ID: ecfe2bbb0c4be0ca556d4f69c4d29188@10.129.28.75
CSeq: 5490 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.5.8b+git~20140103T212148Z~ae7371e7c5~64bit
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, precondition, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Proxy-Authenticate: Digest realm="10.129.28.241", nonce="8fba5b68-7b73-11e3-bc5d-b3f2a23fd7a2", algorithm=MD5, qop="auth"
Content-Length: 0
------------------------------------------------------------------------
send 892 bytes to udp/[10.129.28.75]:47642 at 10:23:21.907617:
------------------------------------------------------------------------
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 10.129.28.75:47642;branch=z9hG4bKa80387f35fdf1701b2cb37f1de0c3edb353031;rport=47642
From: <sip:1019@10.129.28.241>;tag=3095854940
To: <sip:9198@10.129.28.241>;tag=67DrgHp353eFa
Call-ID: ecfe2bbb0c4be0ca556d4f69c4d29188@10.129.28.75
CSeq: 5490 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.5.8b+git~20140103T212148Z~ae7371e7c5~64bit
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, precondition, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Proxy-Authenticate: Digest realm="10.129.28.241", nonce="8fba5b68-7b73-11e3-bc5d-b3f2a23fd7a2", algorithm=MD5, qop="auth"
Content-Length: 0
------------------------------------------------------------------------
send 892 bytes to udp/[10.129.28.75]:47642 at 10:23:22.907607:
------------------------------------------------------------------------
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 10.129.28.75:47642;branch=z9hG4bKa80387f35fdf1701b2cb37f1de0c3edb353031;rport=47642
From: <sip:1019@10.129.28.241>;tag=3095854940
To: <sip:9198@10.129.28.241>;tag=67DrgHp353eFa
Call-ID: ecfe2bbb0c4be0ca556d4f69c4d29188@10.129.28.75
CSeq: 5490 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.5.8b+git~20140103T212148Z~ae7371e7c5~64bit
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, precondition, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Proxy-Authenticate: Digest realm="10.129.28.241", nonce="8fba5b68-7b73-11e3-bc5d-b3f2a23fd7a2", algorithm=MD5, qop="auth"
Content-Length: 0
------------------------------------------------------------------------
freeswitch@VPCEH36EN> sofia global siptrace off
+OK Global siptrace off
freeswitch@VPCEH36EN> 2014-01-12 15:53:31.442026 [WARNING] switch_core_state_machine.c:567 8fba409c-7b73-11e3-bc5c-b3f2a23fd7a2 sofia/internal/1019@10.129.28.241 Abandoned
2014-01-12 15:53:31.442026 [NOTICE] switch_core_state_machine.c:570 Hangup sofia/internal/1019@10.129.28.241 [CS_NEW] [WRONG_CALL_STATE]
2014-01-12 15:53:31.442026 [NOTICE] switch_core_session.c:1609 Session 10 (sofia/internal/1019@10.129.28.241) Ended
2014-01-12 15:53:31.442026 [NOTICE] switch_core_session.c:1613 Close Channel sofia/internal/1019@10.129.28.241 [CS_DESTROY]
答案 0 :(得分:0)
SIP代理需要身份验证(状态“需要407代理身份验证”和Proxy-Authenticate标头),但您不发送任何(没有代理授权标头)。通常,您还需要使用与注册时相同的凭据来创建呼叫。