can't connect with SIP-Clients to Elastix server

Discussion in 'General' started by Dedalus, Aug 20, 2009.

  1. Dedalus

    Joined:
    Aug 19, 2009
    Messages:
    16
    Likes Received:
    0
    I am trying to set-up Elastix on a test-box before we will use it in production in a small start-up
    have managed to install elastix 1.5.2.2. on a 3GHz Intel-Box with 1,3 GB Ram, can connect to the elastix GUI from Opera on a WinXP-Box (IP: 192.168.1.2),
    have managed to add extensions (following where appropriate Elastix without Tears), but can not connect any SIP-client; Tried SIP Phoner, XLitefree, (all installed on XP-Box (IP: 192.168.1.2) sip client is telling me always: "sip: 12@192.168.1.100 registering <Not found>"
    have checked: netstat -napt | grep asterisk
    gives me: tcp 0 0 0.0.0.0:5038 0.0.0.0:* LISTEN 3070/asterisk
    tcp 0 0 127.0.0.1:5038 127.0.0.1:43479 ESTABLISHED 3070/asterisk
    I have changed on the sip-client to use port 3070, but no change... still <Not found>
    Any suggestions? would be very glad to get some hints, as I have googled for hours and running out of ideas what to look for...
     
  2. Bob

    Bob

    Joined:
    Nov 4, 2007
    Messages:
    2,400
    Likes Received:
    1
    Dedalus

    netstat -l | grep sip
    or
    netstat -l

    will confirm that your Elastix box is ready to accept connections.

    However, I don't believe this is your issue, especially if you have build a box using the standard ISO install disk.

    So lets go back to basics....uninstall all your softphones and re-install XLite fresh (we need a known starting point).

    Lets work first with one extension, can you confirm what number you have given that extension in Elastix and next set the secret to that same as the extension number. Also as a good idea stick to three digit extensions for the time being (partly as I have not tried them, but you can try them yourself after we have got through basics). I raise this as it appears you have setup extension 12 based on what your SIP client is telling you. probably setup a 201 for test purposes.

    Then in Xlite setup the following

    Display Name Deladus
    username 201
    password 201
    Auth Username 201 (same as your username)
    domain ( your Elastix IP Address) e.g. 192.168.1.100
    tick register with domain and receive incoming calls
    select Send Outbound via Target domain


    This should be the basics that you need.

    If not report back issues.....possible even a SIP Debug from the Elastix box, so that you can confirm that your machine (SIP CLient) is making it to the ELastix system and not being blocked by firewall software.

    Regards

    Bob
     
  3. Dedalus

    Joined:
    Aug 19, 2009
    Messages:
    16
    Likes Received:
    0
    hi bob, thank you for your hints, have done all this (deleted all extensions, just ext 201 configured, reinstalled xlite - all the same;
    also with my eeepc (ubuntu/ekiga) & Nokia N79 sip-client over WLAN no success. any hints how and what for to look in log-files would be highly appreciated.
    br., leon
     
  4. Bob

    Bob

    Joined:
    Nov 4, 2007
    Messages:
    2,400
    Likes Received:
    1
    Dedalus

    Close your Softphone (Xlite) down - e.g. exit application

    at the console (or via SSH)

    enter the Asterisk CLI by asterisk -r -vvvvvvvvvvv

    Then issue the following command

    sip set debug ip {your workstation ip address}

    Now start Xlite. What we are doing here is looking to see the following:

    1) are we getting ip communications from your softphone
    2) Why is it failing

    Via the CLI, you should see some action if we are getting IP communications from the Softphone. (type quit to exit the CLI)

    Once it has failed registration, then go back to your console (or via SSH) and look at the asterisk log e.g.

    less /var/log/asterisk/full

    and you should see several entries similar to the one below

    Code:
    ---
    [Aug 21 04:53:41] VERBOSE[2774] logger.c:
    <--- SIP read from 172.16.0.204:5060 --->
    SIP/2.0 200 OK
    Call-ID: 7a9e78b174f3b13d55bb152341c05254@172.16.0.15
    CSeq: 102 OPTIONS
    From: "Unknown" <sip:Unknown@172.16.0.15>;tag=as02c67332
    To: <sip:201@172.16.0.204:5060>;tag=c4fd14f1ce625c8
    Via: SIP/2.0/UDP 172.16.0.15:5060;branch=z9hG4bK29eddd0c;rport
    Content-Length: 0
    Allow:NOTIFY,REFER,OPTIONS,INVITE,ACK,CANCEL,BYE,INFO
    Contact: <sip:201@172.16.0.204:5060;transport=udp>
    Supported: replaces
    User-Agent: Aastra 9133i/1.4.3.23 Brcm Callctrl/1.5.1.0 MxSF/v3.2.8.45
    If you can't spot the issue yourself, then post relevant parts back on this forum. Relevant parts are blocks like above that Say Register, and rejected, failures etc...

    Regards

    Bob
     
  5. Dedalus

    Joined:
    Aug 19, 2009
    Messages:
    16
    Likes Received:
    0
    Re:can't connect with SIP-Clients to Elastix serve

    Bob, thank you for the detailed walk-through; I think the problem is in this line:

    NOTICE[3191] chan_sip.c: Registration from '"Dedalus"<sip:201@192.168.1.100>' failed for '192.168.1.2' - No matching peer found

    - have no idea what it is about. I have double checked the user and password - what am I doing wrong? Need to rest a bit and look tomorrow into it.

    Regards, Leon
     
  6. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Try either:
    In your softphone config replace Daedalus with 201, or add a sip alias to Daedalus in extension 201
     
  7. Dedalus

    Joined:
    Aug 19, 2009
    Messages:
    16
    Likes Received:
    0
    Re:can't connect with SIP-Clients to Elastix serve

    Thx. dicko for your suggestions,
    tried both client setting and Elastix-config way, still the same:

    NOTICE[3207] chan_sip.c: Registration from '"201"<sip:201@192.168.1.100>' failed for '192.168.1.2' - No matching peer found

    in Elastix i've the following settings:
    Display Name: Dedalus
    SIP Alias: 201
    secret: 201
    all other is default setting

    Xlite (Version 3.0 build 53621) has the settings:
    DisplayName: 201
    User name: 201
    Password: 201
    Authorization user name: 201
    Domain: 192.168.1.100
    ticked "Register with domain and receive incoming calls"
    Radiobutton at Send outbound via "domain" choosen

    did I set something wrong?
     
  8. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Re:can't connect with SIP-Clients to Elastix serve

    I don't believe you need

    Authorization user name:

    blank, This is for Auth ID (md5) verification and you're not using that.
     
  9. Dedalus

    Joined:
    Aug 19, 2009
    Messages:
    16
    Likes Received:
    0
    Re:can't connect with SIP-Clients to Elastix serve

    have tried with blank first, then according to Bob's input filled it with 201, anyway the samme: the log of the registration-attempt looks like this:
    <--- SIP read from 192.168.1.2:38212 --->
    REGISTER sip:192.168.1.100 SIP/2.0
    Via: SIP/2.0/UDP 192.168.1.2:38212;branch=z9hG4bK-d8754z-af2b1024ab7c9b63-1---d8754z-;rport
    Max-Forwards: 70
    Contact: <sip:201@192.168.1.2:38212;rinstance=d2e805a51d8d546e>
    To: "201"<sip:201@192.168.1.100>
    From: "201"<sip:201@192.168.1.100>;tag=7123ad60
    Call-ID: ZTQ0YTkxODVkNzNkZDEyOGE5NzA5NjAwZWE0ZGE0ZjA.
    CSeq: 1 REGISTER
    Expires: 3600
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
    User-Agent: X-Lite release 1103k stamp 53621
    Content-Length: 0
    <------------->
    [Aug 21 19:50:51] VERBOSE[3174] logger.c: --- (12 headers 0 lines) ---
    [Aug 21 19:50:51] VERBOSE[3174] logger.c: Using latest REGISTER request as basis request
    [Aug 21 19:50:51] VERBOSE[3174] logger.c: Sending to 192.168.1.2 : 38212 (NAT)
    [Aug 21 19:50:51] VERBOSE[3174] logger.c:
    <--- Transmitting (NAT) to 192.168.1.2:38212 --->
    SIP/2.0 404 Not found
    Via: SIP/2.0/UDP 192.168.1.2:38212;branch=z9hG4bK-d8754z-af2b1024ab7c9b63-1---d8754z-;received=192.168.1.2;rport=38212
    From: "201"<sip:201@192.168.1.100>;tag=7123ad60
    To: "201"<sip:201@192.168.1.100>;tag=as66be44f5
    Call-ID: ZTQ0YTkxODVkNzNkZDEyOGE5NzA5NjAwZWE0ZGE0ZjA.
    CSeq: 1 REGISTER
    User-Agent: Asterisk PBX
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
    Supported: replaces
    Content-Length: 0
    <------------>

    don't understand the line
    <--- Transmitting (NAT) to 192.168.1.2:38212 --->
    Both xp-client and elastix are on same network, no nat between them - can this cause some problems?
     
  10. Bob

    Bob

    Joined:
    Nov 4, 2007
    Messages:
    2,400
    Likes Received:
    1
    Re:can't connect with SIP-Clients to Elastix serve

    Just a quick one, you dont have any firewall software on the workstation at all?? e.g. even Windows firewall (can you turn it off), Norton Security etc....

    Otherwise, post a full log of the registration process. What I mean is set the SIP debug on, just before you start up your XLITE. As soon as it has registered, close the XLITE, turn the debug off, and then take a scraping of the SIP Registration lines in the log and post.

    If you believe that it will be to much, then provide at least the first 6-7 SIP Sessions (e.g. between the <---------->. Make sure you wrap it as code (boardcode).

    Also just to make sure, as mentioned previously do the SIP DEBUG with only the IP address of your workstation.

    Regards

    Bob
     
  11. Dedalus

    Joined:
    Aug 19, 2009
    Messages:
    16
    Likes Received:
    0
    Re:can't connect with SIP-Clients to Elastix serve

    Hi Bob, FW pn XP-box was already off... here follows the log - hope you can read something out of this:

    <--- SIP read from 192.168.1.2:13032 --->
    REGISTER sip:192.168.1.7 SIP/2.0
    Via: SIP/2.0/UDP 192.168.1.2:13032;branch=z9hG4bK-d8754z-21799e41e036255c-1---d8754z-;rport
    Max-Forwards: 70
    Contact: <sip:201@192.168.1.2:13032;rinstance=f54c78f22444327e>
    To: "201"<sip:201@192.168.1.7>
    From: "201"<sip:201@192.168.1.7>;tag=e1793470
    Call-ID: OTA5OTRjMzA2MjI5NWI3NDk3MTcxZDY0OTFjNzc1NWI.
    CSeq: 1 REGISTER
    Expires: 3600
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
    User-Agent: X-Lite release 1103k stamp 53621
    Content-Length: 0

    <------------->
    [Aug 23 15:50:24] VERBOSE[3222] logger.c: --- (12 headers 0 lines) ---
    [Aug 23 15:50:24] VERBOSE[3222] logger.c: Using latest REGISTER request as basis request
    [Aug 23 15:50:24] VERBOSE[3222] logger.c: Sending to 192.168.1.2 : 13032 (NAT)
    [Aug 23 15:50:24] VERBOSE[3222] logger.c:
    <--- Transmitting (NAT) to 192.168.1.2:13032 --->
    SIP/2.0 404 Not found
    Via: SIP/2.0/UDP 192.168.1.2:13032;branch=z9hG4bK-d8754z-21799e41e036255c-1---d8754z-;received=192.168.1.2;rport=13032
    From: "201"<sip:201@192.168.1.7>;tag=e1793470
    To: "201"<sip:201@192.168.1.7>;tag=as038ee3fa
    Call-ID: OTA5OTRjMzA2MjI5NWI3NDk3MTcxZDY0OTFjNzc1NWI.
    CSeq: 1 REGISTER
    User-Agent: Asterisk PBX
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
    Supported: replaces
    Content-Length: 0

    <------------>
    [Aug 23 15:50:24] NOTICE[3222] chan_sip.c: Registration from '"201"<sip:201@192.168.1.7>' failed for '192.168.1.2' - No matching peer found
    [Aug 23 15:50:24] VERBOSE[3222] logger.c: Scheduling destruction of SIP dialog 'OTA5OTRjMzA2MjI5NWI3NDk3MTcxZDY0OTFjNzc1NWI.' in 32000 ms (Method: REGISTER)
     
  12. Dedalus

    Joined:
    Aug 19, 2009
    Messages:
    16
    Likes Received:
    0
    Re:can't connect with SIP-Clients to Elastix serve

    seems to be a weird thing...

    I've setup a VBox on the 192.168.1.2 machine with the elastix 1.6 beta and bridged network if, looking as 192.168.1.10 to the lan.

    to this machine i can connect with xlite both from the vbox-host machine and from an xp-notebook.

    but still can't connect to my testserver (with real hw 192.168.1.100), even i repeated the 1.5.2.2 installation. the only difference is the elastix version and the physical hw. all extension settings done exactly the same (minimalistic as above) way...

    need tomorrow to do some real work, but in the evening I will continue - hints are very welcomed :)
     
  13. ramoncio

    Joined:
    May 12, 2010
    Messages:
    1,663
    Likes Received:
    0
    Re:can't connect with SIP-Clients to Elastix serve

    Hi Dedalus,
    It looks as something is broken in your real installation.
    The peer doesn't exist. Run "sip show peers" in your elastix console. You should see the created extension at the web interface there.

    Try updating your real machine to the beta with:

    Code:
    yum update -y --enablerepo=elastix-beta
    
     
  14. Dedalus

    Joined:
    Aug 19, 2009
    Messages:
    16
    Likes Received:
    0
    Re:can't connect with SIP-Clients to Elastix serve

    Hi ramoncio, you'Rre right, "sip show peers" doesn't bring any extensions; unfortunately an upgrade didn't make any change (deleted all, recreated ext 201, run "sip show peers" - still 0 sip peers...

    should I try to install tomorrow freshthe 1.6 beta?
     
  15. ramoncio

    Joined:
    May 12, 2010
    Messages:
    1,663
    Likes Received:
    0
    Re:can't connect with SIP-Clients to Elastix serve

    Try with this:
    Code:
    chown -R asterisk.asterisk /var/lib/asterisk/
    
    you might have a permission problem in /var/lib/asterisk/astdb

    Then go to the web interface, do any change and apply changes. This should rewrite the astdb
     
  16. ramoncio

    Joined:
    May 12, 2010
    Messages:
    1,663
    Likes Received:
    0
    Re:can't connect with SIP-Clients to Elastix serve

    You should be able to see your devices if you run the asterisk console command:
    Code:
    database show
    
     
  17. Dedalus

    Joined:
    Aug 19, 2009
    Messages:
    16
    Likes Received:
    0
    Re:can't connect with SIP-Clients to Elastix serve

    Hi Ramoncio,

    thanks, the physical restart helped... can connect now! :)
    not shure, had thought that I have done a reload, but anyway, it works now on the lowest level - starting now to connect sip-provider.

    btw.: I have compared the settings between the testserver and the VirtualBox-installation - but do not understand, why the VBox intall do not show my 3rd extension consistently. sip show peers tells there are two extensions, database show seees three of them (but with ext.203 I could not connect :O) Not that I would use the VBox install in future, but just curious if this happens more often and what countermeassures are there.

    thanks again!
     
  18. ramoncio

    Joined:
    May 12, 2010
    Messages:
    1,663
    Likes Received:
    0
    Re:can't connect with SIP-Clients to Elastix serve

    I'm glad you finally got it working!

    This doesn't normally happen. But usually you can see this errors in /var/log/asterisk/full if you read it carefully.
    When you change any config in the web interface, it is stored in a mysql database called asterisk.
    When you apply changes, all new settings are written to the config files and asterisk database using a perl script called /var/lib/asterisk/bin/retrieve_conf , you can run it manually from the console to see if it gives any errors. The most common errors are due to wrong permissions in config files, so they can't be overwritten.
     
  19. Dedalus

    Joined:
    Aug 19, 2009
    Messages:
    16
    Likes Received:
    0
    Re:can't connect with SIP-Clients to Elastix serve

    thanks ramoncio for your explanations and patience. just one question regarding the log. on the vm-installation i've deleted the logfile (in that second i was almost sure, that trancation would have been better...). hoped that asterisk would create a new file.

    what do i have to do to make asterisk log again? copied already the backuped old logfile there, that did'nt any change.
     
  20. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Re:can't connect with SIP-Clients to Elastix serve

    Don't hope, RTM, :)


    From bash:


    rasterisk -x 'help logger'
    (read, then)
    rasterisk -x 'logger rotate'
     

Share This Page