From 00669f9997b6e778edc2183f827937d516f12a91 Mon Sep 17 00:00:00 2001 From: Grzegorz Sluja <grzegorz.sluja@iopsys.eu> Date: Fri, 18 Dec 2020 17:51:55 +0100 Subject: [PATCH] Adjust chan_brcm to pjsip Signed-off-by: Grzegorz Sluja <grzegorz.sluja@iopsys.eu> --- channels/chan_brcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/channels/chan_brcm.c b/channels/chan_brcm.c index 4d2f615a3e..ad83a13a56 100644 --- a/channels/chan_brcm.c +++ b/channels/chan_brcm.c @@ -2079,7 +2079,7 @@ static int brcm_should_relay_dtmf(const struct brcm_subchannel *sub) static int is_sip_account_registered(const char *sip_account) { int res = 0; - const char *cmd = "sip show registry"; + const char *cmd = "pjsip show registrations"; char template[] = "/tmp/ast-brcm-XXXXXX"; /* template for temporary file */ char line[160]; int fd_temp = -1; @@ -2101,7 +2101,7 @@ static int is_sip_account_registered(const char *sip_account) /* The example output of the command is shown below. * Some extra spaces are removed since the line is too long. * sip0:5060 N 1313@10.0.2. 285 Registered Mon, 17 Jun 2019 17:12:58 */ - if (strstr(line, sip_account) == line && strstr(line, "Registered") != NULL) { + if (strstr(line, sip_account) != NULL && strstr(line, "Registered") != NULL) { res = 1; break; } -- GitLab