Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
a0cfd94c
Commit
a0cfd94c
authored
11 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
net: use the same address family as the published IP for SIP tranport
parent
e19f2d01
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
daemon/src/sip/sipvoiplink.cpp
+11
-3
11 additions, 3 deletions
daemon/src/sip/sipvoiplink.cpp
with
11 additions
and
3 deletions
daemon/src/sip/sipvoiplink.cpp
+
11
−
3
View file @
a0cfd94c
...
...
@@ -313,8 +313,11 @@ pj_bool_t transaction_request_cb(pjsip_rx_data *rdata)
SIPCall
*
call
=
new
SIPCall
(
Manager
::
instance
().
getNewCallID
(),
Call
::
INCOMING
,
cp_
,
account_id
);
// FIXME : for now, use the same address family as the SIP tranport
auto
family
=
pjsip_transport_type_get_af
(
account
->
getTransportType
());
auto
addrToUse
=
SipTransport
::
getInterfaceAddr
(
account
->
getLocalInterface
(),
family
);
// May use the published address as well
auto
addrToUse
=
SipTransport
::
getInterfaceAddr
(
account
->
getLocalInterface
());
auto
addrSdp
=
account
->
isStunEnabled
()
or
(
not
account
->
getPublishedSameasLocal
())
?
account
->
getPublishedIpAddress
()
:
addrToUse
;
...
...
@@ -993,7 +996,10 @@ Call *SIPVoIPLink::newRegisteredAccountCall(const std::string& id, const std::st
toUri
=
account
->
getToUri
(
toUrl
);
call
->
setPeerNumber
(
toUri
);
auto
localAddr
=
SipTransport
::
getInterfaceAddr
(
account
->
getLocalInterface
());
// FIXME : for now, use the same address family as the SIP tranport
auto
family
=
pjsip_transport_type_get_af
(
account
->
getTransportType
());
auto
localAddr
=
SipTransport
::
getInterfaceAddr
(
account
->
getLocalInterface
(),
family
);
setCallMediaLocal
(
call
,
localAddr
);
// May use the published address as well
...
...
@@ -1856,8 +1862,10 @@ void sdp_create_offer_cb(pjsip_inv_session *inv, pjmedia_sdp_session **p_offer)
if
(
!
account
)
return
;
// FIXME : for now, use the same address family as the SIP tranport
auto
family
=
pjsip_transport_type_get_af
(
account
->
getTransportType
());
auto
address
=
account
->
getPublishedSameasLocal
()
?
SipTransport
::
getInterfaceAddr
(
account
->
getLocalInterface
())
?
SipTransport
::
getInterfaceAddr
(
account
->
getLocalInterface
()
,
family
)
:
account
->
getPublishedIpAddress
();
setCallMediaLocal
(
call
,
address
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment