MayamaTakeshi / sip-lab

A node module that helps to write SIP functional tests
3 stars 2 forks source link

Add SIP over WebSocket support #51

Open MayamaTakeshi opened 8 months ago

MayamaTakeshi commented 8 months ago

Adapt from: https://github.com/asterisk/asterisk/blob/master/res/res_pjsip_transport_websocket.c

And this code might also help: https://github.com/ClearwaterCore/sprout/blob/master/src/websockets.cpp (however a quick look indicates it uses a different approach by registering a module which doesn't fit in our architecture).

MayamaTakeshi commented 1 month ago

It seems the author of pjwebsock already implemented websocket transport: https://github.com/jimying/pjwebsock/tree/main/websock Let's try to use it.

UPDATE: no, the code in pjwebsock doesn't reference pjsip_transport. It is as the author explained in jimying/pjwebsock/issues 1: it is necessary to create a pjsip_transport module.