mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 16:21:01 +00:00
chan_sip: Support auth username for callbackextension feature
ASTERISK-20527 #close Change-Id: I659cf7f00836a09d09d146ad226a40477d731239
This commit is contained in:
@@ -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->remotesecret : peer->secret, 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->username, 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);
|
||||||
}
|
}
|
||||||
|
@@ -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).
|
||||||
|
Reference in New Issue
Block a user