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
8f6e9ac3
Commit
8f6e9ac3
authored
12 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
#9910: fix sending call with new transport
parent
904f7882
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
daemon/src/sip/sipaccount.cpp
+1
-1
1 addition, 1 deletion
daemon/src/sip/sipaccount.cpp
daemon/src/sip/siptransport.cpp
+1
-1
1 addition, 1 deletion
daemon/src/sip/siptransport.cpp
daemon/src/sip/sipvoiplink.cpp
+11
-5
11 additions, 5 deletions
daemon/src/sip/sipvoiplink.cpp
with
13 additions
and
7 deletions
daemon/src/sip/sipaccount.cpp
+
1
−
1
View file @
8f6e9ac3
...
...
@@ -793,7 +793,7 @@ void SIPAccount::setContactHeader(std::string address, std::string port)
std
::
string
SIPAccount
::
getContactHeader
()
const
{
if
(
transport_
==
NULL
)
ERROR
(
"Transport not created yet"
);
ERROR
(
"
SipAccount:
Transport not created yet"
);
// The transport type must be specified, in our case START_OTHER refers to stun transport
pjsip_transport_type_e
transportType
=
transportType_
;
...
...
This diff is collapsed.
Click to expand it.
daemon/src/sip/siptransport.cpp
+
1
−
1
View file @
8f6e9ac3
...
...
@@ -457,7 +457,7 @@ SipTransport::createUdpTransport(const std::string &interface, unsigned int port
{
// init socket to bind this transport to
pj_uint16_t
listeningPort
=
(
pj_uint16_t
)
port
;
pjsip_transport
*
transport
;
pjsip_transport
*
transport
=
NULL
;
DEBUG
(
"SipTransport: Update UDP transport on %s:%d with public addr %s:%d"
,
interface
.
c_str
(),
port
,
publicAddr
.
c_str
(),
publicPort
);
...
...
This diff is collapsed.
Click to expand it.
daemon/src/sip/sipvoiplink.cpp
+
11
−
5
View file @
8f6e9ac3
...
...
@@ -524,6 +524,9 @@ void SIPVoIPLink::sendRegister(Account *a)
account
->
setReceivedParameter
(
""
);
// Explicitely set the bound address port to 0 so that pjsip determine a random port by itself
account
->
transport_
=
sipTransport
.
createUdpTransport
(
account
->
getLocalInterface
(),
0
,
received
,
account
->
getLocalPort
());
if
(
account
->
transport_
==
NULL
)
{
ERROR
(
"UserAgent: Could not create new udp transport with public address: %s:%d"
,
received
.
c_str
(),
account
->
getLocalPort
());
}
}
if
(
pjsip_regc_init
(
regc
,
&
pjSrv
,
&
pjFrom
,
&
pjFrom
,
1
,
&
pjContact
,
account
->
getRegistrationExpire
())
!=
PJ_SUCCESS
)
...
...
@@ -1617,7 +1620,6 @@ void registration_cb(pjsip_regc_cbparam *param)
if
(
param
->
status
!=
PJ_SUCCESS
)
{
account
->
setRegistrationState
(
ErrorAuth
);
account
->
setRegister
(
false
);
SIPVoIPLink
::
instance
()
->
sipTransport
.
shutdownSipTransport
(
*
account
);
return
;
}
...
...
@@ -1633,29 +1635,33 @@ void registration_cb(pjsip_regc_cbparam *param)
case
PJSIP_SC_SERVICE_UNAVAILABLE
:
case
PJSIP_SC_REQUEST_TIMEOUT
:
account
->
setRegistrationState
(
ErrorHost
);
account
->
setRegister
(
false
);
SIPVoIPLink
::
instance
()
->
sipTransport
.
shutdownSipTransport
(
*
account
);
break
;
case
PJSIP_SC_UNAUTHORIZED
:
case
PJSIP_SC_FORBIDDEN
:
case
PJSIP_SC_NOT_FOUND
:
account
->
setRegistrationState
(
ErrorAuth
);
account
->
setRegister
(
false
);
SIPVoIPLink
::
instance
()
->
sipTransport
.
shutdownSipTransport
(
*
account
);
break
;
case
PJSIP_SC_INTERVAL_TOO_BRIEF
:
// Expiration Interval Too Brief
account
->
doubleRegistrationExpire
();
account
->
registerVoIPLink
();
account
->
setRegister
(
false
);
SIPVoIPLink
::
instance
()
->
sipTransport
.
shutdownSipTransport
(
*
account
);
break
;
default:
account
->
setRegistrationState
(
Error
);
account
->
setRegister
(
false
);
SIPVoIPLink
::
instance
()
->
sipTransport
.
shutdownSipTransport
(
*
account
);
break
;
}
account
->
setRegister
(
false
);
SIPVoIPLink
::
instance
()
->
sipTransport
.
shutdownSipTransport
(
*
account
);
}
else
{
if
(
account
->
isRegistered
())
account
->
setRegistrationState
(
Registered
);
...
...
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