|
Request [method='REGISTER'; cseq='2089'; transport='UDP'; size='848'; received '192.168.1.112:5060' -> '192.168.1.112:5060'.
<begin>
REGISTER sip:192.168.1.112 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.112:5060;branch=z9hG4bK-661f276157384f1e92f3cf04c8493f7c;rport=5060;received=192.168.1.112
Via: SIP/2.0/UDP 192.168.1.22:5060;branch=z9hG4bK59285524;received=192.168.1.22
From: <sip:022@192.168.1.112>;tag=220950431
To: <sip:022@192.168.1.112>
Call-ID: 429890312@192.168.1.22
CSeq: 2089 REGISTER
Contact: <sip:022@192.168.1.22:5060>;expires=180
Proxy-Authorization: Digest username="022", realm="test.com", nonce="e90a896d421e4b70b316c76903f1e26f", uri="sip:192.168.1.112", response="5cb18761dac54082ef4d0b2bd6915043", opaque="317eec70cd3c4403b2d6527c1680ab84"
Max-Forwards: 29
User-Agent: dbl
Expires: 180
Record-Route: <sip:192.168.1.112:5060;lr;flowinfo="220950431:192.168.1.112:5060-192.168.1.22:5060-udp 192.168.1.112:5060-192.168.1.112:5060-udp"="">
Content-Length: 0
<end>
Transaction [branch='z9hG4bK-d1dbb407e8b84713ba79f1835f7a43aa';method='REGISTER';IsServer=true] created.
Transaction [branch='z9hG4bK-d1dbb407e8b84713ba79f1835f7a43aa';method='REGISTER';IsServer=True] switched to 'Trying' state.
Transaction [branch='z9hG4bK-ece3aa9beb194ba396e89b01e5ecc623';method='REGISTER';IsServer=true] created.
Transaction [branch='z9hG4bK-ece3aa9beb194ba396e89b01e5ecc623';method='REGISTER';IsServer=True] switched to 'Trying' state.
Response [flowReuse=true; transactionID='z9hG4bK-d1dbb407e8b84713ba79f1835f7a43aa'; method='REGISTER'; cseq='1318'; transport='UDP'; size='613'; statusCode='407'; reason='Proxy Authentication Required: Invalid nonce value !'; sent '192.168.1.112:5060' -> '192.168.1.112:5060'.
<begin>
SIP/2.0 407 Proxy Authentication Required: Invalid nonce value !
Via: SIP/2.0/UDP 192.168.1.112:5060;branch=z9hG4bK-d1dbb407e8b84713ba79f1835f7a43aa;rport=5060;received=192.168.1.112
Via: SIP/2.0/UDP 192.168.1.21:5060;branch=z9hG4bK176059555;received=192.168.1.21
From: <sip:021@192.168.1.112>;tag=1409052641
To: <sip:021@192.168.1.112>;tag=f789489babccc3cbdaf260d9
Call-ID: 1661902051@192.168.1.21
CSeq: 1318 REGISTER
Allow: INVITE,ACK,CANCEL,BYE,MESSAGE
Proxy-Authenticate: digest realm="test.com",nonce="0e2ae211b90b4118a26d110120d9941e",opaque="317eec70cd3c4403b2d6527c1680ab84"
Content-Length: 0
<end>
I found the missing password for authentication。
private void SIP_Authenticate(SIP_AuthenticateEventArgs e)
e.AuthContext password is empty,in addition realm is empty。
if add m_pSipProxy.Stack.Realm = "test.com"; The above errors occurred。
Help me!!!
|
|
|
|
|
I am getting 403 Forbidden error. I am using SipDroid as my SIP client. I even registered my username and password with the server. Am I missing something?
|
|
|
|
|
|
|
everything working fine
but when i try to calling does not work
i have a sip server
any help please!!
|
|
|
|
|
class SDP
329 if(!string.IsNullOrEmpty(this.Originator)){
330
331 retVal.AppendLine("0=" + this.Originator);
332
333 }
modified 22-Jun-12 3:23am.
|
|
|
|
|
169 private void RemoveExpiredNonces()
170 {
171 lock(m_pNonces){
172 for(int i=0;i<m_pnonces.count;i++){
173 nonce="" expired,="" remove="" it.
174="" <b=""> if(m_pNonces[i].CreateTime.AddSeconds(m_ExpireTime) > DateTime.Now){
175 m_pNonces.RemoveAt(i);
176 i--;
177 }
178 }
179 }
180 }
179 }
180 }
|
|
|
|
|
|
IPPhone IP is 192.168.1.2; Sip Proxy IP is 192.168.1.253
When IPPhone Register , the SIP fails the process and shows the error.
What can I do to resolve it ?
////// error log//////////
System.FormatException: 輸入字串格式不正確。(translation: input string wrong)
於 System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
於 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
於 System.Convert.ToInt32(String value)
於 LumiSoft.Net.AUTH.Auth_HttpDigest.Parse(String digestResponse) 於 D:\Csharp Book\LumiSoft.Net\Net\Net\AUTH\Auth_HttpDigest.cs: 行(row) 126
於 LumiSoft.Net.AUTH.Auth_HttpDigest..ctor(String digestResponse, String requestMethod) 於 D:\Csharp Book\LumiSoft.Net\Net\Net\AUTH\Auth_HttpDigest.cs: 行 35
於 LumiSoft.Net.SIP.SIP_Utils.GetCredentials(SIP_Request request, String realm) 於 D:\Csharp Book\LumiSoft.Net\Net\Net\SIP\SIP_Utils.cs: 行 145
於 LumiSoft.Net.SIP.Proxy.SIP_Proxy.AuthenticateRequest(SIP_RequestReceivedEventArgs e, String& userName) 於 D:\Csharp Book\LumiSoft.Net\Net\Net\SIP\Proxy\SIP_Proxy.cs: 行 823
於 LumiSoft.Net.SIP.Proxy.SIP_Proxy.ForwardRequest(Boolean statefull, SIP_RequestReceivedEventArgs e, Boolean addRecordRoute) 於 D:\Csharp Book\LumiSoft.Net\Net\Net\SIP\Proxy\SIP_Proxy.cs: 行 351
於 LumiSoft.Net.SIP.Proxy.SIP_Proxy.OnRequestReceived(SIP_RequestReceivedEventArgs e) 於 D:\Csharp Book\LumiSoft.Net\Net\Net\SIP\Proxy\SIP_Proxy.cs: 行 174
///////reg log////////
Transaction [branch='z9hG4bK4e8808b81af58f0f0f98f9fae0fa8ac6';method='REGISTER';IsServer=true] timer I(Non-INVITE request retransmission wait) triggered.
Transaction [branch='z9hG4bK4e8808b81af58f0f0f98f9fae0fa8ac6';method='REGISTER';IsServer=True] switched to 'Terminated' state.
Request [method='REGISTER'; cseq='781'; transport='UDP'; size='401'; received '192.168.1.2:5060' -> '192.168.1.253:5060'.
REGISTER sip:192.168.1.253 SIP/2.0
Call-ID: 4099112003-3E8B-0007
Contact:
CSeq: 781 REGISTER
Expires: 3600
From: "101" ;tag=50-831083433
Max-Forwards: 70
To: "101"
User-Agent: AmRoad
Via: SIP/2.0/UDP 192.168.1.2:5060;rport=5060;branch=z9hG4bKed119c3b6e431f736168068fd9086387;received=192.168.1.2
Content-Length: 0
Transaction [branch='z9hG4bKed119c3b6e431f736168068fd9086387';method='REGISTER';IsServer=true] created.
Transaction [branch='z9hG4bKed119c3b6e431f736168068fd9086387';method='REGISTER';IsServer=True] switched to 'Trying' state.
Response [flowReuse=true; transactionID='z9hG4bKed119c3b6e431f736168068fd9086387'; method='REGISTER'; cseq='781'; transport='UDP'; size='505'; statusCode='407'; reason='Proxy Authentication Required'; sent '192.168.1.253:5060' -> '192.168.1.2:5060'.
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 192.168.1.2:5060;rport=5060;branch=z9hG4bKed119c3b6e431f736168068fd9086387;received=192.168.1.2
From: "101" ;tag=50-831083433
To: "101" ;tag=91b64c1f81bef5e95e30cea3
Call-ID: 4099112003-3E8B-0007
CSeq: 781 REGISTER
Allow: INVITE,ACK,CANCEL,BYE,MESSAGE
Proxy-Authenticate: digest realm="",nonce="61bc850c786241f19f57580448a9480b",opaque="1d795f4460ec4cfd9892f4ecd50d91c7"
Content-Length: 0
Transaction [branch='z9hG4bKed119c3b6e431f736168068fd9086387';method='REGISTER';IsServer=True] switched to 'Completed' state.
Transaction [branch='z9hG4bKed119c3b6e431f736168068fd9086387';method='REGISTER';IsServer=true] timer J(Non-INVITE request retransmission wait) started, will trigger after 32000.
Request [method='REGISTER'; cseq='782'; transport='UDP'; size='626'; received '192.168.1.2:5060' -> '192.168.1.253:5060'.
REGISTER sip:192.168.1.253 SIP/2.0
Call-ID: 4099112003-3E8B-0007
Contact:
CSeq: 782 REGISTER
Expires: 3600
From: "101" ;tag=50-831083433
Max-Forwards: 70
Proxy-Authorization: Digest username="101@test.com",realm="",nonce="61bc850c786241f19f57580448a9480b",uri="sip:192.168.1.253",response="5dce688c47b46a36dddfe8b8c162fbf8",opaque="1d795f4460ec4cfd9892f4ecd50d91c7",nc=0000030e
To: "101"
User-Agent: AmRoad
Via: SIP/2.0/UDP 192.168.1.2:5060;rport=5060;branch=z9hG4bK32d8da85d26639c06759a5a1082c56fa;received=192.168.1.2
Content-Length: 0
Response [transactionID=''; method='REGISTER'; cseq='782'; transport='UDP'; size='409'; statusCode='500'; reason='Server Internal Error: 輸入字串格式不正確。'; sent '' -> '192.168.1.2:5060'.
SIP/2.0 500 Server Internal Error: 頛詨摮葡?澆?銝迤蝣箝?
Via: SIP/2.0/UDP 192.168.1.2:5060;rport=5060;branch=z9hG4bK32d8da85d26639c06759a5a1082c56fa;received=192.168.1.2
From: "101" ;tag=50-831083433
To: "101" ;tag=0f7c40ad88cb505d4fb3ece3
Call-ID: 4099112003-3E8B-0007
CSeq: 782 REGISTER
Allow: INVITE,ACK,CANCEL,BYE,MESSAGE
Content-Length: 0
Transaction [branch='z9hG4bKed119c3b6e431f736168068fd9086387';method='REGISTER';IsServer=true] timer I(Non-INVITE request retransmission wait) triggered.
Transaction [branch='z9hG4bKed119c3b6e431f736168068fd9086387';method='REGISTER';IsServer=True] switched to 'Terminated' state.
|
|
|
|
|
Hi,
One thing what i see ... is :
To: Can not be just "101", it must be URI.
Normally valu like "sip:101@somedomian.com"
|
|
|
|
|
Finally I set the Registrar as URL, than Register process is successful.
IP Phone : IP: 192.168.1.2, UserName: 101, Account: 101, PassWord:1234 , SIP Proxy: 192.168.1.253, Registrar: test.com
SIP Proxy: Setting Tab -> IP: 192.168.1.253, User Account: 101, PassWord:1234 , Address: 101@test.com
///////////////
But new problem happen. After the Communication between two IP Phones and the sip flows disposed, I redial a phone but get a error message as following:
=========error log======================================
System.ObjectDisposedException: Fail to access the Disposed object 。
object name: 'SIP_Flow'。
於 LumiSoft.Net.SIP.Stack.SIP_Flow.get_ID() 於 D:\Csharp Book\LumiSoft.Net\Net\Net\SIP\Stack\SIP_Flow.cs: 行 477
於 LumiSoft.Net.SIP.Proxy.SIP_ProxyContext.TargetHandler.SendToFlow(SIP_Flow flow, SIP_Request request) 於 D:\Csharp Book\LumiSoft.Net\Net\Net\SIP\Proxy\SIP_ProxyContext.cs: 行 615
於 LumiSoft.Net.SIP.Proxy.SIP_ProxyContext.TargetHandler.Start() 於 D:\Csharp Book\LumiSoft.Net\Net\Net\SIP\Proxy\SIP_ProxyContext.cs: 行 532
於 LumiSoft.Net.SIP.Proxy.SIP_ProxyContext.Start() 於 D:\Csharp Book\LumiSoft.Net\Net\Net\SIP\Proxy\SIP_ProxyContext.cs: 行 1025
於 LumiSoft.Net.SIP.Proxy.SIP_Proxy.ForwardRequest(Boolean statefull, SIP_RequestReceivedEventArgs e, Boolean addRecordRoute) 於 D:\Csharp Book\LumiSoft.Net\Net\Net\SIP\Proxy\SIP_Proxy.cs: 行 587
於 LumiSoft.Net.SIP.Proxy.SIP_Proxy.OnRequestReceived(SIP_RequestReceivedEventArgs e) 於 D:\Csharp Book\LumiSoft.Net\Net\Net\SIP\Proxy\SIP_Proxy.cs: 行 174
===========sip log=============================
Transaction [branch='z9hG4bK0b3458bd91bbc9dbac04f955c639d475';method='BYE';IsServer=True] switched to 'Completed' state.
Transaction [branch='z9hG4bK0b3458bd91bbc9dbac04f955c639d475';method='BYE';IsServer=true] timer J(Non-INVITE request retransmission wait) started, will trigger after 32000.
Transaction [branch='z9hG4bK-75d6c012c1be4f818bf8a145592ddeee';method='BYE';IsServer=False] switched to 'Completed' state.
Transaction [branch='z9hG4bK-75d6c012c1be4f818bf8a145592ddeee';method='BYE';IsServer=false] timer K(Non-INVITE 3xx - 6xx response retransmission wait) started, will trigger after 5000.
Transaction [branch='z9hG4bK-75d6c012c1be4f818bf8a145592ddeee';method='BYE';IsServer=false] timer K(Non-INVITE 3xx - 6xx response retransmission wait) triggered.
Transaction [branch='z9hG4bK-75d6c012c1be4f818bf8a145592ddeee';method='BYE';IsServer=False] switched to 'Terminated' state.
Transaction [branch='z9hG4bK-75d6c012c1be4f818bf8a145592ddeee';method='BYE';IsServer=false] disposed.
Transaction [branch='z9hG4bK-75d6c012c1be4f818bf8a145592ddeee';method='BYE';IsServer=False] switched to 'Disposed' state.
ProxyContext(id='c4251e80-8ba0-40bb-b172-97f8980427fa') disposed.
Request [method='INVITE'; cseq='8'; transport='UDP'; size='780'; received '192.168.1.2:5060' -> '192.168.1.253:5060'.
INVITE sip:103@test2.com SIP/2.0
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,REGISTER,INFO,PRACK,REFER,UPDATE
Call-ID: 4190661699-2B8D-0006
Contact: "102"
Content-Type: application/sdp
CSeq: 8 INVITE
Expires: 180
From: "102" ;tag=40-1766746275
Max-Forwards: 70
Supported: replaces,timer
To:
User-Agent: AmRoad
Via: SIP/2.0/UDP 192.168.1.2:5060;rport=5060;branch=z9hG4bK3e67bd1a77d7ca7954d700aceac28d13;received=192.168.1.2
Content-Length: 263
v=0
o=102 4190661697 4190661697 IN IP4 192.168.1.2
s=Session SDP
c=IN IP4 192.168.1.2
t=0 0
m=audio 9016 RTP/AVP 18 0 8 101
a=ptime:20
a=rtpmap:18 G729/8000
a=rtpmap PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000/1
a=fmtp:101 0-15
Transaction [branch='z9hG4bK3e67bd1a77d7ca7954d700aceac28d13';method='INVITE';IsServer=true] created.
Transaction [branch='z9hG4bK3e67bd1a77d7ca7954d700aceac28d13';method='INVITE';IsServer=True] switched to 'Proceeding' state.
ProxyContext(id='5b232fdc-fdae-4828-a96a-e771034269e4') created.
Response [transactionID=''; method='INVITE'; cseq='8'; transport='UDP'; size='423'; statusCode='500'; reason='Server Internal Error: Fail to access the Disposed object。
object name: 'SIP_Flow'。'; sent '' -> '192.168.1.2:5060'.
SIP/2.0 500 Server Internal Error:
object name: 'SIP_Flow'
Via: SIP/2.0/UDP 192.168.1.2:5060;rport=5060;branch=z9hG4bK3e67bd1a77d7ca7954d700aceac28d13;received=192.168.1.2
From: "102" ;tag=40-1766746275
To: ;tag=a18f4a78a3a52b0e8ff37026
Call-ID: 4190661699-2B8D-0006
CSeq: 8 INVITE
Allow: INVITE,ACK,CANCEL,BYE,MESSAGE
Content-Length: 0
Request [transactionID='z9hG4bK3e67bd1a77d7ca7954d700aceac28d13'; method='ACK'; cseq='8'; transport='UDP'; size='332'; received '192.168.1.253:5060' <- '192.168.1.2:5060'.
ACK sip:103@test2.com SIP/2.0
Call-ID: 4190661699-2B8D-0006
CSeq: 8 ACK
From: "102" ;tag=40-1766746275
Max-Forwards: 70
To: ;tag=a18f4a78a3a52b0e8ff37026
Via: SIP/2.0/UDP 192.168.1.2:5060;rport=5060;branch=z9hG4bK3e67bd1a77d7ca7954d700aceac28d13;received=192.168.1.2
Content-Length: 0
Response [flowReuse=true; transactionID='z9hG4bK3e67bd1a77d7ca7954d700aceac28d13'; method='INVITE'; cseq='8'; transport='UDP'; size='344'; statusCode='100'; reason='Trying'; sent '192.168.1.253:5060' -> '192.168.1.2:5060'.
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.2:5060;rport=5060;branch=z9hG4bK3e67bd1a77d7ca7954d700aceac28d13;received=192.168.1.2
From: "102" ;tag=40-1766746275
To: ;tag=a18f4a78a3a52b0e8ff37026
Call-ID: 4190661699-2B8D-0006
CSeq: 8 INVITE
Allow: INVITE,ACK,CANCEL,BYE,MESSAGE
Content-Length: 0
Transaction [branch='z9hG4bK0b3458bd91bbc9dbac04f955c639d475';method='BYE';IsServer=true] timer I(Non-INVITE request retransmission wait) triggered.
Transaction [branch='z9hG4bK0b3458bd91bbc9dbac04f955c639d475';method='BYE';IsServer=True] switched to 'Terminated' state.
|
|
|
|
|
Conatct and from fields must be URI too, not sure if that changes anything.
|
|
|
|
|
THX !
But My IP Phone(wvp-800) do not have a item to set domain name but IP.
ps: IP Phone : model: wvp-800 url: http://www.welltech.com/product_e_0l.htm
|
|
|
|
|
Hi Ivar,
Recentlly I got a task to navigate phone calls done from voip adapter (using sip protocol). Your solution seems to be exellent, but I do not know how to connect and set all these things. I run your Sip Proxy demo on my comuter and create users [test1; test2] in Settings tab. After setting voip adapter [sip proxy=MyComputerIP; Line1=test1; Line2=test2], the lines are appeared in Registrations tab. Also in Gateways tab I added corectlly sip gateway (sip.example_sip.com or IP of the sip proxy), but I can not make a call. When I try to make a call there is a busy tone (Destination not found).
Please help me with this, Thanks
|
|
|
|
|
Hi,
You should not fill gateway. Gateway is meant for other URI than sip like "tel:".
This proxy application can only forward call to public endpoint server.
It' just uses domain name from URI and finds right server for it.
I guess that you try to forward call to internal server, thats why you get this answer.
|
|
|
|
|
Hello,
i would like to ask you if you know any source code for sip client with Video support that works fine ?
Thanks
wael
|
|
|
|
|
Hi,
Sorry i don't know any.
|
|
|
|
|
Hi,
I have a few questions about RTCP.
Let's assume that a SIP connection between 2 soft-phones, A and B, is established.
1. Subsequently, if A sends a RTCP sender report to B, is B required to send something like ACK back to A?
2. How often is A supposed to send a RTCP sender/receiver report to B?
3. If A sends a RTCP packet with RTP version set to 0 (instead of 2), will B complain and cause some delay?
Thanks.
|
|
|
|
|
Hi,
>1. Subsequently, if A sends a RTCP sender report to B, is B required to send something like ACK back to A?
No.
>2. How often is A supposed to send a RTCP sender/receiver report to B?
It depends how many participants in session. The formula is defined in RTP rfc.
>3. If A sends a RTCP packet with RTP version set to 0 (instead of 2), will B complain and cause some delay?
No. Also RTCP is optional.
|
|
|
|
|
Thanks for your reply.
I am having a problem calling from a landline to a sip client via a sip provider. (Landline-->SIP provider-->Asterisk (NATed)-->SIP client)
The problem is that after a session is established, I always have to wait about 19 seconds before I can hear things from the SIP client.
WireShark shows SIP packets are exchanged properly as soon as a call comes in.
And during the wait, I also see a few "Unknown RTP version 0" packets in WireShark.
Some people on the Internet said this may have something to do with incorrect codec, but in my case, I can still hear things from the SIP client.
What might be causing this problem? How do I narrow down the problem? Thanks again.
|
|
|
|
|
There can be NAT/firewall problems. It't may block data communication on one way.
|
|
|
|
|
When using the AuthContext.get, the function can get the user name, realm, algorithm...but the password is empty.
What is the problem? In the userInfo of the server can get the password, but when compare witht the e.AuthContext.password, it is empty.
In the application: For registration, it need:
Domain : <server ip=""> (without port:5060)
User : 100
Password: 123456
Auth ID: 100
Expire Time: 1000
In the AuthContext can get username = Auth ID....why not User property?? Is me set the wrong property?
|
|
|
|
|
This is because you need to set password: e.AuthContext = password;
Then server authenticates user.
|
|
|
|
|
But in the private void SIP_Authenticate(SIP_AuthenticateEventArgs e)
See the property,it cannot found the value of password.
Where can i set it again?
|
|
|
|
|
Server must know user password.
|
|
|
|
|