MayamaTakeshi / sip-lab

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

Refactor packet dump to be done from packets received from pjsip #13

Open MayamaTakeshi opened 1 year ago

MayamaTakeshi commented 1 year ago

Currently we use libpcap to do this by updating a filter every time we create a SIP/RTP endpoint. However there are problems with this approacy:

Instead, let's dump the messages according to what is received from pjsip: all SIP messages and RTP traffic would be dumped as UDP no matter how they were received/sent. (obs: not sure if we can actually do this yet).

MayamaTakeshi commented 1 year ago

Based on some tests, packet dump is not even currently working.

We can adapt code from here: https://github.com/asterisk/asterisk/blob/master/res/res_hep_pjsip.c Ref: https://asteriskfaqs.org/2017/01/03/asterisk-users/does-hep-require-pjsip-or-does-it-also-works-with-sip.html

MayamaTakeshi commented 1 year ago

Using HEP we can send the messages to sngrep and see the call flows in real-time.