私はJavaを使用して一口電話を開発しており、サーバーのようなAsterisk 1.8を使用しています。サーバーへの接続に問題があります (compte sip 1700 - アドレス IP サーバー: 192.168.1.10
このメッセージがあります:
>>> REGISTER sip:192.168.1.10:5060 SIP/2.0
Call-ID: 9156414a4935f5b6a698218aec5ea69d@192.168.1.4
CSeq: 1 REGISTER
From: "Jaafar" <sip:1700>;tag=647554
To: "Jaafar" <sip:1700>
Via: SIP/2.0/UDP 192.168.1.4:5060;branch=z9hG4bK19dfa39eec2c6ea76aff876d7facf2b2
Max-Forwards: 70
Contact: <sip:192.168.1.4:5060>
Expires: 60000
Content-Length: 0
<<< SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.4:5060;rport=5060;branch=z9hG4bK19dfa39eec2c6ea76aff876d7facf2b2;received=192.168.1.4
From: "Jaafar" <sip:1700>;tag=647554
To: "Jaafar" <sip:1700>;tag=as7841605b
Call-ID: 9156414a4935f5b6a698218aec5ea69d@192.168.1.4
CSeq: 1 REGISTER
Server: Asterisk PBX 1.8.22.0
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO,PUBLISH
Supported: replaces,timer
WWW-Authenticate: Digest nonce="6993072a",realm="asterisk",algorithm=MD5
Content-Length: 0
PS: これは、クライアント sip のソースの URL http://speedy.sh/H8YeK/SipClient.zipです。
アスタリスクでこの問題を解決しました。これで 2 台のソフトフォンを接続できましたが、別の問題が発生しました。音声とビデオが機能しません。この例外は、Eclipse からソフトフォンを実行すると表示されます
`
java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
at java.util.Vector.elementAt(Unknown Source)
at com.pfe.config.VoiceTool.startMedia(VoiceTool.java:32)
at com.pfe.phone.Softphone3Listener.processResponse(Softphone3Listener.java:426)
at gov.nist.javax.sip.EventScanner.deliverEvent(EventScanner.java:290)
at gov.nist.javax.sip.EventScanner.run(EventScanner.java:492)
at java.lang.Thread.run(Unknown Source)
EL LLAMANTE ESCUCHA EN40000"`
そして、ボタンをクリックしないときのこの例外
`
java.lang.NullPointerException
at com.pfe.config.VoiceTool.stopMedia(VoiceTool.java:88)
at com.pfe.phone.Softphone3Listener.userInput(Softphone3Listener.java:613)
at com.pfe.phone.Softphone3GUI.jButton4_actionPerformed(Softphone3GUI.java:288)
at com.pfe.phone.zphone2GUI_jButton4_actionAdapter.actionPerformed(Softphone3GUI.java:360)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$400(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
`