aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_agent.c8
-rwxr-xr-xchannels/chan_iax.c14
-rwxr-xr-xchannels/chan_iax2.c12
-rwxr-xr-xchannels/chan_modem.c2
-rwxr-xr-xchannels/chan_phone.c2
-rwxr-xr-xchannels/chan_sip.c10
-rwxr-xr-xchannels/chan_zap.c2
-rwxr-xr-xchannels/chan_zap_old.c2
8 files changed, 26 insertions, 26 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index ccc5e56e0..aeb867784 100755
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -398,7 +398,7 @@ static int agent_call(struct ast_channel *ast, char *dest, int timeout)
res = ast_set_read_format(p->chan, ast_best_codec(p->chan->nativeformats));
ast_log( LOG_DEBUG, "Set read format, result '%d'\n", res);
if (res)
- ast_log(LOG_WARNING, "Unable to set read format to %d\n", ast_best_codec(p->chan->nativeformats));
+ ast_log(LOG_WARNING, "Unable to set read format to %s\n", ast_getformatname(ast_best_codec(p->chan->nativeformats)));
} else {
// Agent hung-up
p->chan = NULL;
@@ -408,7 +408,7 @@ static int agent_call(struct ast_channel *ast, char *dest, int timeout)
ast_set_write_format(p->chan, ast_best_codec(p->chan->nativeformats));
ast_log( LOG_DEBUG, "Set write format, result '%d'\n", res);
if (res)
- ast_log(LOG_WARNING, "Unable to set write format to %d\n", ast_best_codec(p->chan->nativeformats));
+ ast_log(LOG_WARNING, "Unable to set write format to %s\n", ast_getformatname(ast_best_codec(p->chan->nativeformats)));
}
if( !res )
{
@@ -1046,8 +1046,8 @@ static int __login_exec(struct ast_channel *chan, void *data, int callbackmode)
"Channel: %s\r\n",
p->agent, chan->name);
if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Agent '%s' logged in (format %d/%d)\n", p->agent,
- chan->readformat, chan->writeformat);
+ ast_verbose(VERBOSE_PREFIX_3 "Agent '%s' logged in (format %s/%s)\n", p->agent,
+ ast_getformatname(chan->readformat), ast_getformatname(chan->writeformat));
/* Login this channel and wait for it to
go away */
p->chan = chan;
diff --git a/channels/chan_iax.c b/channels/chan_iax.c
index 1d1c354bb..93f7172e9 100755
--- a/channels/chan_iax.c
+++ b/channels/chan_iax.c
@@ -2256,7 +2256,7 @@ static int iax_show_registry(int fd, int argc, char *argv[])
static int iax_show_channels(int fd, int argc, char *argv[])
{
#define FORMAT2 "%-15.15s %-10.10s %-11.11s %-11.11s %-7.7s %-6.6s %s\n"
-#define FORMAT "%-15.15s %-10.10s %5.5d/%5.5d %5.5d/%5.5d %-5.5dms %-4.4dms %d\n"
+#define FORMAT "%-15.15s %-10.10s %5.5d/%5.5d %5.5d/%5.5d %-5.5dms %-4.4dms %-6.6s\n"
int x;
int numchans = 0;
if (argc != 3)
@@ -2271,7 +2271,7 @@ static int iax_show_channels(int fd, int argc, char *argv[])
iaxs[x]->oseqno, iaxs[x]->iseqno,
iaxs[x]->lag,
iaxs[x]->jitter,
- iaxs[x]->voiceformat);
+ ast_getformatname(iaxs[x]->voiceformat) );
numchans++;
}
ast_mutex_unlock(&iaxsl[x]);
@@ -3550,7 +3550,7 @@ static int socket_read(int *id, int fd, short events, void *cbdata)
if (f.frametype == AST_FRAME_VOICE) {
if (f.subclass != iaxs[fr.callno]->voiceformat) {
iaxs[fr.callno]->voiceformat = f.subclass;
- ast_log(LOG_DEBUG, "Ooh, voice format changed to %d\n", f.subclass);
+ ast_log(LOG_DEBUG, "Ooh, voice format changed to %s\n", ast_getformatname(f.subclass));
if (iaxs[fr.callno]->owner) {
int orignative;
ast_mutex_lock(&iaxs[fr.callno]->owner->lock);
@@ -3727,7 +3727,7 @@ static int socket_read(int *id, int fd, short events, void *cbdata)
iaxs[fr.callno]->peerformat = iax_capability;
}
if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Call accepted by %s (format %d)\n", inet_ntoa(iaxs[fr.callno]->addr.sin_addr), iaxs[fr.callno]->peerformat);
+ ast_verbose(VERBOSE_PREFIX_3 "Call accepted by %s (format %s)\n", inet_ntoa(iaxs[fr.callno]->addr.sin_addr), ast_getformatname(iaxs[fr.callno]->peerformat));
if (!(iaxs[fr.callno]->peerformat & iaxs[fr.callno]->capability)) {
send_command_final(iaxs[fr.callno], AST_FRAME_IAX, AST_IAX_COMMAND_REJECT, 0, "Unable to negotiate codec", strlen("Unable to negotiate codec"), -1);
ast_log(LOG_NOTICE, "Rejected call to %s, format 0x%x incompatible with our capability 0x%x.\n", inet_ntoa(sin.sin_addr), iaxs[fr.callno]->peerformat, iaxs[fr.callno]->capability);
@@ -3737,7 +3737,7 @@ static int socket_read(int *id, int fd, short events, void *cbdata)
/* Switch us to use a compatible format */
iaxs[fr.callno]->owner->nativeformats = iaxs[fr.callno]->peerformat;
if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Format for call is %d\n", iaxs[fr.callno]->owner->nativeformats);
+ ast_verbose(VERBOSE_PREFIX_3 "Format for call is %s\n", ast_getformatname(iaxs[fr.callno]->owner->nativeformats));
/* Setup read/write formats properly. */
if (iaxs[fr.callno]->owner->writeformat)
ast_set_write_format(iaxs[fr.callno]->owner, iaxs[fr.callno]->owner->writeformat);
@@ -3861,7 +3861,7 @@ static int socket_read(int *id, int fd, short events, void *cbdata)
/* Select an appropriate format */
format = iaxs[fr.callno]->peerformat & iax_capability;
if (!format) {
- ast_log(LOG_DEBUG, "We don't do requested format %d, falling back to peer capability %d\n", iaxs[fr.callno]->peerformat, iaxs[fr.callno]->peercapability);
+ ast_log(LOG_DEBUG, "We don't do requested format %s, falling back to peer capability %d\n", ast_getformatname(iaxs[fr.callno]->peerformat), iaxs[fr.callno]->peercapability);
format = iaxs[fr.callno]->peercapability & iax_capability;
if (!format) {
ast_log(LOG_NOTICE, "Rejected connect attempt from %s, requested/capability 0x%x/0x%x incompatible with our capability 0x%x.\n", inet_ntoa(sin.sin_addr), iaxs[fr.callno]->peerformat, iaxs[fr.callno]->peercapability, iax_capability);
@@ -4224,7 +4224,7 @@ static struct ast_channel *iax_request(char *type, int format, void *data)
fmt = format;
res = ast_translator_best_choice(&fmt, &native);
if (res < 0) {
- ast_log(LOG_WARNING, "Unable to create translator path for %d to %d on %s\n", c->nativeformats, fmt, c->name);
+ ast_log(LOG_WARNING, "Unable to create translator path for %s to %s on %s\n", ast_getformatname(c->nativeformats), ast_getformatname(fmt), c->name);
ast_hangup(c);
return NULL;
}
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 840b96490..ff42b4ddf 100755
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -2433,7 +2433,7 @@ static int iax2_show_registry(int fd, int argc, char *argv[])
static int iax2_show_channels(int fd, int argc, char *argv[])
{
#define FORMAT2 "%-15.15s %-10.10s %-11.11s %-11.11s %-7.7s %-6.6s %s\n"
-#define FORMAT "%-15.15s %-10.10s %5.5d/%5.5d %5.5d/%5.5d %-5.5dms %-4.4dms %d\n"
+#define FORMAT "%-15.15s %-10.10s %5.5d/%5.5d %5.5d/%5.5d %-5.5dms %-4.4dms %-6.6s\n"
int x;
int numchans = 0;
if (argc != 3)
@@ -2448,7 +2448,7 @@ static int iax2_show_channels(int fd, int argc, char *argv[])
iaxs[x]->oseqno, iaxs[x]->iseqno,
iaxs[x]->lag,
iaxs[x]->jitter,
- iaxs[x]->voiceformat);
+ ast_getformatname(iaxs[x]->voiceformat) );
numchans++;
}
ast_mutex_unlock(&iaxsl[x]);
@@ -4105,7 +4105,7 @@ retryowner:
iaxs[fr.callno]->peerformat = iax2_capability;
}
if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Call accepted by %s (format %d)\n", inet_ntoa(iaxs[fr.callno]->addr.sin_addr), iaxs[fr.callno]->peerformat);
+ ast_verbose(VERBOSE_PREFIX_3 "Call accepted by %s (format %s)\n", inet_ntoa(iaxs[fr.callno]->addr.sin_addr), ast_getformatname(iaxs[fr.callno]->peerformat));
if (!(iaxs[fr.callno]->peerformat & iaxs[fr.callno]->capability)) {
memset(&ied0, 0, sizeof(ied0));
iax_ie_append_str(&ied0, IAX_IE_CAUSE, "Unable to negotiate codec");
@@ -4117,7 +4117,7 @@ retryowner:
/* Switch us to use a compatible format */
iaxs[fr.callno]->owner->nativeformats = iaxs[fr.callno]->peerformat;
if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Format for call is %d\n", iaxs[fr.callno]->owner->nativeformats);
+ ast_verbose(VERBOSE_PREFIX_3 "Format for call is %s\n", ast_getformatname(iaxs[fr.callno]->owner->nativeformats));
/* Setup read/write formats properly. */
if (iaxs[fr.callno]->owner->writeformat)
ast_set_write_format(iaxs[fr.callno]->owner, iaxs[fr.callno]->owner->writeformat);
@@ -4243,7 +4243,7 @@ retryowner:
/* Select an appropriate format */
format = iaxs[fr.callno]->peerformat & iax2_capability;
if (!format) {
- ast_log(LOG_DEBUG, "We don't do requested format %d, falling back to peer capability %d\n", iaxs[fr.callno]->peerformat, iaxs[fr.callno]->peercapability);
+ ast_log(LOG_DEBUG, "We don't do requested format %s, falling back to peer capability %d\n", ast_getformatname(iaxs[fr.callno]->peerformat), iaxs[fr.callno]->peercapability);
format = iaxs[fr.callno]->peercapability & iax2_capability;
if (!format) {
ast_log(LOG_NOTICE, "Rejected connect attempt from %s, requested/capability 0x%x/0x%x incompatible with our capability 0x%x.\n", inet_ntoa(sin.sin_addr), iaxs[fr.callno]->peerformat, iaxs[fr.callno]->peercapability, iax2_capability);
@@ -4652,7 +4652,7 @@ static struct ast_channel *iax2_request(char *type, int format, void *data)
fmt = format;
res = ast_translator_best_choice(&fmt, &native);
if (res < 0) {
- ast_log(LOG_WARNING, "Unable to create translator path for %d to %d on %s\n", c->nativeformats, fmt, c->name);
+ ast_log(LOG_WARNING, "Unable to create translator path for %s to %s on %s\n", ast_getformatname(c->nativeformats), ast_getformatname(fmt), c->name);
ast_hangup(c);
return NULL;
}
diff --git a/channels/chan_modem.c b/channels/chan_modem.c
index b62002679..de8237ff8 100755
--- a/channels/chan_modem.c
+++ b/channels/chan_modem.c
@@ -790,7 +790,7 @@ static struct ast_channel *modem_request(char *type, int format, void *data)
} else
ast_log(LOG_WARNING, "Device '%s' is busy\n", p->dev);
} else
- ast_log(LOG_WARNING, "Asked for a format %d line on %s\n", format, p->dev);
+ ast_log(LOG_WARNING, "Asked for a format %s line on %s\n", ast_getformatname(format), p->dev);
break;
}
}
diff --git a/channels/chan_phone.c b/channels/chan_phone.c
index 5ae642a1f..2c9926119 100755
--- a/channels/chan_phone.c
+++ b/channels/chan_phone.c
@@ -270,7 +270,7 @@ static int phone_setup(struct ast_channel *ast)
}
}
} else {
- ast_log(LOG_WARNING, "Can't do format %d\n", ast->pvt->rawreadformat);
+ ast_log(LOG_WARNING, "Can't do format %s\n", ast_getformatname(ast->pvt->rawreadformat));
return -1;
}
if (ioctl(p->fd, PHONE_REC_START)) {
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index ba8cafa83..343d9fd43 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -1724,7 +1724,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
return -1;
}
if (sipdebug)
- ast_verbose("Found audio format %d\n", codec);
+ ast_verbose("Found audio format %s\n", ast_getformatname(codec));
ast_rtp_set_m_type(p->rtp, codec);
codecs += len;
/* Skip over any whitespace */
@@ -1742,7 +1742,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
return -1;
}
if (sipdebug)
- ast_verbose("Found video format %d\n", codec);
+ ast_verbose("Found video format %s\n", ast_getformatname(codec));
ast_rtp_set_m_type(p->vrtp, codec);
codecs += len;
/* Skip over any whitespace */
@@ -3883,7 +3883,7 @@ static int sip_show_registry(int fd, int argc, char *argv[])
static int sip_show_channels(int fd, int argc, char *argv[])
{
#define FORMAT2 "%-15.15s %-10.10s %-11.11s %-11.11s %-7.7s %-6.6s %s\n"
-#define FORMAT "%-15.15s %-10.10s %-11.11s %5.5d/%5.5d %-5.5dms %-4.4dms %d\n"
+#define FORMAT "%-15.15s %-10.10s %-11.11s %5.5d/%5.5d %-5.5dms %-4.4dms %-6.6s\n"
struct sip_pvt *cur;
int numchans = 0;
if (argc != 3)
@@ -3899,7 +3899,7 @@ static int sip_show_channels(int fd, int argc, char *argv[])
cur->ocseq, cur->icseq,
0,
0,
- cur->owner ? cur->owner->nativeformats : 0);
+ ast_getformatname(cur->owner ? cur->owner->nativeformats : 0) );
numchans++;
}
cur = cur->next;
@@ -5223,7 +5223,7 @@ static struct ast_channel *sip_request(char *type, int format, void *data)
oldformat = format;
format &= capability;
if (!format) {
- ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format %d while capability is %d\n", oldformat, capability);
+ ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format %s while capability is %s\n", ast_getformatname(oldformat), ast_getformatname(capability));
return NULL;
}
p = sip_alloc(NULL, NULL, 0);
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 7c5680ea3..6b6a04825 100755
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -3180,7 +3180,7 @@ struct ast_frame *zt_read(struct ast_channel *ast)
ast_log(LOG_WARNING, "Unable to set channel %d (index %d) to campanded mode.\n", p->channel, index);
}
} else {
- ast_log(LOG_WARNING, "Don't know how to read frames in format %d\n", ast->pvt->rawreadformat);
+ ast_log(LOG_WARNING, "Don't know how to read frames in format %s\n", ast_getformatname(ast->pvt->rawreadformat));
ast_mutex_unlock(&p->lock);
return NULL;
}
diff --git a/channels/chan_zap_old.c b/channels/chan_zap_old.c
index c81b6e5c6..402b1b3c5 100755
--- a/channels/chan_zap_old.c
+++ b/channels/chan_zap_old.c
@@ -2842,7 +2842,7 @@ struct ast_frame *zt_read(struct ast_channel *ast)
ast_log(LOG_WARNING, "Unable to set channel %d (index %d) to campanded mode.\n", p->channel, index);
}
} else {
- ast_log(LOG_WARNING, "Don't know how to read frames in format %d\n", ast->pvt->rawreadformat);
+ ast_log(LOG_WARNING, "Don't know how to read frames in format %s\n", ast_getformatname(ast->pvt->rawreadformat));
ast_mutex_unlock(&p->lock);
return NULL;
}