mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
dial.c: Removed dial string 80 character limitation
The dial application had 80 characters of destination length limitation. But this limitation causes unexpected dial string cut if the dial string is long. Removed unnecessary limited buffer to support longer dial destination. ASTERISK-27946 Change-Id: I72c8f0319a4b47e8180817a66a7e9bde063cb330
This commit is contained in:
committed by
Friendly Automation
parent
81d271f76a
commit
eb0493cfb8
14
main/dial.c
14
main/dial.c
@@ -331,7 +331,6 @@ int ast_dial_append_channel(struct ast_dial *dial, struct ast_channel *chan)
|
|||||||
/*! \brief Helper function that requests all channels */
|
/*! \brief Helper function that requests all channels */
|
||||||
static int begin_dial_prerun(struct ast_dial_channel *channel, struct ast_channel *chan, struct ast_format_cap *cap, const char *predial_string)
|
static int begin_dial_prerun(struct ast_dial_channel *channel, struct ast_channel *chan, struct ast_format_cap *cap, const char *predial_string)
|
||||||
{
|
{
|
||||||
char numsubst[AST_MAX_EXTENSION];
|
|
||||||
struct ast_format_cap *cap_all_audio = NULL;
|
struct ast_format_cap *cap_all_audio = NULL;
|
||||||
struct ast_format_cap *cap_request;
|
struct ast_format_cap *cap_request;
|
||||||
struct ast_format_cap *requester_cap = NULL;
|
struct ast_format_cap *requester_cap = NULL;
|
||||||
@@ -355,9 +354,6 @@ static int begin_dial_prerun(struct ast_dial_channel *channel, struct ast_channe
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!channel->owner) {
|
if (!channel->owner) {
|
||||||
/* Copy device string over */
|
|
||||||
ast_copy_string(numsubst, channel->device, sizeof(numsubst));
|
|
||||||
|
|
||||||
if (cap && ast_format_cap_count(cap)) {
|
if (cap && ast_format_cap_count(cap)) {
|
||||||
cap_request = cap;
|
cap_request = cap;
|
||||||
} else if (requester_cap) {
|
} else if (requester_cap) {
|
||||||
@@ -369,7 +365,7 @@ static int begin_dial_prerun(struct ast_dial_channel *channel, struct ast_channe
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If we fail to create our owner channel bail out */
|
/* If we fail to create our owner channel bail out */
|
||||||
if (!(channel->owner = ast_request(channel->tech, cap_request, &assignedids, chan, numsubst, &channel->cause))) {
|
if (!(channel->owner = ast_request(channel->tech, cap_request, &assignedids, chan, channel->device, &channel->cause))) {
|
||||||
ao2_cleanup(cap_all_audio);
|
ao2_cleanup(cap_all_audio);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -454,7 +450,6 @@ int ast_dial_prerun(struct ast_dial *dial, struct ast_channel *chan, struct ast_
|
|||||||
/*! \brief Helper function that does the beginning dialing per-appended channel */
|
/*! \brief Helper function that does the beginning dialing per-appended channel */
|
||||||
static int begin_dial_channel(struct ast_dial_channel *channel, struct ast_channel *chan, int async, const char *predial_string, struct ast_channel *forwarder_chan)
|
static int begin_dial_channel(struct ast_dial_channel *channel, struct ast_channel *chan, int async, const char *predial_string, struct ast_channel *forwarder_chan)
|
||||||
{
|
{
|
||||||
char numsubst[AST_MAX_EXTENSION];
|
|
||||||
int res = 1;
|
int res = 1;
|
||||||
char forwarder[AST_CHANNEL_NAME];
|
char forwarder[AST_CHANNEL_NAME];
|
||||||
|
|
||||||
@@ -470,18 +465,15 @@ static int begin_dial_channel(struct ast_dial_channel *channel, struct ast_chann
|
|||||||
ast_channel_unlock(channel->owner);
|
ast_channel_unlock(channel->owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Copy device string over */
|
|
||||||
ast_copy_string(numsubst, channel->device, sizeof(numsubst));
|
|
||||||
|
|
||||||
/* Attempt to actually call this device */
|
/* Attempt to actually call this device */
|
||||||
if ((res = ast_call(channel->owner, numsubst, 0))) {
|
if ((res = ast_call(channel->owner, channel->device, 0))) {
|
||||||
res = 0;
|
res = 0;
|
||||||
ast_hangup(channel->owner);
|
ast_hangup(channel->owner);
|
||||||
channel->owner = NULL;
|
channel->owner = NULL;
|
||||||
} else {
|
} else {
|
||||||
ast_channel_publish_dial(async ? NULL : chan, channel->owner, channel->device, NULL);
|
ast_channel_publish_dial(async ? NULL : chan, channel->owner, channel->device, NULL);
|
||||||
res = 1;
|
res = 1;
|
||||||
ast_verb(3, "Called %s\n", numsubst);
|
ast_verb(3, "Called %s\n", channel->device);
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
Reference in New Issue
Block a user