]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Rename ani2 to aniii and ANI2 to ANI-II where appropriate. Because its not ANI2...
authorBrian West <brian@freeswitch.org>
Tue, 17 Oct 2006 23:33:32 +0000 (23:33 +0000)
committerBrian West <brian@freeswitch.org>
Tue, 17 Oct 2006 23:33:32 +0000 (23:33 +0000)
What is ANI II ?

Refer to:

http://en.wikipedia.org/wiki/Automatic_number_identification

Thanks,
/b

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3073 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_caller.h
src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c
src/mod/endpoints/mod_dingaling/mod_dingaling.c
src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
src/mod/event_handlers/mod_cdr/basecdr.h
src/mod/event_handlers/mod_cdr/mysqlcdr.h
src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
src/switch_caller.c
src/switch_core.c
src/switch_ivr.c

index 33b9a06d3102ea282b12f57b0992826f15b18618..756f450a993aef10a6770fc1d03f009fa5640794 100644 (file)
@@ -73,7 +73,7 @@ struct switch_caller_profile {
        /*! ANI (when applicable) */
        char *ani;
        /*! ANI II (when applicable) */
-       char *ani2;
+       char *aniii;
        /*! RDNIS */
        char *rdnis;
        /*! Destination Number */
@@ -159,7 +159,7 @@ SWITCH_DECLARE(char *) switch_caller_get_field_by_name(switch_caller_profile_t *
   \param caller_id_number caller ID number
   \param network_addr network address
   \param ani ANI information
-  \param ani2 ANI II information
+  \param aniii ANI II information
   \param rdnis RDNIS
   \param source the source 
   \param context a logical context
@@ -173,7 +173,7 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memor
                                                                                                                                        char *caller_id_number,
                                                                                                                                        char *network_addr,
                                                                                                                                        char *ani,
-                                                                                                                                       char *ani2,
+                                                                                                                                       char *aniii,
                                                                                                                                        char *rdnis,
                                                                                                                                        char *source,
                                                                                                                                        char *context,
index 11002c7254e318eae761757661347b461473bb1e..d0f99e8df1cdaa2c579db2308b648d82d67f011e 100644 (file)
@@ -273,12 +273,12 @@ static switch_caller_extension_t *dialplan_hunt(switch_core_session_t *session)
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Processing %s->%s!\n", caller_profile->caller_id_name,
                                          caller_profile->destination_number);
        
-       snprintf(params, sizeof(params), "context=%s&dest=%s&cid_name=%s&cid_num=%s&netaddr=%s&ani=%s&ani2=%s&rdnis=%s&source=%s&chan_name=%s&uuid=%s", 
+       snprintf(params, sizeof(params), "context=%s&dest=%s&cid_name=%s&cid_num=%s&netaddr=%s&ani=%s&aniii=%s&rdnis=%s&source=%s&chan_name=%s&uuid=%s", 
                        caller_profile->context, caller_profile->destination_number,
                        caller_profile->caller_id_name, caller_profile->caller_id_number,
                        caller_profile->network_addr?caller_profile->network_addr:"", 
                        caller_profile->ani?caller_profile->ani:"", 
-                       caller_profile->ani2?caller_profile->ani2:"",
+                       caller_profile->aniii?caller_profile->aniii:"",
                        caller_profile->rdnis?caller_profile->rdnis:"", 
                        caller_profile->source, caller_profile->chan_name, caller_profile->uuid);
 
index de0b791e436047726d40dda4c9e4158189d99ece..7f5c669355076b278eaa632977c39b0d07b2dd50 100644 (file)
@@ -1839,7 +1839,7 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
                                                                                                                                                                          cid_num,
                                                                                                                                                                          ldl_session_get_ip(dlsession),
                                                                                                                                                                          ldl_session_get_value(dlsession, "ani"),
-                                                                                                                                                                         ldl_session_get_value(dlsession, "ani2"),
+                                                                                                                                                                         ldl_session_get_value(dlsession, "aniii"),
                                                                                                                                                                          ldl_session_get_value(dlsession, "rdnis"),
                                                                                                                                                                          (char *)modname,
                                                                                                                                                                          context,
index 13c84170c2bfaf8c23c369e690e2160e1188104a..38d2ff32948b588f05d21af22cec8fb41cea812f 100644 (file)
@@ -1211,7 +1211,7 @@ static int on_ring(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri
 
        if ((session = switch_core_session_request(&wanpipe_endpoint_interface, NULL))) {
                struct private_object *tech_pvt;
-               char ani2str[4] = "";
+               char aniiistr[4] = "";
                //wanpipe_tdm_api_t tdm_api;
 
                switch_core_session_add_stream(session, NULL);
@@ -1229,8 +1229,8 @@ static int on_ring(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri
                        return 0;
                }
 
-               if (event->ring.ani2 >= 0) {
-                       snprintf(ani2str, 5, "%.2d", event->ring.ani2);
+               if (event->ring.aniii >= 0) {
+                       snprintf(aniiistr, 5, "%.2d", event->ring.aniii);
                }
 
                if ((tech_pvt->caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
@@ -1239,7 +1239,7 @@ static int on_ring(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri
                                                                                                                                  "FreeSWITCH",
                                                                                                                                  event->ring.callingnum,
                                                                                                                                  event->ring.callingani,
-                                                                                                                                 switch_strlen_zero(ani2str) ? NULL : ani2str,
+                                                                                                                                 switch_strlen_zero(aniiistr) ? NULL : aniiistr,
                                                                                                                                  NULL,
                                                                                                                                  NULL,
                                                                                                                                  (char *)modname,
index 82f68841d316086f0f1642868eebaa23fd881f01..a8ff3212c9199f7b2b4cfdec39014a60c068c3df 100644 (file)
@@ -90,7 +90,7 @@ class BaseCDR {
                char srcchannel[80];
                char dstchannel[80];
                char ani[80];
-               char ani2[80];
+               char aniii[80];
                char network_addr[40];
                char lastapp[80];
                char lastdata[255]; 
index 3747fbb6edaa812be34640abbedcf8f8d8c3e1ab..ceb7c82e2f67bf27735e0a87cc77f375677fb7e6 100644 (file)
@@ -88,7 +88,7 @@ class MysqlCDR : public BaseCDR {
                long unsigned int srcchannel_length;
                long unsigned int dstchannel_length;
                long unsigned int ani_length;
-               long unsigned int ani2_length;
+               long unsigned int aniii_length;
                long unsigned int lastapp_length;
                long unsigned int lastdata_length;
                // Now a couple internal methods
index 16148932233d1cdd1c6f1545b623dd3b3f18c638..bcacacc570f5016cf3ba4997268643bc685ea476 100644 (file)
@@ -1235,7 +1235,7 @@ static JSBool js_fetchurl_file(JSContext *cx, JSObject *obj, uintN argc, jsval *
 /*********************************************************************************/
 enum session_tinyid {
        SESSION_NAME, SESSION_STATE,
-       PROFILE_DIALPLAN, PROFILE_CID_NAME, PROFILE_CID_NUM, PROFILE_IP, PROFILE_ANI, PROFILE_ANI2, PROFILE_DEST
+       PROFILE_DIALPLAN, PROFILE_CID_NAME, PROFILE_CID_NUM, PROFILE_IP, PROFILE_ANI, PROFILE_ANI_II, PROFILE_DEST
 };
 
 static JSFunctionSpec session_methods[] = {
@@ -1266,7 +1266,7 @@ static JSPropertySpec session_props[] = {
        {"caller_id_num", PROFILE_CID_NUM, JSPROP_READONLY|JSPROP_PERMANENT}, 
        {"network_addr", PROFILE_IP, JSPROP_READONLY|JSPROP_PERMANENT}, 
        {"ani", PROFILE_ANI, JSPROP_READONLY|JSPROP_PERMANENT}, 
-       {"ani2", PROFILE_ANI2, JSPROP_READONLY|JSPROP_PERMANENT}, 
+       {"aniii", PROFILE_ANI_II, JSPROP_READONLY|JSPROP_PERMANENT}, 
        {"destination", PROFILE_DEST, JSPROP_READONLY|JSPROP_PERMANENT}, 
        {0}
 };
@@ -1325,9 +1325,9 @@ static JSBool session_getProperty(JSContext *cx, JSObject *obj, jsval id, jsval
                        *vp = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, caller_profile->ani));
                }
                break;
-       case PROFILE_ANI2:
+       case PROFILE_ANI_II:
                if (caller_profile) {
-                       *vp = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, caller_profile->ani2));
+                       *vp = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, caller_profile->aniii));
                }
                break;
        case PROFILE_DEST:
@@ -1402,7 +1402,7 @@ static JSBool session_construct(JSContext *cx, JSObject *obj, uintN argc, jsval
                char *cid_num = "";
                char *network_addr = "";
                char *ani = "";
-               char *ani2 = "";
+               char *aniii = "";
                char *rdnis = "";
                char *context = "";
                char *username = NULL;
@@ -1442,7 +1442,7 @@ static JSBool session_construct(JSContext *cx, JSObject *obj, uintN argc, jsval
                        ani = JS_GetStringBytes(JS_ValueToString(cx, argv[7]));
                }
                if (argc > 8) {
-                       ani2 = JS_GetStringBytes(JS_ValueToString(cx, argv[8]));
+                       aniii = JS_GetStringBytes(JS_ValueToString(cx, argv[8]));
                }
                if (argc > 9) {
                        rdnis = JS_GetStringBytes(JS_ValueToString(cx, argv[9]));
@@ -1467,7 +1467,7 @@ static JSBool session_construct(JSContext *cx, JSObject *obj, uintN argc, jsval
                                                                                                   cid_num,
                                                                                                   network_addr,
                                                                                                   ani,
-                                                                                                  ani2,
+                                                                                                  aniii,
                                                                                                   rdnis,
                                                                                                   (char *)modname,
                                                                                                   context,
index e1801576cea843d99eebf66e803f7250e3346e35..2fce18fbc2a76d11e465c715e4031d845786c5c8 100644 (file)
@@ -39,7 +39,7 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memor
                                                                                                                                        char *caller_id_number,
                                                                                                                                        char *network_addr,
                                                                                                                                        char *ani,
-                                                                                                                                       char *ani2
+                                                                                                                                       char *aniii
                                                                                                                                        char *rdnis,
                                                                                                                                        char *source,
                                                                                                                                        char *context,
@@ -59,7 +59,7 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memor
                profile->caller_id_number = switch_core_strdup(pool, caller_id_number);
                profile->network_addr = switch_core_strdup(pool, network_addr);
                profile->ani = switch_core_strdup(pool, ani);
-               profile->ani2 = switch_core_strdup(pool, ani2);
+               profile->aniii = switch_core_strdup(pool, aniii);
                profile->rdnis = switch_core_strdup(pool, rdnis);
                profile->source = switch_core_strdup(pool, source);
                profile->context = switch_core_strdup(pool, context);
@@ -80,7 +80,7 @@ SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_clone(switch_cor
                profile->dialplan = switch_core_session_strdup(session, tocopy->dialplan);
                profile->caller_id_name = switch_core_session_strdup(session, tocopy->caller_id_name);
                profile->ani = switch_core_session_strdup(session, tocopy->ani);
-               profile->ani2 = switch_core_session_strdup(session, tocopy->ani2);
+               profile->aniii = switch_core_session_strdup(session, tocopy->aniii);
                profile->caller_id_number = switch_core_session_strdup(session, tocopy->caller_id_number);
                profile->network_addr = switch_core_session_strdup(session, tocopy->network_addr);
                profile->rdnis = switch_core_session_strdup(session, tocopy->rdnis);
@@ -109,8 +109,8 @@ SWITCH_DECLARE(char *) switch_caller_get_field_by_name(switch_caller_profile_t *
        if (!strcasecmp(name, "ani")) {
                return caller_profile->ani;
        }
-       if (!strcasecmp(name, "ani2")) {
-               return caller_profile->ani2;
+       if (!strcasecmp(name, "aniii")) {
+               return caller_profile->aniii;
        }
        if (!strcasecmp(name, "caller_id_number")) {
                return caller_profile->caller_id_number;
@@ -169,9 +169,9 @@ SWITCH_DECLARE(void) switch_caller_profile_event_set_data(switch_caller_profile_
                snprintf(header_name, sizeof(header_name), "%s-ANI", prefix);
                switch_event_add_header(event, SWITCH_STACK_BOTTOM, header_name, "%s", caller_profile->ani);
        }
-       if (caller_profile->ani2) {
-               snprintf(header_name, sizeof(header_name), "%s-ANI2", prefix);
-               switch_event_add_header(event, SWITCH_STACK_BOTTOM, header_name, "%s", caller_profile->ani2);
+       if (caller_profile->aniii) {
+               snprintf(header_name, sizeof(header_name), "%s-ANI-II", prefix);
+               switch_event_add_header(event, SWITCH_STACK_BOTTOM, header_name, "%s", caller_profile->aniii);
        }
        if (caller_profile->destination_number) {
                snprintf(header_name, sizeof(header_name), "%s-Destination-Number", prefix);
index c7575fda403d7d0114c6c0c5cc5cf98bebc5b6bc..1ed7a5457d80eefc63fa75a96faecee7f5214a55 100644 (file)
@@ -1330,7 +1330,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_outgoing_channel(switch_core
                                                                                                                                 ecaller_id_number ? ecaller_id_number : caller_profile->caller_id_number,
                                                                                                                                 caller_profile->network_addr,
                                                                                                                                 caller_profile->ani,
-                                                                                                                                caller_profile->ani2
+                                                                                                                                caller_profile->aniii
                                                                                                                                 caller_profile->rdnis,
                                                                                                                                 caller_profile->source,
                                                                                                                                 caller_profile->context,
index 3ac56d7e6d514008bd368a75f1646aa6e9680fd0..5e724bc90a752ee66e3ef322465dcf6ffda8d35d 100644 (file)
@@ -1846,7 +1846,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                                                                                                                                   caller_profile_override->caller_id_number,
                                                                                                                                   caller_profile_override->network_addr, 
                                                                                                                                   caller_profile_override->ani,
-                                                                                                                                  caller_profile_override->ani2,
+                                                                                                                                  caller_profile_override->aniii,
                                                                                                                                   caller_profile_override->rdnis,
                                                                                                                                   caller_profile_override->source,
                                                                                                                                   caller_profile_override->context,