]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_ari_channels: Fixed endpoint 80 characters limit
authorsungtae kim <sungtae@messagebird.com>
Tue, 21 Apr 2020 15:40:14 +0000 (15:40 +0000)
committersungtae kim <pchero21@gmail.com>
Wed, 22 Apr 2020 13:06:56 +0000 (08:06 -0500)
Fixed it to copy the entire string from the requested endpoint body except tech-prefix.

ASTERISK-28847

Change-Id: I91b5f6708a1200363f3267b847dd6a0915222c25

res/ari/resource_channels.c

index bdb353427a71a9a40c195c58363221c41fa4e01b..ad03835a81141e12ff3b47bbdacf0e3c3d2c544b 100644 (file)
@@ -939,7 +939,7 @@ static void ari_channels_handle_originate_with_id(const char *args_endpoint,
        struct ast_ari_response *response)
 {
        char *dialtech;
-       char dialdevice[AST_CHANNEL_NAME];
+       char *dialdevice = NULL;
        struct ast_dial *dial;
        char *caller_id = NULL;
        char *cid_num = NULL;
@@ -978,7 +978,7 @@ static void ari_channels_handle_originate_with_id(const char *args_endpoint,
        dialtech = ast_strdupa(args_endpoint);
        if ((stuff = strchr(dialtech, '/'))) {
                *stuff++ = '\0';
-               ast_copy_string(dialdevice, stuff, sizeof(dialdevice));
+               dialdevice = stuff;
        }
 
        if (ast_strlen_zero(dialtech) || ast_strlen_zero(dialdevice)) {