Skip to content
Snippets Groups Projects
Commit 0cc002a4 authored by Olle Johansson's avatar Olle Johansson
Browse files

Rename "username" to "defaultuser" to match with "defaultip".

"Username" still works, but is deprecated.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 10d04773
No related branches found
No related tags found
No related merge requests found
...@@ -121,6 +121,11 @@ Channel Drivers: ...@@ -121,6 +121,11 @@ Channel Drivers:
Asterisk, but will be removed in the following version. Please use the groupcount functions Asterisk, but will be removed in the following version. Please use the groupcount functions
in the dialplan to enforce call limits. The "limitonpeer" configuration option is in the dialplan to enforce call limits. The "limitonpeer" configuration option is
now renamed to "counteronpeer". now renamed to "counteronpeer".
* SIP: The "username" option is now renamed to "defaultuser" to match "defaultip".
These are used only before registration to call a peer with the uri
sip:defaultuser@defaultip
The "username" setting still work, but is deprecated and will not work in
the next version of Asterisk.
* chan_local.c: the comma delimiter inside the channel name has been changed to a * chan_local.c: the comma delimiter inside the channel name has been changed to a
semicolon, in order to make the Local channel driver compatible with the comma semicolon, in order to make the Local channel driver compatible with the comma
......
...@@ -2887,7 +2887,7 @@ static int sip_sendtext(struct ast_channel *ast, const char *text) ...@@ -2887,7 +2887,7 @@ static int sip_sendtext(struct ast_channel *ast, const char *text)
that name and store that in the "regserver" field in the sippeers that name and store that in the "regserver" field in the sippeers
table to facilitate multi-server setups. table to facilitate multi-server setups.
*/ */
static void realtime_update_peer(const char *peername, struct sockaddr_in *sin, const char *username, const char *fullcontact, int expirey) static void realtime_update_peer(const char *peername, struct sockaddr_in *sin, const char *defaultuser, const char *fullcontact, int expirey)
{ {
char port[10]; char port[10];
char ipaddr[INET_ADDRSTRLEN]; char ipaddr[INET_ADDRSTRLEN];
...@@ -2916,11 +2916,11 @@ static void realtime_update_peer(const char *peername, struct sockaddr_in *sin, ...@@ -2916,11 +2916,11 @@ static void realtime_update_peer(const char *peername, struct sockaddr_in *sin,
if (fc) if (fc)
ast_update_realtime(tablename, "name", peername, "ipaddr", ipaddr, ast_update_realtime(tablename, "name", peername, "ipaddr", ipaddr,
"port", port, "regseconds", regseconds, "port", port, "regseconds", regseconds,
"username", username, fc, fullcontact, syslabel, sysname, NULL); /* note fc and syslabel _can_ be NULL */ "defaultuser", defaultuser, fc, fullcontact, syslabel, sysname, NULL); /* note fc and syslabel _can_ be NULL */
else else
ast_update_realtime(tablename, "name", peername, "ipaddr", ipaddr, ast_update_realtime(tablename, "name", peername, "ipaddr", ipaddr,
"port", port, "regseconds", regseconds, "port", port, "regseconds", regseconds,
"username", username, syslabel, sysname, NULL); /* note syslabel _can_ be NULL */ "defaultuser", defaultuser, syslabel, sysname, NULL); /* note syslabel _can_ be NULL */
} }
   
/*! \brief Automatically add peer extension to dial plan */ /*! \brief Automatically add peer extension to dial plan */
...@@ -8660,7 +8660,7 @@ static void destroy_association(struct sip_peer *peer) ...@@ -8660,7 +8660,7 @@ static void destroy_association(struct sip_peer *peer)
   
if (!sip_cfg.ignore_regexpire) { if (!sip_cfg.ignore_regexpire) {
if (peer->rt_fromcontact) if (peer->rt_fromcontact)
ast_update_realtime(tablename, "name", peer->name, "fullcontact", "", "ipaddr", "", "port", "", "regseconds", "0", "username", "", "regserver", "", NULL); ast_update_realtime(tablename, "name", peer->name, "fullcontact", "", "ipaddr", "", "port", "", "regseconds", "0", "defaultuser", "", "regserver", "", NULL);
else else
ast_db_del("SIP/Registry", peer->name); ast_db_del("SIP/Registry", peer->name);
} }
...@@ -17961,7 +17961,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str ...@@ -17961,7 +17961,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
peer->callingpres = ast_parse_caller_presentation(v->value); peer->callingpres = ast_parse_caller_presentation(v->value);
if (peer->callingpres == -1) if (peer->callingpres == -1)
peer->callingpres = atoi(v->value); peer->callingpres = atoi(v->value);
} else if (!strcasecmp(v->name, "username")) { } else if (!strcasecmp(v->name, "username") | !strcmp(v->name, "defaultuser")) { /* "username" is deprecated */
ast_copy_string(peer->username, v->value, sizeof(peer->username)); ast_copy_string(peer->username, v->value, sizeof(peer->username));
} else if (!strcasecmp(v->name, "language")) { } else if (!strcasecmp(v->name, "language")) {
ast_copy_string(peer->language, v->value, sizeof(peer->language)); ast_copy_string(peer->language, v->value, sizeof(peer->language));
......
...@@ -582,7 +582,6 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls ...@@ -582,7 +582,6 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; maxcallbitrate maxcallbitrate ; maxcallbitrate maxcallbitrate
; rfc2833compensate mailbox ; rfc2833compensate mailbox
; busylevel ; busylevel
; username
; template ; template
; fromdomain ; fromdomain
; regexten ; regexten
...@@ -591,6 +590,7 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls ...@@ -591,6 +590,7 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; port ; port
; qualify ; qualify
; defaultip ; defaultip
; defaultuser
; rtptimeout ; rtptimeout
; rtpholdtimeout ; rtpholdtimeout
; sendrpid ; sendrpid
...@@ -610,7 +610,7 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls ...@@ -610,7 +610,7 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
;[sip_proxy-out] ;[sip_proxy-out]
;type=peer ; we only want to call out, not be called ;type=peer ; we only want to call out, not be called
;secret=guessit ;secret=guessit
;username=yourusername ; Authentication user for outbound proxies ;defaultuser=yourusername ; Authentication user for outbound proxies
;fromuser=yourusername ; Many SIP providers require this! ;fromuser=yourusername ; Many SIP providers require this!
;fromdomain=provider.sip.domain ;fromdomain=provider.sip.domain
;host=box.provider.com ;host=box.provider.com
...@@ -625,7 +625,7 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls ...@@ -625,7 +625,7 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
;[provider1] ;[provider1]
;type=peer ;type=peer
;host=sip.provider1.com ;host=sip.provider1.com
;username=4015552299 ; how your provider knows you ;fromuser=4015552299 ; how your provider knows you
;secret=youwillneverguessit ;secret=youwillneverguessit
;callbackextension=123 ; Register with this server and require calls coming back to this extension ;callbackextension=123 ; Register with this server and require calls coming back to this extension
...@@ -760,7 +760,8 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls ...@@ -760,7 +760,8 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
;secret=blahpoly ;secret=blahpoly
;host=dynamic ; This peer register with us ;host=dynamic ; This peer register with us
;dtmfmode=rfc2833 ; Choices are inband, rfc2833, or info ;dtmfmode=rfc2833 ; Choices are inband, rfc2833, or info
;username=polly ; Username to use in INVITE until peer registers ;defaultuser=polly ; Username to use in INVITE until peer registers
;defaultip=192.168.40.123
; Normally you do NOT need to set this parameter ; Normally you do NOT need to set this parameter
;disallow=all ;disallow=all
;allow=ulaw ; dtmfmode=inband only works with ulaw or alaw! ;allow=ulaw ; dtmfmode=inband only works with ulaw or alaw!
...@@ -801,7 +802,7 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls ...@@ -801,7 +802,7 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; support this (especially if one of them is ; support this (especially if one of them is
; behind a NAT). ; behind a NAT).
;defaultip=192.168.0.4 ; IP address to use until registration ;defaultip=192.168.0.4 ; IP address to use until registration
;username=goran ; Username to use when calling this device before registration ;defaultuser=goran ; Username to use when calling this device before registration
; Normally you do NOT need to set this parameter ; Normally you do NOT need to set this parameter
;setvar=CUSTID=5678 ; Channel variable to be set for all calls from this device ;setvar=CUSTID=5678 ; Channel variable to be set for all calls from this device
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment