[asterisk-commits] may: trunk r404211 - in /trunk: addons/chan_ooh323.c configs/ooh323.conf.sample
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Dec 18 13:36:44 CST 2013
Author: may
Date: Wed Dec 18 13:36:39 2013
New Revision: 404211
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=404211
Log:
Introduce new config option 'aniasdni'. If yes then asterisk set dialed number as own id back to the caller
on incoming h.323 calls. Option can be set globally or per user section.
(closes issue ASTERISK-22020)
Reported by: Ross Beer
Modified:
trunk/addons/chan_ooh323.c
trunk/configs/ooh323.conf.sample
Modified: trunk/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/chan_ooh323.c?view=diff&rev=404211&r1=404210&r2=404211
==============================================================================
--- trunk/addons/chan_ooh323.c (original)
+++ trunk/addons/chan_ooh323.c Wed Dec 18 13:36:39 2013
@@ -205,6 +205,7 @@
char rtpmaskstr[120];
int rtdrcount, rtdrinterval; /* roundtripdelayreq */
int faststart, h245tunneling; /* faststart & h245 tunneling */
+ int aniasdni; /* use dialed number as answering identification */
struct ooh323_pvt *next; /* Next entity */
} *iflist = NULL;
@@ -237,6 +238,7 @@
int directrtp;
int earlydirect;
int g729onlyA;
+ int aniasdni;
struct ooh323_user *next;
};
@@ -344,6 +346,7 @@
static int gTRCLVL = OOTRCLVLERR;
static int gRTDRCount = 0, gRTDRInterval = 0;
static int gNat = FALSE;
+static int gANIasDNI = 0;
static int t35countrycode = 0;
static int t35extensions = 0;
@@ -556,6 +559,8 @@
pvt->amaflags = gAMAFLAGS;
ast_format_cap_copy(pvt->cap, gCap);
memcpy(&pvt->prefs, &gPrefs, sizeof(pvt->prefs));
+
+ pvt->aniasdni = gANIasDNI;
ast_mutex_unlock(&pvt->lock);
/* Add to interface list */
@@ -1897,6 +1902,9 @@
p->rtdrcount = user->rtdrcount;
p->rtdrinterval = user->rtdrinterval;
}
+
+ p->aniasdni = user->aniasdni;
+
if (user->incominglimit) user->inUse++;
ast_mutex_unlock(&user->lock);
} else {
@@ -1929,6 +1937,10 @@
ast_log(LOG_ERROR, "Could not create ast_channel\n");
return -1;
}
+
+ if (p->aniasdni) {
+ ooCallSetCallerId(call, p->exten);
+ }
if (!configure_local_rtp(p, call)) {
ast_mutex_unlock(&p->lock);
ast_log(LOG_ERROR, "Couldn't create rtp structure\n");
@@ -2430,6 +2442,8 @@
user->t38support = T38_FAXGW;
else if (!strcasecmp(v->value, "yes"))
user->t38support = T38_ENABLED;
+ } else if (!strcasecmp(v->name, "aniasdni")) {
+ user->aniasdni = ast_true(v->value);
}
v = v->next;
}
@@ -3049,6 +3063,8 @@
} else if (!strcasecmp(v->name, "tracelevel")) {
gTRCLVL = atoi(v->value);
ooH323EpSetTraceLevel(gTRCLVL);
+ } else if (!strcasecmp(v->name, "aniasdni")) {
+ gANIasDNI = ast_true(v->value);
}
v = v->next;
}
Modified: trunk/configs/ooh323.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/ooh323.conf.sample?view=diff&rev=404211&r1=404210&r2=404211
==============================================================================
--- trunk/configs/ooh323.conf.sample (original)
+++ trunk/configs/ooh323.conf.sample Wed Dec 18 13:36:39 2013
@@ -71,6 +71,10 @@
;CallerID to use for calls
;Default - Same as h323id
callerid=asterisk
+
+; Whether asterisk send back to caller own connected line id on incoming call as called number
+; Default - no
+aniasdni=no
;Whether this asterisk server will use gatekeeper.
;Default - DISABLE
More information about the asterisk-commits
mailing list