Make callerid fields in Manager events more consistent. CallerIDNum for number and...
authorJoshua Colp <jcolp@digium.com>
Mon, 2 Oct 2006 20:35:16 +0000 (20:35 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 2 Oct 2006 20:35:16 +0000 (20:35 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44217 65c4cc65-6c06-0410-ace0-fbb531ad65f3

CHANGES
apps/app_dial.c
apps/app_dumpchan.c
apps/app_meetme.c
apps/app_queue.c
main/channel.c
res/res_features.c

diff --git a/CHANGES b/CHANGES
index 2a9a0ca..c32fdef 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -21,3 +21,5 @@ Changes since Asterisk 1.4-beta was branched:
      statistics during a reload.
   * Added rotatetimestamp option to logger.conf which will use
      the time to name the logger files instead of sequence number.
+  * The output of CallerID in Manager events is now more consistent.
+     CallerIDNum is used for number and CallerIDName for name.
index 8f9a050..da68e83 100644 (file)
@@ -373,11 +373,10 @@ static const char *get_cid_name(char *name, int namelen, struct ast_channel *cha
 
 static void senddialevent(struct ast_channel *src, struct ast_channel *dst)
 {
-       /* XXX do we need also CallerIDnum ? */
        manager_event(EVENT_FLAG_CALL, "Dial", 
                           "Source: %s\r\n"
                           "Destination: %s\r\n"
-                          "CallerID: %s\r\n"
+                          "CallerIDNum: %s\r\n"
                           "CallerIDName: %s\r\n"
                           "SrcUniqueID: %s\r\n"
                           "DestUniqueID: %s\r\n",
index 426ba4e..8e42e9d 100644 (file)
@@ -82,7 +82,7 @@ static int serialize_showchan(struct ast_channel *c, char *buf, size_t size)
                         "Name=               %s\n"
                         "Type=               %s\n"
                         "UniqueID=           %s\n"
-                        "CallerID=           %s\n"
+                        "CallerIDNum=        %s\n"
                         "CallerIDName=       %s\n"
                         "DNIDDigits=         %s\n"
                         "RDNIS=              %s\n" 
index 9659f3a..aa52c3b 100644 (file)
@@ -1910,8 +1910,8 @@ bailoutandtrynormal:
                                      "Uniqueid: %s\r\n"
                                      "Meetme: %s\r\n"
                                      "Usernum: %d\r\n"
-                                     "CallerIDnum: %s\r\n"
-                                     "CallerIDname: %s\r\n"
+                                     "CallerIDNum: %s\r\n"
+                                     "CallerIDName: %s\r\n"
                                      "Duration: %ld\r\n",
                                      chan->name, chan->uniqueid, conf->confno, 
                                      user->user_no,
index 6ec3c4e..7e37b19 100644 (file)
@@ -1659,7 +1659,7 @@ static int ring_entry(struct queue_ent *qe, struct callattempt *tmp, int *busies
                manager_event(EVENT_FLAG_AGENT, "AgentCalled",
                                        "AgentCalled: %s\r\n"
                                        "ChannelCalling: %s\r\n"
-                                       "CallerID: %s\r\n"
+                                       "CallerIDNum: %s\r\n"
                                        "CallerIDName: %s\r\n"
                                        "Context: %s\r\n"
                                        "Extension: %s\r\n"
@@ -4131,7 +4131,7 @@ static int manager_queues_status(struct mansession *s, struct message *m)
                                        "Queue: %s\r\n"
                                        "Position: %d\r\n"
                                        "Channel: %s\r\n"
-                                       "CallerID: %s\r\n"
+                                       "CallerIDNum: %s\r\n"
                                        "CallerIDName: %s\r\n"
                                        "Wait: %ld\r\n"
                                        "%s"
index 4425be9..6a5ecae 100644 (file)
@@ -2846,7 +2846,7 @@ struct ast_channel *ast_request(const char *type, int format, void *data, int *c
                        manager_event(EVENT_FLAG_CALL, "Newchannel",
                                      "Channel: %s\r\n"
                                      "State: %s\r\n"
-                                     "CallerID: %s\r\n"
+                                     "CallerIDNum: %s\r\n"
                                      "CallerIDName: %s\r\n"
                                      "Uniqueid: %s\r\n",
                                      c->name, ast_state2str(c->_state),
@@ -3473,7 +3473,7 @@ void ast_set_callerid(struct ast_channel *chan, const char *callerid, const char
                ast_cdr_setcid(chan->cdr, chan);
        manager_event(EVENT_FLAG_CALL, "Newcallerid",
                                "Channel: %s\r\n"
-                               "CallerID: %s\r\n"
+                               "CallerIDNum: %s\r\n"
                                "CallerIDName: %s\r\n"
                                "Uniqueid: %s\r\n"
                                "CID-CallingPres: %d (%s)\r\n",
@@ -3499,7 +3499,7 @@ int ast_setstate(struct ast_channel *chan, enum ast_channel_state state)
                      (oldstate == AST_STATE_DOWN) ? "Newchannel" : "Newstate",
                      "Channel: %s\r\n"
                      "State: %s\r\n"
-                     "CallerID: %s\r\n"
+                     "CallerIDNum: %s\r\n"
                      "CallerIDName: %s\r\n"
                      "Uniqueid: %s\r\n",
                      chan->name, ast_state2str(chan->_state),
index 3947bb3..9b52145 100644 (file)
@@ -399,7 +399,7 @@ int ast_park_call(struct ast_channel *chan, struct ast_channel *peer, int timeou
                "Channel: %s\r\n"
                "From: %s\r\n"
                "Timeout: %ld\r\n"
-               "CallerID: %s\r\n"
+               "CallerIDNum: %s\r\n"
                "CallerIDName: %s\r\n",
                pu->parkingexten, pu->chan->name, peer ? peer->name : "",
                (long)pu->start.tv_sec + (long)(pu->parkingtime/1000) - (long)time(NULL),
@@ -1514,7 +1514,7 @@ static void post_manager_event(const char *s, char *parkingexten, struct ast_cha
        manager_event(EVENT_FLAG_CALL, s,
                "Exten: %s\r\n"
                "Channel: %s\r\n"
-               "CallerID: %s\r\n"
+               "CallerIDNum: %s\r\n"
                "CallerIDName: %s\r\n\r\n",
                parkingexten, 
                chan->name,
@@ -1768,7 +1768,7 @@ static int park_exec(struct ast_channel *chan, void *data)
                        "Exten: %s\r\n"
                        "Channel: %s\r\n"
                        "From: %s\r\n"
-                       "CallerID: %s\r\n"
+                       "CallerIDNum: %s\r\n"
                        "CallerIDName: %s\r\n",
                        pu->parkingexten, pu->chan->name, chan->name,
                        S_OR(pu->chan->cid.cid_num, "<unknown>"),
@@ -1951,7 +1951,7 @@ static int manager_parking_status( struct mansession *s, struct message *m )
                        "Channel: %s\r\n"
                        "From: %s\r\n"
                        "Timeout: %ld\r\n"
-                       "CallerID: %s\r\n"
+                       "CallerIDNum: %s\r\n"
                        "CallerIDName: %s\r\n"
                        "%s"
                        "\r\n",