Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chan_echolink: Remove leadings zeros from node number #348

Merged
merged 1 commit into from
Jul 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion channels/chan_echolink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ static int is_rtcp_sdes(const unsigned char *pkt, int len)
/*!
* \brief Echolink call.
* \param ast Pointer to Asterisk channel.
* \param dest Pointer to Destination (echolink node number).
* \param dest Pointer to Destination (echolink node number - format 'el0/009999').
* \param timeout Timeout.
* \retval -1 if not successful.
* \retval 0 if successful.
Expand Down Expand Up @@ -1242,6 +1242,13 @@ static int el_call(struct ast_channel *ast, const char *dest, int timeout)
} else {
cp = str;
}
/* Advance the pointer past the leading zeros */
while (*cp) {
if(*cp != '0') {
break;
}
cp++;
}

/* get the ip address for the node */
ast_mutex_lock(&el_db_lock);
Expand Down
Loading