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
c0640a30
Commit
c0640a30
authored
6 years ago
by
Friendly Automation
Committed by
Gerrit Code Review
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge "pjsip_options.c: Allow immediate qualifies for new contacts."
parents
85242a9b
86836e04
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
res/res_pjsip/pjsip_options.c
+24
-23
24 additions, 23 deletions
res/res_pjsip/pjsip_options.c
with
24 additions
and
23 deletions
res/res_pjsip/pjsip_options.c
+
24
−
23
View file @
c0640a30
...
@@ -2100,30 +2100,31 @@ static int sip_options_contact_add_task(void *obj)
...
@@ -2100,30 +2100,31 @@ static int sip_options_contact_add_task(void *obj)
ao2_cleanup
(
contact_status
);
ao2_cleanup
(
contact_status
);
if
(
task_data
->
aor_options
->
qualify_frequency
)
{
if
(
task_data
->
aor_options
->
qualify_frequency
)
{
/* If this is the first contact we need to schedule up qualification */
/* There will always be a contact here, and we need to immediately schedule
if
(
ao2_container_count
(
task_data
->
aor_options
->
contacts
)
==
1
)
{
* a qualify so that contacts are not waiting for the qualify_frequency
ast_debug
(
3
,
"Starting scheduled callback on AOR '%s' for qualifying as there is now a contact on it
\n
"
,
* timer duration before qualifying.
*/
ast_debug
(
3
,
"Starting scheduled callback on AOR '%s' for qualifying as there is now a contact on it
\n
"
,
task_data
->
aor_options
->
name
);
/*
* We immediately schedule the initial qualify so that we get
* reachable/unreachable as soon as possible. Realistically
* since they pretty much just registered they should be
* reachable.
*/
if
(
task_data
->
aor_options
->
sched_task
)
{
ast_sip_sched_task_cancel
(
task_data
->
aor_options
->
sched_task
);
ao2_ref
(
task_data
->
aor_options
->
sched_task
,
-
1
);
task_data
->
aor_options
->
sched_task
=
NULL
;
}
task_data
->
aor_options
->
sched_task
=
ast_sip_schedule_task
(
task_data
->
aor_options
->
serializer
,
1
,
sip_options_qualify_aor
,
ast_taskprocessor_name
(
task_data
->
aor_options
->
serializer
),
task_data
->
aor_options
,
AST_SIP_SCHED_TASK_VARIABLE
|
AST_SIP_SCHED_TASK_DATA_AO2
);
if
(
!
task_data
->
aor_options
->
sched_task
)
{
ast_log
(
LOG_ERROR
,
"Unable to schedule qualify for contacts of AOR '%s'
\n
"
,
task_data
->
aor_options
->
name
);
task_data
->
aor_options
->
name
);
/*
* We immediately schedule the initial qualify so that we get
* reachable/unreachable as soon as possible. Realistically
* since they pretty much just registered they should be
* reachable.
*/
if
(
task_data
->
aor_options
->
sched_task
)
{
ast_sip_sched_task_cancel
(
task_data
->
aor_options
->
sched_task
);
ao2_ref
(
task_data
->
aor_options
->
sched_task
,
-
1
);
task_data
->
aor_options
->
sched_task
=
NULL
;
}
task_data
->
aor_options
->
sched_task
=
ast_sip_schedule_task
(
task_data
->
aor_options
->
serializer
,
1
,
sip_options_qualify_aor
,
ast_taskprocessor_name
(
task_data
->
aor_options
->
serializer
),
task_data
->
aor_options
,
AST_SIP_SCHED_TASK_VARIABLE
|
AST_SIP_SCHED_TASK_DATA_AO2
);
if
(
!
task_data
->
aor_options
->
sched_task
)
{
ast_log
(
LOG_ERROR
,
"Unable to schedule qualify for contacts of AOR '%s'
\n
"
,
task_data
->
aor_options
->
name
);
}
}
}
}
else
{
}
else
{
/*
/*
...
...
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