diff options
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 3b5118147..6790d3c8a 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -15738,10 +15738,11 @@ static int function_sipchaninfo_read(struct ast_channel *chan, const char *cmd, } else if (!strcasecmp(data, "peername")) { ast_copy_string(buf, p->peername, len); } else if (!strcasecmp(data, "t38passthrough")) { - if (p->t38.state == T38_DISABLED) - ast_copy_string(buf, "0", sizeof("0")); - else /* T38 is offered or enabled in this call */ - ast_copy_string(buf, "1", sizeof("1")); + if (p->t38.state == T38_DISABLED) { + ast_copy_string(buf, "0", len); + } else { /* T38 is offered or enabled in this call */ + ast_copy_string(buf, "1", len); + } } else { ast_channel_unlock(chan); return -1; |