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.