aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b>2003-07-23 02:00:28 +0000
committerjeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b>2003-07-23 02:00:28 +0000
commit94c8887482e6b023ae871b2979616a444f2e5b2c (patch)
tree7860a0729df5a184af1327c72567a8b099917a65
parent5d4af0b9c45b58c3c098116b35f116d8930e52c8 (diff)
attempt to implement the passing of callerid. not tested
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1203 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xchannels/h323/chan_h323.c9
-rwxr-xr-xchannels/h323/chan_h323.h2
2 files changed, 9 insertions, 2 deletions
diff --git a/channels/h323/chan_h323.c b/channels/h323/chan_h323.c
index 4bd97e4f3..99bfede49 100755
--- a/channels/h323/chan_h323.c
+++ b/channels/h323/chan_h323.c
@@ -87,7 +87,7 @@ static char secret[50];
/** Private structure of a OpenH323 channel */
struct oh323_pvt {
pthread_mutex_t lock; /* Channel private lock */
- call_options_t call_opt; /* Options to be used during call setup */
+ call_options_t calloptions; /* Options to be used during call setup */
int alreadygone; /* Whether or not we've already been destroyed by or peer */
int needdestroy; /* if we need to be destroyed */
call_details_t cd; /* Call details */
@@ -402,7 +402,12 @@ static int oh323_call(struct ast_channel *c, char *dest, int timeout)
memset(called_addr, 0, sizeof(dest));
memcpy(called_addr, dest, sizeof(called_addr));
- res = h323_make_call(called_addr, &(p->cd), p->call_opt);
+ /* Copy callerid, if there is any */
+ if (strlen(c->callerid)) {
+ p->calloptions.callerid = strdup(c->callerid);
+ }
+
+ res = h323_make_call(called_addr, &(p->cd), p->calloptions);
if (res) {
ast_log(LOG_NOTICE, "h323_make_call failed(%s)\n", c->name);
diff --git a/channels/h323/chan_h323.h b/channels/h323/chan_h323.h
index 0e0bcdbf5..23e0b468a 100755
--- a/channels/h323/chan_h323.h
+++ b/channels/h323/chan_h323.h
@@ -84,6 +84,7 @@ struct oh323_alias {
PBX application and passed through make_call
function*/
typedef struct call_options {
+ const char *callerid;
int noFastStart;
int noH245Tunnelling;
int noSilenceSuppression;
@@ -95,6 +96,7 @@ typedef struct call_options {
asterisk channels to acutal h.323 connections */
typedef struct call_details {
unsigned int call_reference;
+
const char *call_token;
const char *call_source_aliases;
const char *call_dest_alias;