From: Andreas Eversberg Date: Fri, 16 Mar 2012 03:58:23 +0000 (+0100) Subject: SIP: Adding echo test to do delay test on incomming SIP calls X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=commitdiff_plain;h=863e741714652a1b6610e8d84b42f49ca4b680ca SIP: Adding echo test to do delay test on incomming SIP calls --- diff --git a/sip.cpp b/sip.cpp index 4d5be39..a385988 100644 --- a/sip.cpp +++ b/sip.cpp @@ -256,6 +256,11 @@ we only support alaw and ulaw! n = payload_len; from = payload; to = payload; + if (psip->p_echotest) { + /* echo rtp data we just received */ + psip->rtp_send_frame(from, n, (options.law=='a')?PAYLOAD_TYPE_ALAW:PAYLOAD_TYPE_ULAW); + return 0; + } while(n--) *to++ = flip[*from++]; psip->bridge_tx(payload, payload_len);