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
88dfcd21
Commit
88dfcd21
authored
9 years ago
by
zuul
Committed by
Gerrit Code Review
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "chan_sip: Support auth username for callbackextension feature"
parents
9e4efe9e
538c6415
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
channels/chan_sip.c
+1
-1
1 addition, 1 deletion
channels/chan_sip.c
configs/samples/sip.conf.sample
+1
-1
1 addition, 1 deletion
configs/samples/sip.conf.sample
with
2 additions
and
2 deletions
channels/chan_sip.c
+
1
−
1
View file @
88dfcd21
...
@@ -31811,7 +31811,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
...
@@ -31811,7 +31811,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
olddirectmediaacl = ast_free_acl_list(olddirectmediaacl);
olddirectmediaacl = ast_free_acl_list(olddirectmediaacl);
if (!ast_strlen_zero(peer->callback)) { /* build string from peer info */
if (!ast_strlen_zero(peer->callback)) { /* build string from peer info */
char *reg_string;
char *reg_string;
if (ast_asprintf(®_string, "%s?%s:%s@%s/%s", peer->name, peer->username,
!ast_strlen_zero
(peer->remotesecret
) ?
peer->
remote
secret
:
peer->se
cret
, peer->tohost, peer->callback) >= 0) {
if (ast_asprintf(®_string, "%s?%s:%s
:%s
@%s/%s", peer->name,
S_OR(peer->fromuser,
peer->username
)
,
S_OR
(peer->remotesecret
,
peer->secret
),
peer->
u
se
rname
, peer->tohost, peer->callback) >= 0) {
sip_register(reg_string, 0); /* XXX TODO: count in registry_count */
sip_register(reg_string, 0); /* XXX TODO: count in registry_count */
ast_free(reg_string);
ast_free(reg_string);
}
}
This diff is collapsed.
Click to expand it.
configs/samples/sip.conf.sample
+
1
−
1
View file @
88dfcd21
...
@@ -786,7 +786,7 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
...
@@ -786,7 +786,7 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; A similar effect can be achieved by adding a "callbackextension" option in a peer section.
; A similar effect can be achieved by adding a "callbackextension" option in a peer section.
; this is equivalent to having the following line in the general section:
; this is equivalent to having the following line in the general section:
;
;
; register => username
:secret
@host/callbackextension
; register =>
fromuser:secret:
username@host/callbackextension
;
;
; and more readable because you don't have to write the parameters in two places
; and more readable because you don't have to write the parameters in two places
; (note that the "port" is ignored - this is a bug that should be fixed).
; (note that the "port" is ignored - this is a bug that should be fixed).
...
...
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