pjsip configuration: Make transport TOS values consistent with endpoints

Transport TOS values were interpreted as DSCP values without being documented
as such. Endpoint TOS values (tos_audio/tos_video) behaved normally as TOS
values have historically. This patch makes the transport TOS values behave as
TOS values and makes all TOS values readable as string values (e.g. AF11).
In addition, alembic scripts have been updated to use the proper field types
for all TOS/COS values.

(issue ASTERISK-23235)
Reported by: George Joseph
Review: https://reviewboard.asterisk.org/r/3304/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jonathan Rose
2014-03-06 18:50:44 +00:00
parent b7326c2be7
commit 3cdbf978d1
6 changed files with 163 additions and 4 deletions

View File

@@ -894,6 +894,12 @@ const char *ast_tos2str(unsigned int tos)
return "unknown";
}
void ast_tos2str_buf(unsigned int tos, char **buf)
{
const char *tos_string = ast_tos2str(tos);
*buf = ast_strdup(tos_string);
}
int ast_get_ip(struct ast_sockaddr *addr, const char *hostname)
{
return ast_get_ip_or_srv(addr, hostname, NULL);