aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 9d9f9cb7d..07b923629 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -12001,7 +12001,11 @@ static int function_sippeer(struct ast_channel *chan, char *cmd, char *data, cha
index = atoi(codecnum);
if((codec = ast_codec_pref_index(&peer->prefs, index))) {
ast_copy_string(buf, ast_getformatname(codec), len);
+ } else {
+ buf[0] = '\0';
}
+ } else {
+ buf[0] = '\0';
}
ASTOBJ_UNREF(peer, sip_destroy_peer);