Skip to content
Snippets Groups Projects
Commit 300783be authored by yanmorin's avatar yanmorin
Browse files

Call "establish" message
Add url to tonezone web site
parent 6da911cb
No related branches found
No related tags found
No related merge requests found
...@@ -118,7 +118,11 @@ AudioRtpRTX::AudioRtpRTX (SipCall *sipcall, ...@@ -118,7 +118,11 @@ AudioRtpRTX::AudioRtpRTX (SipCall *sipcall,
} }
AudioRtpRTX::~AudioRtpRTX () { AudioRtpRTX::~AudioRtpRTX () {
try {
terminate(); terminate();
} catch (...) {
_debug("AudioRtpRTX: try to terminate, but catch an exception...\n");
}
_debug("Thread: AudioRtpRTX stop session\n"); _debug("Thread: AudioRtpRTX stop session\n");
if (!_sym) { if (!_sym) {
delete _sessionRecv; _sessionRecv = NULL; delete _sessionRecv; _sessionRecv = NULL;
......
...@@ -45,7 +45,11 @@ ToneThread::ToneThread (int16 *buf, int size) : ost::Thread () { ...@@ -45,7 +45,11 @@ ToneThread::ToneThread (int16 *buf, int size) : ost::Thread () {
} }
ToneThread::~ToneThread (void) { ToneThread::~ToneThread (void) {
try {
terminate(); terminate();
} catch (...) {
_debug("ToneThread: try to terminate, but catch an exception...\n");
}
delete[] buf_ctrl_vol; buf_ctrl_vol=NULL; delete[] buf_ctrl_vol; buf_ctrl_vol=NULL;
} }
...@@ -109,12 +113,13 @@ ToneGenerator::~ToneGenerator (void) { ...@@ -109,12 +113,13 @@ ToneGenerator::~ToneGenerator (void) {
/** /**
* Initialisation of ring tone for supported zone * Initialisation of ring tone for supported zone
* http://nemesis.lonestar.org/reference/telecom/signaling/busy.html
*/ */
void void
ToneGenerator::initTone (void) { ToneGenerator::initTone (void) {
toneZone[ID_NORTH_AMERICA][ZT_TONE_DIALTONE] = "350+440"; toneZone[ID_NORTH_AMERICA][ZT_TONE_DIALTONE] = "350+440";
toneZone[ID_NORTH_AMERICA][ZT_TONE_BUSY] = "480+620/500,0/500"; toneZone[ID_NORTH_AMERICA][ZT_TONE_BUSY] = "480+620/500,0/500";
toneZone[ID_NORTH_AMERICA][ZT_TONE_RINGTONE] = "440+480/2000,0/2000"; toneZone[ID_NORTH_AMERICA][ZT_TONE_RINGTONE] = "440+480/2000,0/4000";
toneZone[ID_NORTH_AMERICA][ZT_TONE_CONGESTION] = "480+620/250,0/250"; toneZone[ID_NORTH_AMERICA][ZT_TONE_CONGESTION] = "480+620/250,0/250";
toneZone[ID_FRANCE][ZT_TONE_DIALTONE] = "440"; toneZone[ID_FRANCE][ZT_TONE_DIALTONE] = "440";
...@@ -326,9 +331,10 @@ void ...@@ -326,9 +331,10 @@ void
ToneGenerator::stopTone() { ToneGenerator::stopTone() {
_currentTone = ZT_TONE_NULL; _currentTone = ZT_TONE_NULL;
// we end the last thread _debug("Thread: delete tonethread\n");
_debug("Thread: stop tonethread\n");
delete tonethread; tonethread = NULL; delete tonethread; tonethread = NULL;
// we end the last thread
_debug("Thread: tonethread deleted\n");
} }
/** /**
......
...@@ -317,7 +317,7 @@ GUIServerImpl::peerAnsweredCall (CALLID id) ...@@ -317,7 +317,7 @@ GUIServerImpl::peerAnsweredCall (CALLID id)
{ {
CallMap::iterator iter = _callMap.find(id); CallMap::iterator iter = _callMap.find(id);
if ( iter != _callMap.end() ) { if ( iter != _callMap.end() ) {
_requestManager.sendResponse(ResponseMessage("200", iter->second.sequenceId(), "OK")); _requestManager.sendResponse(ResponseMessage("200", iter->second.sequenceId(), "Established"));
} }
} }
......
...@@ -809,12 +809,13 @@ ManagerImpl::playATone(unsigned int tone) { ...@@ -809,12 +809,13 @@ ManagerImpl::playATone(unsigned int tone) {
void void
ManagerImpl::stopTone() { ManagerImpl::stopTone() {
if (isDriverLoaded()) { if (isDriverLoaded()) {
ost::MutexLock m(_toneMutex); _toneMutex.enterMutex();
if ( _toneType != ZT_TONE_NULL ) { if ( _toneType != ZT_TONE_NULL ) {
_toneType = ZT_TONE_NULL; _toneType = ZT_TONE_NULL;
_tone->stopTone(); _tone->stopTone();
getAudioDriver()->stopStream();
} }
_toneMutex.leaveMutex();
getAudioDriver()->stopStream();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment