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
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
semicolon, in order to make the Local channel driver compatible with the comma
that name and store that in the "regserver" field in the sippeers
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 ipaddr[INET_ADDRSTRLEN];
if (fc)
ast_update_realtime(tablename, "name", peername, "ipaddr", ipaddr,
"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
ast_update_realtime(tablename, "name", peername, "ipaddr", ipaddr,
"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 */
if (!sip_cfg.ignore_regexpire) {
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
ast_db_del("SIP/Registry", peer->name);
}
peer->callingpres = ast_parse_caller_presentation(v->value);
if (peer->callingpres == -1)
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));
} else if (!strcasecmp(v->name, "language")) {
ast_copy_string(peer->language, v->value, sizeof(peer->language));
; maxcallbitrate maxcallbitrate
; rfc2833compensate mailbox
; busylevel
-; username
; template
; fromdomain
; regexten
; port
; qualify
; defaultip
+; defaultuser
; rtptimeout
; rtpholdtimeout
; sendrpid
;[sip_proxy-out]
;type=peer ; we only want to call out, not be called
;secret=guessit
-;username=yourusername ; Authentication user for outbound proxies
+;defaultuser=yourusername ; Authentication user for outbound proxies
;fromuser=yourusername ; Many SIP providers require this!
;fromdomain=provider.sip.domain
;host=box.provider.com
;[provider1]
;type=peer
;host=sip.provider1.com
-;username=4015552299 ; how your provider knows you
+;fromuser=4015552299 ; how your provider knows you
;secret=youwillneverguessit
;callbackextension=123 ; Register with this server and require calls coming back to this extension
;secret=blahpoly
;host=dynamic ; This peer register with us
;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
;disallow=all
;allow=ulaw ; dtmfmode=inband only works with ulaw or alaw!
; support this (especially if one of them is
; behind a NAT).
;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
;setvar=CUSTID=5678 ; Channel variable to be set for all calls from this device