aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-29 23:15:28 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-29 23:15:28 +0000
commit267f038a9a7e29c0433d84ff9c269463a8e445ff (patch)
treec98c669132a8db97cf442ec181db3f36cbe576e1 /channels
parent3cd67d144572533e23cf453c6313968925760f1a (diff)
Allow the "useragent" value to be restored into memory from the realtime backend.
This value is purely informational. It does not alter configuration at all. (closes issue #16029) Reported by: Guggemand Patches: realtime-useragent.patch uploaded by Guggemand (license 897) Tested by: Guggemand git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@273060 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 027b3f42d..4e8005e0e 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -17979,9 +17979,11 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
}
if (realtime && !strcasecmp(v->name, "regseconds")) {
ast_get_time_t(v->value, &regseconds, 0, NULL);
- } else if (realtime && !strcasecmp(v->name, "name"))
+ } else if (realtime && !strcasecmp(v->name, "name")) {
ast_copy_string(peer->name, v->value, sizeof(peer->name));
- else if (realtime && !strcasecmp(v->name, "fullcontact")) {
+ } else if (realtime && !strcasecmp(v->name, "useragent")) {
+ ast_copy_string(peer->useragent, v->value, sizeof(peer->useragent));
+ } else if (realtime && !strcasecmp(v->name, "fullcontact")) {
if (alt_fullcontact && !alt) {
/* Reset, because the alternate also has a fullcontact and we
* do NOT want the field value to be doubled. It might be
@@ -17999,13 +18001,13 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
ast_copy_string(fullcontact, v->value, sizeof(fullcontact));
ast_set_flag(&peer->flags[1], SIP_PAGE2_RT_FROMCONTACT);
}
- } else if (!strcasecmp(v->name, "secret"))
+ } else if (!strcasecmp(v->name, "secret")) {
ast_copy_string(peer->secret, v->value, sizeof(peer->secret));
- else if (!strcasecmp(v->name, "md5secret"))
+ } else if (!strcasecmp(v->name, "md5secret")) {
ast_copy_string(peer->md5secret, v->value, sizeof(peer->md5secret));
- else if (!strcasecmp(v->name, "auth"))
+ } else if (!strcasecmp(v->name, "auth")) {
peer->auth = add_realm_authentication(peer->auth, v->value, v->lineno);
- else if (!strcasecmp(v->name, "callerid")) {
+ } else if (!strcasecmp(v->name, "callerid")) {
ast_callerid_split(v->value, peer->cid_name, sizeof(peer->cid_name), peer->cid_num, sizeof(peer->cid_num));
} else if (!strcasecmp(v->name, "fullname")) {
ast_copy_string(peer->cid_name, v->value, sizeof(peer->cid_name));