Mon Mar 17 07:00:01 CET 2003

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matteo Brancaleoni
2003-03-17 06:00:16 +00:00
parent 61e446f04b
commit 060dda2022
2 changed files with 9 additions and 7 deletions

View File

@@ -1578,7 +1578,7 @@ static int iax2_call(struct ast_channel *c, char *dest, int timeout)
char myrdest [5] = "s"; char myrdest [5] = "s";
char context[AST_MAX_EXTENSION] =""; char context[AST_MAX_EXTENSION] ="";
char *portno = NULL; char *portno = NULL;
char *opts = NULL; char *opts = "";
struct chan_iax2_pvt *p = c->pvt->pvt; struct chan_iax2_pvt *p = c->pvt->pvt;
char *stringp=NULL; char *stringp=NULL;
if ((c->_state != AST_STATE_DOWN) && (c->_state != AST_STATE_RESERVED)) { if ((c->_state != AST_STATE_DOWN) && (c->_state != AST_STATE_RESERVED)) {
@@ -1937,9 +1937,9 @@ static struct ast_channel *ast_iax2_new(struct chan_iax2_pvt *i, int state, int
if (!iax2_getpeername(i->addr, host, sizeof(host))) if (!iax2_getpeername(i->addr, host, sizeof(host)))
snprintf(host, sizeof(host), "%s:%d", inet_ntoa(i->addr.sin_addr), ntohs(i->addr.sin_port)); snprintf(host, sizeof(host), "%s:%d", inet_ntoa(i->addr.sin_addr), ntohs(i->addr.sin_port));
if (strlen(i->username)) if (strlen(i->username))
snprintf(tmp->name, sizeof(tmp->name), "IAX[%s@%s]/%d", i->username, host, i->callno); snprintf(tmp->name, sizeof(tmp->name), "IAX2[%s@%s]/%d", i->username, host, i->callno);
else else
snprintf(tmp->name, sizeof(tmp->name), "IAX[%s]/%d", host, i->callno); snprintf(tmp->name, sizeof(tmp->name), "IAX2[%s]/%d", host, i->callno);
tmp->type = type; tmp->type = type;
/* We can support any format by default, until we get restricted */ /* We can support any format by default, until we get restricted */
tmp->nativeformats = capability; tmp->nativeformats = capability;
@@ -2363,7 +2363,7 @@ static int iax2_do_debug(int fd, int argc, char *argv[])
if (argc != 2) if (argc != 2)
return RESULT_SHOWUSAGE; return RESULT_SHOWUSAGE;
iaxdebug = 1; iaxdebug = 1;
ast_cli(fd, "IAX Debugging Enabled\n"); ast_cli(fd, "IAX2 Debugging Enabled\n");
return RESULT_SUCCESS; return RESULT_SUCCESS;
} }
@@ -2372,7 +2372,7 @@ static int iax2_no_debug(int fd, int argc, char *argv[])
if (argc != 3) if (argc != 3)
return RESULT_SHOWUSAGE; return RESULT_SHOWUSAGE;
iaxdebug = 0; iaxdebug = 0;
ast_cli(fd, "IAX Debugging Disabled\n"); ast_cli(fd, "IAX2 Debugging Disabled\n");
return RESULT_SUCCESS; return RESULT_SUCCESS;
} }
@@ -5430,9 +5430,9 @@ static int iax2_exec(struct ast_channel *chan, char *context, char *exten, int p
if (ncontext) { if (ncontext) {
*ncontext = '\0'; *ncontext = '\0';
ncontext++; ncontext++;
snprintf(req, sizeof(req), "IAX/%s/%s@%s", odata, exten, ncontext); snprintf(req, sizeof(req), "IAX2/%s/%s@%s", odata, exten, ncontext);
} else { } else {
snprintf(req, sizeof(req), "IAX/%s/%s", odata, exten); snprintf(req, sizeof(req), "IAX2/%s/%s", odata, exten);
} }
if (option_verbose > 2) if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Executing Dial('%s')\n", req); ast_verbose(VERBOSE_PREFIX_3 "Executing Dial('%s')\n", req);

View File

@@ -19,12 +19,14 @@ context = default ; Default for incoming calls
;host=dynamic ;host=dynamic
;dtmfmode=inband ; Choices are inband, rfc2833, or info ;dtmfmode=inband ; Choices are inband, rfc2833, or info
;defaultip=192.168.0.59 ;defaultip=192.168.0.59
;mailbox=1234,2345 ; Mailbox for message waiting indicator
;[pingtel] ;[pingtel]
;type=friend ;type=friend
;username=pingtel ;username=pingtel
;secret=blah ;secret=blah
;host=dynamic ;host=dynamic
;qualify=1000 ; Consider it down if it's 1 second to reply
;defaultip=192.168.0.60 ;defaultip=192.168.0.60
;[cisco] ;[cisco]