]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Look for the number in a callerid string starting from the end. This way a value...
authorJoshua Colp <jcolp@digium.com>
Wed, 4 Mar 2009 19:22:50 +0000 (19:22 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 4 Mar 2009 19:22:50 +0000 (19:22 +0000)
(issue #AST-194)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@180194 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/callerid.c

index d446ecbb86c0cd4a21073ba3ad4d04a25f01ba7a..bf4bca4299bf0f253d7e1c165740127e4f869b78 100644 (file)
@@ -971,7 +971,7 @@ int ast_callerid_parse(char *instr, char **name, char **location)
        char *ns, *ne, *ls, *le;
 
        /* Try "name" <location> format or name <location> format */
-       if ((ls = strchr(instr, '<')) && (le = strchr(ls, '>'))) {
+       if ((ls = strrchr(instr, '<')) && (le = strrchr(ls, '>'))) {
                *ls = *le = '\0';       /* location found, trim off the brackets */
                *location = ls + 1;     /* and this is the result */
                if ((ns = strchr(instr, '"')) && (ne = strchr(ns + 1, '"'))) {