Skip to content

Instantly share code, notes, and snippets.

@phildunks
phildunks / both_logs.txt
Created July 2, 2019 13:54
Race condition logs.
drachtio:srf examining INVITE, dialog id: +4m
Received an Invite from 172.17.0.1:36128
Handling Media Leg Invite
drachtio:srf createB2BUA: creating UAC, opts: {"localSdp":"v=0\r\no=FreeSWITCH 1562059779 1562059780 IN IP4 192.168.47.26\r\ns=FreeSWITCH\r\nc=IN IP4 192.168.47.26\r\nt=0 0\r\nm=audio 15486 RTP/AVP 0 98 99 9 8 3 101 13\r\na=rtpmap:98 G7221/32000\r\na=fmtp:98 bitrate=48000\r\na=rtpmap:99 G7221/16000\r\na=fmtp:99 bitrate=32000\r\na=rtpmap:101 telephone-event/8000\r\na=fmtp:101 0-16\r\na=ptime:20\r\n","uri":"sip:1234@192.168.47.134:5060","method":"INVITE","headers":{},"responseHeaders":{},"callingNumber":"mm2dev-slee","calledNumber":"msml"} +1ms
drachtio:srf Srf#addDialog: adding dialog with id d04e7e68-1772-1238-33bc-0242ac110002;from-tag=6m4rQ41acge1g type INVITE, dialog count is now 1 +51ms
drachtio:srf createB2BUA: successfully created UAC.. +0ms
drachtio:srf copyUACHeadersToUAS: {} +0ms
drachtio:srf createB2BUA: generateSdpA +0ms
drachtio:srf Srf#addDialog: adding dialog with id st5
@phildunks
phildunks / error_with_createB2BUA.txt
Created June 28, 2019 14:29
Race condition with createB2BUA
2019-06-28 14:24:50.154266 makeTags - hdr 'contact' replacing host with 192.168.47.161
2019-06-28 14:24:50.154308 makeTags - Adding well-known header 'contact' with value '<sip:mm2dev-slee@192.168.47.161:5060>'
2019-06-28 14:24:50.154357 SipDialogController::doSendRequestOutsideDialog - from: <sip:mm2dev-slee@192.168.47.161:5060>
2019-06-28 14:24:50.154396 SipDialogController::doSendRequestOutsideDialog - to: sip:1234@192.168.47.134:5060
2019-06-28 14:24:50.154434 SipDialogController::doSendRequestOutsideDialog - contact: <sip:192.168.47.161:5060>
2019-06-28 14:24:50.154473 SipDialogController::doSendRequestOutsideDialog - automatically detecting content-type as application/sdp
2019-06-28 14:24:50.154523 isLocalSipUri: checking to see if this is one of mine: sip:1234@192.168.47.134:5060
2019-06-28 14:24:50.154919 nta.c:4566 nta_leg_tcreate() nta_leg_tcreate(0x561a4287c6a0)
2019-06-28 14:24:50.155006 nta.c:2813 nta_tpn_by_url() nta: selecting scheme sip
2019-06-28 14:24:50.155070 tport.c:3285 tport_tsend() tpo
@phildunks
phildunks / app_logs_and_code.txt
Created June 27, 2019 14:13
App logs and javascript
srf.invite((req, res) => {
console.log(`Received an Invite`);
if( req.body.indexOf('Conferencing Control Leg') > -1) {
handleControlLegInvite( req, res );
}
else{
handleMediaLegInvite( req, res );
@phildunks
phildunks / app_server_two_calls.txt
Created June 27, 2019 13:07
Two sequential calls from app server. First one works fine, second fails.
2019-06-27 12:57:03.937447 timer F queue size: 0
2019-06-27 12:57:03.937494 timer G queue size: 0
2019-06-27 12:57:03.937540 timer K queue size: 0
2019-06-27 12:57:03.937587 m_mapUri2InvalidData size: 0
2019-06-27 12:57:20.958869 tport.c:2777 tport_wakeup_pri() tport_wakeup_pri(0x55d8ce0e55a0): events IN
2019-06-27 12:57:20.958961 tport.c:2892 tport_recv_event() tport_recv_event(0x55d8ce0e55a0)
2019-06-27 12:57:20.959018 tport.c:3233 tport_recv_iovec() tport_recv_iovec(0x55d8ce0e55a0) msg 0x55d8ce0f3b40 from (udp/172.17.0.2:5060) has 548 bytes, veclen = 1
2019-06-27 12:57:20.959224 recv 548 bytes from udp/[172.17.0.1]:52850 at 12:57:20.959069:
INVITE sip:msml@192.168.47.161:5060 SIP/2.0
Max-Forwards: 70
@phildunks
phildunks / failed_info_log.txt
Created June 27, 2019 11:11
Inconsistency with INFO event handler.
###############################################################################################
This is call from sipp custom script, emulating a MSML conference entry procedure from our application server..
Followed by an actual conference entry procedure from our real application server.
The first call completes successfully.
The second call does not.
@phildunks
phildunks / b2bua.txt
Created June 24, 2019 11:47
drachtio-srf issue 44
2019-06-24 11:41:24.619939 tport.c:2777 tport_wakeup_pri() tport_wakeup_pri(0x55bf4dedfc60): events IN
2019-06-24 11:41:24.620112 tport.c:2892 tport_recv_event() tport_recv_event(0x55bf4dedfc60)
2019-06-24 11:41:24.620168 tport.c:3233 tport_recv_iovec() tport_recv_iovec(0x55bf4dedfc60) msg 0x55bf4def5950 from (udp/172.17.0.2:5060) has 479 bytes, veclen = 1
2019-06-24 11:41:24.620412 recv 479 bytes from udp/[172.17.0.1]:32778 at 11:41:24.620218:
INVITE sip:12345678@127.0.0.1:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.47.161:5061;branch=z9hG4bK-38779-1-0
From: sipp <sip:sipp@192.168.47.161:5061>;tag=1
To: sut <sip:12345678@127.0.0.1:5060>