return 0;
}
+
+void h323_set_id(char *id)
+{
+ PString h323id(id);
+ /* EVIL HACK */
+ endPoint->SetLocalUserName(h323id);
+}
+
/** Establish Gatekeeper communiations, if so configured,
* register aliases for the H.323 endpoint to respond to.
*/
return 1;
}
- PString dest = PString(host);
-
- cout << "dest: " << dest << endl;
+ PString dest(host);
res = endPoint->MakeCall(dest, token, &cd->call_reference, call_options.port);
memcpy((char *)(cd->call_token), (const unsigned char *)token, token.GetLength());
int res;
struct oh323_pvt *p = c->pvt->pvt;
char called_addr[256];
+ char *tmp;
+ strtok_r(dest, "/", &(tmp));
ast_log(LOG_DEBUG, "dest=%s, timeout=%d.\n", dest, timeout);
struct ast_channel *tmpc = NULL;
char *dest = data;
char *ext, *host;
+ char *h323id = NULL;
char tmp[256];
+
ast_log(LOG_DEBUG, "type=%s, format=%d, data=%s.\n", type, format, (char *)data);
oldformat = format;
}
strncpy(tmp, dest, sizeof(tmp) - 1);
+
host = strchr(tmp, '@');
if (host) {
*host = '\0';
ext = NULL;
}
+ strtok_r(host, "/", &(h323id));
+
+ if (*h323id) {
+ h323_set_id(h323id);
+ }
+
+
p = oh323_alloc(0);
if (!p) {
ast_log(LOG_ERROR, "Capabilities failure, this is bad.\n");
return -1;
}
-
- printf("CONTEXT RELOAD: [%s]\n", default_context);
-
ast_destroy(cfg);
return 0;
int h323_set_alias(struct oh323_alias *);
int h323_set_gk(int, char *, char *);
+ void h323_set_id(char *);
+
/* H323 listener related funcions */
int h323_start_listener(int, struct sockaddr_in);