소프트폰을 별표에 연결하는 방법

소프트폰을 별표에 연결하는 방법

컨텍스트를 제공하기 위한 내 네트워크는 다음과 같습니다.

근거리 통신망

tleilax서버 에는 sipsak총독의 결과가 분명히 있습니다.

tleilax*CLI> 
tleilax*CLI> core show version
Asterisk 1.8.29.0-vici built by abuild @ cloud110 on a x86_64 running Linux on 2014-08-21 23:18:17 UTC
tleilax*CLI> 
[Feb 20 21:06:19] 
<--- SIP read from UDP:192.168.1.3:44226 --->
OPTIONS sip:345@tleilax SIP/2.0
Via: SIP/2.0/UDP 127.0.1.1:44226;branch=z9hG4bK.508a6d72;rport;alias
From: sip:[email protected]:44226;tag=2a099edc
To: sip:345@tleilax
Call-ID: [email protected]
CSeq: 1 OPTIONS
Contact: sip:[email protected]:44226
Content-Length: 0
Max-Forwards: 0
User-Agent: sipsak 0.9.6
Accept: text/plain

<------------->
[Feb 20 21:06:19] --- (11 headers 0 lines) ---
[Feb 20 21:06:19] Looking for 345 in trunkinbound (domain tleilax)
[Feb 20 21:06:19] 
<--- Transmitting (NAT) to 192.168.1.3:44226 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.1.1:44226;branch=z9hG4bK.508a6d72;alias;received=192.168.1.3;rport=44226
From: sip:[email protected]:44226;tag=2a099edc
To: sip:345@tleilax;tag=as5d21da5c
Call-ID: [email protected]
CSeq: 1 OPTIONS
Server: Asterisk PBX 1.8.29.0-vici
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:192.168.1.2:5060>
Accept: application/sdp
Content-Length: 0


<------------>
[Feb 20 21:06:19] Scheduling destruction of SIP dialog '[email protected]' in 32000 ms (Method: OPTIONS)
[Feb 20 21:06:38] Really destroying SIP dialog '[email protected]' Method: OPTIONS
[Feb 20 21:06:51] Really destroying SIP dialog '[email protected]' Method: OPTIONS
tleilax*CLI> exit
tleilax:~ # 

메시지를 doge보내 려면 :sipsak

thufir@doge:~$ 
thufir@doge:~$ sudo sipsak -vv -s sip:345@tleilax -m "hi"
No SRV record: _sip._tcp.tleilax
No SRV record: _sip._udp.tleilax
using A record: tleilax
Max-Forwards set to 0

message received:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.1.1:44226;branch=z9hG4bK.508a6d72;alias;received=192.168.1.3;rport=44226
From: sip:[email protected]:44226;tag=2a099edc
To: sip:345@tleilax;tag=as5d21da5c
Call-ID: [email protected]
CSeq: 1 OPTIONS
Server: Asterisk PBX 1.8.29.0-vici
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:192.168.1.2:5060>
Accept: application/sdp
Content-Length: 0



** reply received after 0.794 ms **
   SIP/2.0 200 OK
   final received
thufir@doge:~$ 

여러 휴대폰을 사용해 보았는데, 이 휴대폰은전화연결하다:

This assistant is now finished.
You can at any time check your registration state or modify your accounts parameters in the Options/Accounts window.

Alias :   345
Server :   tleilax
Username :   345
Security: None

연결되었음을 나타내는 "200 OK" 메시지가 표시되지 않습니다. 연결 문제를 해결하려면 어떻게 해야 합니까? 두 컴퓨터는 동일한 네트워크에 있고 서로 ping할 수 있습니다. 심지어 소프트폰이 "200 OK" 메시지를 받지 못하는 ssh이유를 이해할 수 없습니다. 다른 소프트폰에서는 비슷한 결과가 나오는데 "시도 중"이라고만 표시됩니다.dogetleilax

사용자:

tleilax*CLI> 
tleilax*CLI> sip show users
Username                   Secret           Accountcode      Def.Context      ACL  Forcerport
101                        password         101              default          No   Yes       
gs102                      password         gs102            default          No   Yes       
tleilax*CLI> 
tleilax*CLI> sip show user 101


  * Name       : 101
  Secret       : <Set>
  MD5Secret    : <Not set>
  Context      : default
  Language     : en
  Accountcode  : 101
  AMA flags    : Unknown
  Netborder CPD: No
  Transfer mode: open
  MaxCallBR    : 384 kbps
  CallingPres  : Presentation Allowed, Not Screened
  Call limit   : 0
  Callgroup    : 
  Pickupgroup  : 
  Callerid     : "" <101>
  ACL          : No
  Sess-Timers  : Accept
  Sess-Refresh : uas
  Sess-Expires : 1800 secs
  Sess-Min-SE  : 90 secs
  RTP Engine   : asterisk
  Codec Order  : (ulaw:20,gsm:20)
  Auto-Framing:  No 

tleilax*CLI> 

구성 파일:

tleilax:~ # 
tleilax:~ # cat /etc/asterisk/sip.conf
[general]

...

#include sip-vicidial.conf

; register SIP account on remote machine if using SIP trunks
; register => testSIPtrunk:[email protected]:5060
;
; setup account for SIP trunking:
; [SIPtrunk]
; disallow=all
; allow=ulaw
; allow=alaw
; type=friend
; username=testSIPtrunk
; secret=test
; host=10.10.10.16
; dtmfmode=inband
; qualify=1000
tleilax:~ # 
tleilax:~ # cat /etc/asterisk/sip-vicidial.conf
; WARNING- THIS FILE IS AUTO-GENERATED BY VICIDIAL, ANY EDITS YOU MAKE WILL BE LOST



[101]
username=101
secret=password
accountcode=101
callerid="" <101>
mailbox=101
context=default
type=friend
host=dynamic

[gs102]
username=gs102
secret=password
accountcode=gs102
callerid="Test Admin Phone" <>
mailbox=102
context=default
type=friend
host=dynamic


; END OF FILE    Last Forced System Reload: 2015-02-20 16:49:28
tleilax:~ # 

답변1

이에 따라 localnet과 nat를 설정해야 합니다.

externip = X.X.X.X
fromdomain = yourdomain.com
localnet = 192.168.X.0/255.255.255.0
qualify=yes

http://www.voip-info.org/wiki/view/Asterisk+SIP+NAT+solutions

관련 정보