Fix SIP friends + MySQL (head only)
authorMark Spencer <markster@digium.com>
Mon, 4 Oct 2004 17:17:08 +0000 (17:17 +0000)
committerMark Spencer <markster@digium.com>
Mon, 4 Oct 2004 17:17:08 +0000 (17:17 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3910 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index cb077a0..3b65a3d 100755 (executable)
@@ -1062,7 +1062,9 @@ static struct sip_user *mysql_user(char *user)
                                                } else if (!strcasecmp(fields[x].name, "callingpres")) {
                                                        u->callingpres = atoi(rowval[x]);
                                                } else if (!strcasecmp(fields[x].name, "callerid")) {
-                                                       strncpy(u->callerid, rowval[x], sizeof(u->callerid) - 1);
+                                                       ast_callerid_split(rowval[x],
+                                                               u->cid_name, sizeof(u->cid_name),
+                                                               u->cid_num, sizeof(u->cid_num));
                                                        u->hascallerid=1;
                                                }
                                        }