Voip Calls Info with Tshark - tshark

is there a command to get the information provided by the wireshark "Telephony > VoIP Calls" GUI option using tshark?

Related

How to process requests on stdin socket?

I am using a web server called lighttpd and they have a command line option -1 to accept a request on the stdin socket. I am fairly new to sockets and such, and their documentation does not say much about the syntax or examples of this options. Would I be able to send a simple http request through this option? And how would I do this?

Dialing a SIP number with TWINKLE client, from Ubuntu Linux Terminal. Is it possible?

I am having a number of portable touchscreen computers with Ubuntu Linux 10.04LTS Lucid Lynx, the processor architecture is "i386". I used TWINKLE VOIP client and through SIP i am able to call to those units from IP Phone and similarly i am also able to call the IP phone from the Touchscreen computers as well.
The problem is-- I need a keyboard every-time i need to dial a number. There is no onscreen keyboard feature.
Is it possible to dial a sip number directly from the Linux terminal?
If it is possible then i will incorporate the script within a small GUI application, so that the user will call numbers with my GUI application's touch interface.
If you check out the man page for twinkle ( man twinkle ), online version http://manpages.ubuntu.com/manpages/karmic/man1/twinkle.1.html you will see that there is both an option to specify the called party from the command line, and also a CLI interface
When you run twinkle, you can add -call to dial a number.
By contrast -c starts a CLI interface (presumably with options for dialling numbers, answering etc, but I don't have it on this machine).
Another useful switch is -cmd which lets you add a series of CLI commands to run. These can be used for instance to answer an incoming call.

Looking for "hung socket simulator" for testing socket timeouts

I am testing handling for socket timeout conditions - for example, connection timeout, connect but no accept, accept but won't read, etc.
I'm looking for a program/script that will act as a server socket producing these effects.
This "hung socket simulator" needs to run on Mac OS (or Linux).
I found one called Bane: https://github.com/danielwellman/bane.
I think the powerful tool socat might be helpful here, it can redirect the request to the real endpoint and thus, you can have full control to the socat process itself to simulate what you want (like suspending the process at certain phase by kill -stop or so)
one of my use cases is that I just want my client app to finish the handshake with the remote service but read no more data:
socat -d -d -d TCP-LISTEN:22181,fork SYSTEM:'socat - "TCP:the-remote-host:2181" \| dd bs=1 count=50' &
the above example only send the first 50 bytes of the response back.
Why don't you just start your client program on your dev machine and when you want the TimeOut to appear, just unplug your network cable.

Is there a program that can send data via sockets to a server, to test it?

I have a simple socket server, that waits for a message and responds. How can I test this? Is there a client app or something that can help me send some data on a specific port to a server, and see the output? Telnet?
Simple telnet client works well for such tests. You can also try PuTTY in either Telnet or Raw connection modes. Both allow you to choose the port you want to connect to.
Also a tool like Microsoft Network Monitor is pretty useful to analyse the protocol's data flow if you don't have direct control (by logs) on what's being sent over the wire.
netcat should be able to handle anything you need to do with socket testing.
http://pctechtips.org/netcat-the-swiss-army-knife-useful-commands/#more-103
Windump - tcpdump works well, and has binaries available to Windows
You have several choices:
1) You can use Chrome or FireFox plugins such as:
Simple WebSocket Client
Smart WebSocket Client
2) You can use WebSocket or ReconnectingWebSocket in JavaScript. this is a simple test with WebSocket:
Open Chrome browser
Press F12 or Right Click on page then click Inspect Element to open developer console
You shoud see a window with several tabs. Go to console tab then write this code.
ws = new WebSocket('ws://<YOUR-DOMAIN>:<PORT>')
ws.send('STH YOU WANT TO SEND')
3) You can use websocket-client. It is a simple python library. You must install python and pip, then websocket-client via pip. This is a simple example:
Go to python shell and type.
from websocket import WebSocket
ws = WebSocket()
ws.connect('ws://<YOUR-DOMAIN>:<PORT>')
ws.send('STH YOU WANT TO SEND')
hit the command line, and just use telnet.
if you have a simple echo server, go to town.

Access running mono application via command line

What is the best way to access a running mono application via the command line (Linux/Unix)?
Example: a mono server application is running and I want to send commands to it using the command line in the lightest/fastest way possible, causing the server to send back a response (e.g. to stdout).
I would say make a small, simple controller program that takes in your required command line arguments and uses remoting to send the messages to the running daemon.
This would be similar to the tray icon controller program talking to the background service that is prevalent in most Windows service patterns.
Mono's gsharp tool is a graphical REPL that lets you Attach to Process.
#Rich B: This is definately a suitable solution, which I already had implemented - however on the server I have to use, the remoting approach takes around 350ms for a single request.
I've measured the time on the server side of the request handling - the request is handled in less than 10ms, so it has to be the starting of the client program and the tcp connection, that takes up the time.
Hence the hope that I can find another way to post the requests to the server application.
You can use the system.net.sockets abstractions to create a service on a TCP port, and then telnet to that port.
Check the library status page; Mono's coverage here is a bit patchy.