[asterisk-scf-commits] asterisk-scf/integration/sip.git branch "t38udptl" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Mon Sep 26 09:39:55 CDT 2011
branch "t38udptl" has been updated
via 72bdaebe9ea208563ef48bcbbd98dd0e1b7a6d5f (commit)
from 70cfc83819cabea178bc31164e2667d5490c1e85 (commit)
Summary of changes:
src/SipSession.cpp | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit 72bdaebe9ea208563ef48bcbbd98dd0e1b7a6d5f
Author: Joshua Colp <jcolp at digium.com>
Date: Mon Sep 26 11:46:56 2011 -0300
Bring up to date with latest slice.
diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index cc09d39..a9c45b0 100755
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -37,6 +37,7 @@
#include <AsteriskSCF/Media/RTP/MediaRTCPIf.h>
#include <AsteriskSCF/Media/UDPTL/MediaUDPTLIf.h>
#include <AsteriskSCF/Media/Formats/T38UdptlFormat.h>
+#include <AsteriskSCF/Media/NetworkIf.h>
#include <AsteriskSCF/SessionCookies/SipSessionManager/SipSessionCookiesIf.h>
#include "NATOptions.h"
@@ -49,6 +50,7 @@ using namespace AsteriskSCF::Media;
using namespace AsteriskSCF::Media::SDP::V1;
using namespace AsteriskSCF::Media::UDPTL::V1;
using namespace AsteriskSCF::Media::Formats::T38Udptl::V1;
+using namespace AsteriskSCF::Network::V1;
using namespace std;
namespace
@@ -2222,7 +2224,9 @@ pjmedia_sdp_session *SipSession::createSDPOffer(const AsteriskSCF::Media::V1::St
pj_strdup2(mImplPriv->mDialog->pool, &media->conn->addr_type, "IP4");
}
- pj_strdup2(mImplPriv->mDialog->pool, &media->conn->addr, source->getLocalAddress().c_str());
+ AddressInformation info = source->getLocalDetails();
+
+ pj_strdup2(mImplPriv->mDialog->pool, &media->conn->addr, info.ipAddress.c_str());
// If session level connection information has not yet been set then set it to us
if (!mImplPriv->mSDP->conn)
@@ -2230,7 +2234,7 @@ pjmedia_sdp_session *SipSession::createSDPOffer(const AsteriskSCF::Media::V1::St
mImplPriv->mSDP->conn = media->conn;
}
- media->desc.port = (pj_uint16_t) source->getLocalPort();
+ media->desc.port = (pj_uint16_t) info.port;
media->desc.port_count = 1;
// Use the configured format to set the error correction
@@ -2735,14 +2739,17 @@ pjmedia_sdp_session *SipSession::createSDPAnswer(const pjmedia_sdp_session* offe
media->conn = allocate_from_pool<pjmedia_sdp_conn>(mImplPriv->mDialog->pool);
media->conn->net_type = offer->origin.net_type;
media->conn->addr_type = offer->origin.addr_type;
- pj_strdup2(mImplPriv->mDialog->pool, &media->conn->addr, source->getLocalAddress().c_str());
+
+ AddressInformation info = source->getLocalDetails();
+
+ pj_strdup2(mImplPriv->mDialog->pool, &media->conn->addr, info.ipAddress.c_str());
if (!mImplPriv->mSDP->conn)
{
mImplPriv->mSDP->conn = media->conn;
}
- media->desc.port = (pj_uint16_t) source->getLocalPort();
+ media->desc.port = (pj_uint16_t) info.port;
media->desc.port_count = 1;
SDPDescriptorPtr ourDescriptor = mImplPriv->mEndpoint->getInterpretedDescriptor(t38);
@@ -2761,7 +2768,7 @@ pjmedia_sdp_session *SipSession::createSDPAnswer(const pjmedia_sdp_session* offe
{
sink->setRemoteDetails(connection, offer->media[stream]->desc.port);
}
- catch (const AsteriskSCF::Media::UDPTL::V1::InvalidAddress&)
+ catch (const AsteriskSCF::Network::V1::InvalidAddress&)
{
pjsip_tx_data *packet;
if (pjsip_inv_end_session(mImplPriv->mInviteSession, 488, NULL, &packet) == PJ_SUCCESS)
-----------------------------------------------------------------------
--
asterisk-scf/integration/sip.git
More information about the asterisk-scf-commits
mailing list