Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
abe89372
Commit
abe89372
authored
9 years ago
by
Joshua Colp
Committed by
Gerrit Code Review
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "res_pjsip_refer.c: Delay sending the initial SIP Notify with frag 100"
parents
dcb25bb0
0d2ccbca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
res/res_pjsip_refer.c
+14
-7
14 additions, 7 deletions
res/res_pjsip_refer.c
with
14 additions
and
7 deletions
res/res_pjsip_refer.c
+
14
−
7
View file @
abe89372
...
...
@@ -59,6 +59,8 @@ struct refer_progress {
struct
transfer_channel_data
*
transfer_data
;
/*! \brief Uniqueid of transferee channel */
char
*
transferee
;
/*! \brief Non-zero if the 100 notify has been sent */
int
sent_100
;
};
/*! \brief REFER Progress notification structure */
...
...
@@ -133,6 +135,18 @@ static int refer_progress_notify(void *data)
notification
->
progress
->
sub
=
NULL
;
}
/* Send a deferred initial 100 Trying SIP frag NOTIFY if we haven't already. */
if
(
!
notification
->
progress
->
sent_100
)
{
notification
->
progress
->
sent_100
=
1
;
if
(
notification
->
response
!=
100
)
{
ast_debug
(
3
,
"Sending initial 100 Trying NOTIFY for progress monitor '%p'
\n
"
,
notification
->
progress
);
if
(
pjsip_xfer_notify
(
sub
,
PJSIP_EVSUB_STATE_ACTIVE
,
100
,
NULL
,
&
tdata
)
==
PJ_SUCCESS
)
{
pjsip_xfer_send_request
(
sub
,
tdata
);
}
}
}
ast_debug
(
3
,
"Sending NOTIFY with response '%d' and state '%u' on subscription '%p' and progress monitor '%p'
\n
"
,
notification
->
response
,
notification
->
state
,
sub
,
notification
->
progress
);
...
...
@@ -340,7 +354,6 @@ static int refer_progress_alloc(struct ast_sip_session *session, pjsip_rx_data *
const
pj_str_t
str_refer_sub
=
{
"Refer-Sub"
,
9
};
pjsip_generic_string_hdr
*
refer_sub
=
NULL
;
const
pj_str_t
str_true
=
{
"true"
,
4
};
pjsip_tx_data
*
tdata
;
pjsip_hdr
hdr_list
;
char
tps_name
[
AST_TASKPROCESSOR_MAX_NAME
+
1
];
...
...
@@ -392,12 +405,6 @@ static int refer_progress_alloc(struct ast_sip_session *session, pjsip_rx_data *
ast_debug
(
3
,
"Accepting REFER request for progress monitor '%p'
\n
"
,
*
progress
);
pjsip_xfer_accept
((
*
progress
)
->
sub
,
rdata
,
202
,
&
hdr_list
);
/* Send initial NOTIFY Request */
ast_debug
(
3
,
"Sending initial 100 Trying NOTIFY for progress monitor '%p'
\n
"
,
*
progress
);
if
(
pjsip_xfer_notify
((
*
progress
)
->
sub
,
PJSIP_EVSUB_STATE_ACTIVE
,
100
,
NULL
,
&
tdata
)
==
PJ_SUCCESS
)
{
pjsip_xfer_send_request
((
*
progress
)
->
sub
,
tdata
);
}
return
0
;
error:
...
...
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