SIP Stack implementation in OCaml

Hi,
Only been learning OCaml for 2 months and have a project where I need to make SIP calls out and ensure they are answered to test some telecommunications systems. Is anyone aware of a SIP library for OCaml? Could probably use Cohttp it generate SIP message, but a whole client may be a bit advanced al this stage.

Many Thanks,

Ian.

2 Likes

Do you need to establish RTP (audio) communication or just test for accepted vs rejected call attempts? If you just need SIP to essentially ping, you might get away with a very simple request generator and response parser and direct UDP I/O (one packet out, wait for one response packet back, determine success/failure).

If you need full SIP support you might want to look into FFI to https://github.com/pjsip/pjproject which is a battle-tested C library.

2 Likes

I will need to make a call, so will need interact with another SIP call processor (Cisco Call Manager in my case). Ideally I will want to test the audio path with a tone of some kind, but going to just make and terminate a call initially. Thanks for the response, I will investigate how difficult it will be to call the c code from OCaml.