I have review the example ReceiveCall, and saw the parametter -e use bogus custom external transport, unreliable (transport=flibble)
, it look like that, we can use the ExternalTranport to get the UDP packets and send it to the destination. So we could modify the audio (RTP packets) before sent it out. Is it right?
I'm now find the way to bridged the calls (UA1 communicates with UA2 through the Server ( UA1 <--> Server <--> UA2)), so could I use that for the solution? If not, could you give me some ideas for this problems?
Thank you very much.
bool flibbleProc(SIPX_TRANSPORT hTransport,
const char* szDestinationIp,
const int iDestPort,
const char* szLocalIp,
const int iLocalPort,
const void* pData,
const size_t nData,
const void* pUserData)
{
bool bRet = false;
printf("zo\n");
OsNatDatagramSocket sendSocket(42424, szDestinationIp, 42425);
int bytesSent = sendSocket.write((const char*) pData, nData, szDestinationIp, 42424);
return bytesSent > 0;
return 1;
}
int FlibbleTask::run(void* pArg)
{
char buffer[2048];
UtlString ipAddress;
int nPort = -1;
int bytesRead = 0;
int remotePort;
UtlString remoteIp;
if (!mpServerSocket)
{
initSocket(mBoundIp.data());
}
while (mState != SHUTTING_DOWN &&
mState != SHUT_DOWN )
{
bytesRead = mpServerSocket->read(buffer, 2048, &remoteIp, &remotePort);
sipxConfigExternalTransportHandleMessage(ghTransport,
remoteIp.data(),
-1,
mBoundIp.data(),
-1,
buffer,
bytesRead);
}
return 0;
}
_______________________________________________ sipxtapi-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
