Need a method to prove incoming connection.

Discussion in 'Linux Networking' started by Bit Twister, Jan 17, 2013.

  1. Bit Twister

    Bit Twister Guest

    I am trying to get ekiga to register with ekiga.net and with
    diamondcard.us for VoIP

    Fault isolation is ineffective because I can not prove each player
    in this who done it.

    Isolation points are:
    ekiga 4.0.0
    Mageia Linux release 3
    pc firewall, shorewall
    ActionTech router firewall.
    port forwarding rules
    Verizon FiOS
    stun ports udp 3478-3479
    sip ports udp 5000-5100
    H.323 port tcp 1720
    dns resolver, named
    ekiga stun server
    ekiga register server
    diamondcard register server

    Currently I have a network_ck script, which pings each failure point
    in the network ending at a ping of yahoo.com.
    When any point fails, it prints out what failed and what to verify
    and who is responsible for fixing it.

    I want to do the same thing in a voip_ck script.

    I hoping there is something that I can launch on the pc to listen on
    a port number for a udp or tcp packet and get a response.
    Script would look something like

    _wan_ip=$(get_wan_ip.pl)

    #** start listener
    some_cmd tcp 1720 > listen.txt

    #*** send a packet
    some_other_cmd tcp #_wan_ip 1720
    if [ $? -ne 0 ] ; then
    echo some_other_cmd tcp 1720 failed
    fi

    _count=$(grep -c "some string" listen.txt)
    if [ $_count -eq 0 ] ; then
    echo some_cmd tcp 1720 failed to receive packet.
    fi

    I am hoping for some handy commands rather than writing a program in C or
    maybe perl if there are modules for port/socket access.

    Any and all suggestions welcome.
     
    Bit Twister, Jan 17, 2013
    #1
    1. Advertisements

  2. Bit Twister

    Bit Twister Guest

    Yes, looks like just what I needed.

    Frap. I am impressed. :(
    using first example at
    http://www.thegeekstuff.com/2012/04/nc-command-examples/


    server xterm
    [root@wb ~]# nc -l 5060

    client xterm
    [root@wb ~]# nc -u localhost 5060

    Status xterm
    $ netstat | grep 5060
    $

    Alright, in the client xterm
    helo
    [root@wb ~]#

    and nothing in the server xterm.

    I know 5060 works because ekiga fixed their server(s) and I can
    run the callback test, and hear my voice echoed back from their
    test connection.
     
    Bit Twister, Jan 17, 2013
    #2
    1. Advertisements

  3. Bit Twister

    Bit Twister Guest


    found the problem, I have to supply -p 560 on both nc lines.
    and need -u on both to use UDP packets.

    Than you for your time.
     
    Bit Twister, Jan 17, 2013
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.