返回列表 發帖

CM Phone不能在Asterisk注册成功的原因是(切底解决!!!)

本帖最後由 角色 於 2012-10-2 02:01 編輯

********************************************
注册不成功主要是在sip.conf没有加上
[general]
pedantic=yes

********************************************
下面是一般Authorized问题时候怎样出。

CM Phone 的UAS出的nonce是特别长,一般是8位,但是它超过30。
  1. On 8/15/07, Stanisław Pitucha <stanis at zimbra-1.gradwell.net> wrote:
  2. >
  3. > ----- "Rizwan Hisham" <rizwanhasham at gmail.com> wrote:
  4. > > WWW-Authenticate: Digest algorithm=MD5, realm="asterisk",
  5. > nonce="584760da"
  6. >
  7. > > Authorization: Digest username="bernart48", realm="asterisk",
  8. > algorithm=MD5, uri="sip:bernart48 at 64.182.161.2:9060", nonce="584760da",
  9. > response="948d3923bf2df47eca17c572713af2c7", opaque=""
  10. >
  11. > > What i dont know, and would very much like to know, is what is the
  12. > > purpose of this parameter in sip packets?
  13. >
  14. > It's kind of challenge algorithm. What you see in "response" is not
  15. > MD5(password), but MD5('password', 'realm', ..., 'nonce'). Nonce is
  16. > generated by server so that you don't get the same hash for for every
  17. > authorization by that user. It prevents someone who can see only one way
  18. > communication from breaking your sip session + makes breaking hash a little
  19. > bit harder.
  20. > Nonce should be unique per authorization.
  21. > If nonce wasn't used you could reuse the same response in next connection
  22. > even if you don't know the real password.
  23. >
複製代碼

本帖最後由 角色 於 2012-9-30 15:13 編輯

有关Authentication问题:

http://www.voip-info.org/wiki/view/SIP+Authentication

https://who.rocq.inria.fr/Philip ... authentication.html

TOP

本帖最後由 角色 於 2012-9-29 01:02 編輯

这个从我的Asterisk (在QNAP TS-269 Pro)的sip debug log: 看看CM Phone出的nonce的length=32 digits。一般是8 digits。
  1. <--- SIP read from UDP:202.0.179.3:5060 --->
  2. SIP/2.0 401 Unauthorized
  3. From: <sip:8523501xxxx5@202.0.179.3>;tag=as1d30f914
  4. To: <sip:8523501xxxx@202.0.179.3>;tag=7685ea46
  5. CSeq: 628 REGISTER
  6. Call-ID: 03999dfe3514ec8d7bb820032708fbae@192.168.1.6
  7. Via: SIP/2.0/UDP 116.49.xx.yyy:5228;branch=z9hG4bK2485b13a;rport=5228
  8. WWW-Authenticate: Digest realm="huawei",
  9. nonce="1b697d879c05f32a839a0088d90b0e53",domain="sip:huawei.com",
  10. stale=false,algorithm=MD5
  11. Content-Length: 0


  12. <------------->
  13. --- (10 headers 0 lines) ---
  14. Responding to challenge, registration to domain/host name 202.0.179.3
  15. REGISTER 11 headers, 0 lines
  16. Reliably Transmitting (NAT) to 202.0.179.3:5060:
  17. REGISTER sip:202.0.179.3 SIP/2.0
  18. Via: SIP/2.0/UDP 16.49.xx.yyy:5228;branch=z9hG4bK6352ed19;rport
  19. Max-Forwards: 70
  20. From: <sip:8523501xxxx@202.0.179.3>;tag=as019d952a
  21. To: <sip:8523501xxxx@202.0.179.3>
  22. Call-ID: 03999dfe3514ec8d7bb820032708fbae@192.168.1.6
  23. CSeq: 629 REGISTER
  24. User-Agent: Asterisk PBX
  25. Authorization: Digest username="8523501xxxx", realm="huawei", algorithm=MD5, uri="sip:202.0.179.3", nonce="", response="ceb646f297e29094bb0eea79318c8ed8"
  26. Expires: 120
  27. Contact: <sip:8523501xxxx5@116.49.xx.yyy:5228>
  28. Content-Length: 0
複製代碼

TOP

我按照你的settings,在我的TS-119 NAS看看,但是结果都是一样。

TOP

本帖最後由 角色 於 2012-10-1 17:40 編輯

就下面的信息把注册搞定:

https://issues.asterisk.org/jira/browse/ASTERISK-12743

http://www.asteriskguru.com/natut.php

TOP

如果要注册成功,我们要在Asterisk-GUI里是有得选的,请看下图:

0043.png

TOP

现在注册没有问题,但是RTP却有问题,不知道是否需要用Stun Mechanism呢?估计我的settings与bubblestar兄是有出入的。

TOP

我在想,bubblestar和ckleea师兄的Asterisk都可以,估计是某些settings与我的Asterisk Server (GUI)有些不同,现在我用TS-119的Asterisk Server也出现同样的情况(打不出,503 out of service), 打入一接通就断线。这个问题已经发生于好几位members身上。

可能要花一段时间才能找出原因。

TOP

现在我先针对打入问题。CMPhone不对Asterisk发出Options的要求作回应(qualitfy=yes), 那么前NAT怎样导通呢?

TOP

Att.: It is possible to use OPTION to try to solve NAT problem in order to keep open the connection from Asterisk to the peer behind NAT. I will write about SIP Pbx protected by Firewall/NAT in future posts.


Source: http://www.informaticapressapoch ... -sip-to-rtp-part-4/

TOP

本帖最後由 角色 於 2012-10-1 20:00 編輯

关于NAT and Trunk,下面的帖子写的最清楚。

http://www.informaticapressapoch ... -sip-to-rtp-part-5/

http://blog.lithiumblue.com/2007 ... sip-calls-from.html

TOP

本帖最後由 角色 於 2012-10-1 21:34 編輯

同一个Network,Router,UAS从Asterisk换成Zoiper就马上可以打出打入。他们之间有什么区别呢?

TOP

回復 27# bubblestar

bubblestar师兄,谢谢你的信息,问题已经已经切底解决。

TOP

是否可以sip reload可以搞定呢?

TOP

本帖最後由 角色 於 2013-12-7 18:31 編輯

你用什么GUI?Asterisk-GUI吗?还用你是用什么东西起Asterisk Server呢?你自己compiled?

TOP

返回列表