X-Lite is not able to connect Asterisk Server


I fired the below command and get the details

eth0      Link encap:Ethernet  HWaddr 00:16:3e:bf:88:93
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::216:3eff:febf:8893/64 Scope:Link
          RX packets:8493935 errors:0 dropped:555859 overruns:0 frame:0
          TX packets:7962975 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3422485618 (3.4 GB)  TX bytes:3870834986 (3.8 GB)

lo        Link encap:Local Loopback
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:5880 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5880 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:547848 (547.8 KB)  TX bytes:547848 (547.8 KB)

What will be localnet


If this is ifconfig on the asterisk server then localnet =


If Asterisk is not behind NAT, then you don’t need to set “localnet” or “externip/externaddr”. You only need to set the “nat” option on endpoints which are themselves behind NAT.


Agree with @jcolp . localnet , externip etc are for NAT purposes only


Ok… I got it. As I believe my asterisk server is not behind NAT as when I am connecting by using my mobile internet or other internet, they are working fine as X-lite is registering perfectly.
Now what I have seen, since my ISP provided me a fixed GLOBAL_IP, I need to set
host=< Asterisk_server_Public_IP >. Using the parameter host=dynamic not working and Status is “Unreachable”

CLI> SIP show peers
It is showing my Status is “Unreachable”.
Host= < Asterisk_server_Public_IP > showing the status is reachable.
Why it is so?


host should be the address of the peer, not the address of the Asterisk daemin.


I have provided the address of the peer [The Global-IP provided by my ISP]. Still the status is unreachable.
Any clue please?


Also if I will provide host=dynamic at sip.conf, then how asterisk client will know which peer to connect and how asterisk client will know what will the GLOBAL_IP/Dynamic IP for the peer running at remote windows desktop. [for example X-lite running at remote windows as peer]


That is the purpose of ‘Registration’

Your SIP Endpoint sends Registration requests to your server, the Server then knows where the endpoint is.


Because the address will be provided in the Contact header of the REGISTER request from the remote peer.


Ok… I understood. But when I am providing keepalive=Yes and sip.conf [general] section
CLI> SIP Show peers showing the status “Unmonitored”
Here is the Details from Debug
CLI? SIP show Pokhraj

sip show peer Pokhraj

  * Name       : Pokhraj
  Description  :
  Secret       : <Set>
  MD5Secret    : <Not set>
  Remote Secret: <Not set>
  Context      : incoming
  Record On feature : automon
  Record Off feature : automon
  Subscr.Cont. : <Not set>
  Language     :
  Tonezone     : <Not set>
  AMA flags    : Unknown
  Transfer mode: open
  CallingPres  : Presentation Allowed, Not Screened
  Callgroup    :
  Pickupgroup  :
  Named Callgr :
  Nam. Pickupgr:
  MOH Suggest  :
  Mailbox      :
  VM Extension : asterisk
  LastMsgsSent : 32767/65535
  Call limit   : 0
  Max forwards : 0
  Dynamic      : Yes
  Callerid     : "" <>
  MaxCallBR    : 384 kbps
  Expire       : 3393
  Insecure     : no
  Force rport  : Yes
  Symmetric RTP: Yes
  ACL          : No
  DirectMedACL : No
  T.38 support : No
  T.38 EC mode : Unknown
  T.38 MaxDtgrm: 4294967295
  DirectMedia  : No
  PromiscRedir : No
  User=Phone   : No
  Video Support: No
  Text Support : No
  Ign SDP ver  : No
  Trust RPID   : No
  Send RPID    : No
  Path support : No
  Path         : N/A
  TrustIDOutbnd: Legacy
  Subscriptions: Yes
  Overlap dial : Yes
  DTMFmode     : rfc2833
  Timer T1     : 500
  Timer B      : 32000
  ToHost       :
  Addr->IP     :
  Defaddr->IP  : (null)
  Prim.Transp. : UDP
  Allowed.Trsp : UDP
  Def. Username: Pokhraj
  SIP Options  : replaces replace
  Codecs       : (ulaw|alaw)
  Auto-Framing : No
  Status       : Unmonitored
  Useragent    : X-Lite release 5.4.0 stamp 94388
  Reg. Contact : sip:Pokhraj@;rinstance=e397094e719bd3e7
  Qualify Freq : 60000 ms
  Keepalive    : 60000 ms
  Sess-Timers  : Accept
  Sess-Refresh : uas
  Sess-Expires : 1800 secs
  Min-Sess     : 90 secs
  RTP Engine   : asterisk
  Parkinglot   :
  Use Reason   : No
  Encryption   : No
  RTCP Mux     : No

Please advice


I believe this shows that a registration has been successful. It would have been easier to see with sip show peers.


But why it is showing unmonitored?


Because you don’t have qualify enabled.

I think you really need to do some reading as you asking lots of questions that nearly everyone else answers for themselves.


I have done that…

alwaysauthreject = yes


Resolved the issue. I am able to connect both the peers successfully.
Thanks Again for the support and your valuable advice.