Added "jitter-size" to config file to set jitter buffer size.
Fixed transmission of Q.931 Calling-Party-Number, and DisplayName on H.323 Setup. Was previously being set on the wrong connection. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12347 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
2a33da8484
commit
5f0c242265
|
@ -323,8 +323,6 @@ bool FSManager::Initialise(switch_loadable_module_interface_t *iface)
|
|||
m_FreeSwitch->io_routines = &opalfs_io_routines;
|
||||
m_FreeSwitch->state_handler = &opalfs_event_handlers;
|
||||
|
||||
SetAudioJitterDelay(800, 3000); // should be config option
|
||||
|
||||
silenceDetectParams.m_mode = OpalSilenceDetector::NoSilenceDetection;
|
||||
|
||||
if (m_listeners.empty()) {
|
||||
|
@ -411,6 +409,15 @@ switch_status_t FSManager::ReadConfig(int reload)
|
|||
set_global_dialplan(val);
|
||||
} else if (!strcasecmp(var, "codec-prefs")) {
|
||||
set_global_codec_string(val);
|
||||
} else if (!strcasecmp(var, "jitter-size")) {
|
||||
char * next;
|
||||
unsigned minJitter = strtoul(val, &next, 10);
|
||||
if (minJitter >= 10) {
|
||||
unsigned maxJitter = minJitter;
|
||||
if (*next == ',')
|
||||
maxJitter = atoi(next+1);
|
||||
SetAudioJitterDelay(minJitter, maxJitter); // In milliseconds
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -455,6 +462,12 @@ switch_status_t FSManager::ReadConfig(int reload)
|
|||
}
|
||||
|
||||
|
||||
OpalCall * FSManager::CreateCall(void * /*userData*/)
|
||||
{
|
||||
return new FSCall(*this);
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
FSEndPoint::FSEndPoint(FSManager & manager)
|
||||
|
@ -476,6 +489,32 @@ OpalLocalConnection *FSEndPoint::CreateConnection(OpalCall & call, void *userDat
|
|||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
FSCall::FSCall(OpalManager & manager)
|
||||
: OpalCall(manager)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
PBoolean FSCall::OnSetUp(OpalConnection & connection)
|
||||
{
|
||||
// Transfer FS caller_id_number & caller_id_name from the FSConnection
|
||||
// to the protocol connectionm (e.g. H.323) so gets sent correctly
|
||||
// in outgoing packets
|
||||
PSafePtr<FSConnection> local = GetConnectionAs<FSConnection>();
|
||||
if (local != NULL) {
|
||||
PSafePtr<OpalConnection> proto = local->GetOtherPartyConnection();
|
||||
if (proto != NULL) {
|
||||
proto->SetLocalPartyName(local->GetLocalPartyName());
|
||||
proto->SetDisplayName(local->GetDisplayName());
|
||||
}
|
||||
}
|
||||
|
||||
return OpalCall::OnSetUp(connection);
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
|
|
@ -82,6 +82,14 @@ struct FSListener {
|
|||
};
|
||||
|
||||
|
||||
class FSCall : public OpalCall {
|
||||
PCLASSINFO(FSCall, OpalCall);
|
||||
public:
|
||||
FSCall(OpalManager & manager);
|
||||
virtual PBoolean OnSetUp(OpalConnection & connection);
|
||||
};
|
||||
|
||||
|
||||
class FSManager : public OpalManager {
|
||||
PCLASSINFO(FSManager, OpalManager);
|
||||
|
||||
|
@ -96,6 +104,8 @@ class FSManager : public OpalManager {
|
|||
return m_FreeSwitch;
|
||||
}
|
||||
|
||||
virtual OpalCall * CreateCall(void * userData);
|
||||
|
||||
private:
|
||||
switch_endpoint_interface_t *m_FreeSwitch;
|
||||
|
||||
|
@ -106,6 +116,7 @@ class FSManager : public OpalManager {
|
|||
list < FSListener > m_listeners;
|
||||
};
|
||||
|
||||
|
||||
class FSConnection;
|
||||
typedef struct {
|
||||
switch_timer_t read_timer;
|
||||
|
|
Loading…
Reference in New Issue