[asterisk-scf-commits] asterisk-scf/integration/sip.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Wed Aug 25 12:53:08 CDT 2010
branch "master" has been updated
via e5f8c50b24dc1e1e9b9b5bda5a3f9e17013c81dc (commit)
from 0ba14a1c8285806f12a77de00bb40c95d71294aa (commit)
Summary of changes:
src/SipEndpoint.cpp | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit e5f8c50b24dc1e1e9b9b5bda5a3f9e17013c81dc
Author: Joshua Colp <jcolp at digium.com>
Date: Wed Aug 25 15:05:07 2010 -0300
For testing purposes push a static payload mapping for ULAW into the RTP session.
diff --git a/src/SipEndpoint.cpp b/src/SipEndpoint.cpp
index 0878a4e..1b3b7d4 100644
--- a/src/SipEndpoint.cpp
+++ b/src/SipEndpoint.cpp
@@ -223,6 +223,14 @@ SipEndpoint::SipEndpoint(Ice::ObjectAdapterPtr adapter, boost::shared_ptr<SipEnd
// Get an RTP session capable of handling the formats we are going to offer
Hydra::Media::V1::FormatSeq formats;
+ // For testing just request a session capable of handling the ulaw media format
+ Hydra::Media::V1::AudioFormatPtr format = new Hydra::Media::V1::AudioFormat();
+ format->name = "ulaw";
+ format->sampleRate = 8000;
+ format->frameSize = 20;
+ format->maximumFrameSize = 20;
+ format->minimumFrameSize = 20;
+ formats.push_back(format);
requestRTPSessions(formats);
}
@@ -333,6 +341,18 @@ void SipEndpoint::requestRTPSessions(Hydra::Media::V1::FormatSeq& formats)
// Create a local copy of the sinks, this won't get changed by the RTP session so it's all good
mSinks = session->getSinks();
+
+ // For testing push a static payload mapping for ULAW into the RTP session
+ Hydra::Media::RTP::V1::PayloadMap payloads;
+ Hydra::Media::V1::AudioFormatPtr format = new Hydra::Media::V1::AudioFormat();
+ format->name = "ulaw";
+ format->sampleRate = 8000;
+ format->frameSize = 20;
+ format->maximumFrameSize = 20;
+ format->minimumFrameSize = 20;
+ payloads.insert(std::make_pair(0, format));
+
+ session->associatePayloads(payloads);
}
}; // end SipChannelService
-----------------------------------------------------------------------
--
asterisk-scf/integration/sip.git
More information about the asterisk-scf-commits
mailing list