0

To give context, here's my network:

LAN

On the tleilax server, there's clearly a result from sipsak on doge:

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:sipsak@127.0.1.1:44226;tag=2a099edc
To: sip:345@tleilax
Call-ID: 705273564@127.0.1.1
CSeq: 1 OPTIONS
Contact: sip:sipsak@127.0.1.1: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:sipsak@127.0.1.1:44226;tag=2a099edc
To: sip:345@tleilax;tag=as5d21da5c
Call-ID: 705273564@127.0.1.1
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 '705273564@127.0.1.1' in 32000 ms (Method: OPTIONS)
[Feb 20 21:06:38] Really destroying SIP dialog '1876256264@127.0.1.1' Method: OPTIONS
[Feb 20 21:06:51] Really destroying SIP dialog '705273564@127.0.1.1' Method: OPTIONS
tleilax*CLI> exit
tleilax:~ # 

On doge, sending the sipsak message:

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:sipsak@127.0.1.1:44226;tag=2a099edc
To: sip:345@tleilax;tag=as5d21da5c
Call-ID: 705273564@127.0.1.1
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:~$ 

I've tried a few phones, this is sflphone connecting:

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

Which doesn't give a "200 OK" message indicating that it's connected. How do I even troubleshoot the connectivity? These two computers are on the same network, can ping each other, or even ssh; I don't understand why the softphone on doge has trouble getting a "200 OK" message from tleilax -- it just says "trying," and other softphones give similar results.

the users:

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> 

config files:

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

...

#include sip-vicidial.conf

; register SIP account on remote machine if using SIP trunks
; register => testSIPtrunk:test@10.10.10.16: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:~ # 
  • show your sip.conf's section where you have your users. – Darek Feb 21 '15 at 3:44
  • @Dārayavahuštdi ok, I included the relevant section of sip.conf – Thufir Feb 21 '15 at 4:00
  • what the softphone says when you try to register ? (I always test with linphone or xten). Good idea to debug asterisk is to core set verbose 3, core sip set debug on and try to register. – Darek Feb 21 '15 at 8:58
  • by connect you mean register ? – Darek Feb 21 '15 at 9:20
1

You need setup localnet and nat accordinly

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.