Make app_festival change more portable, allow '*' for context in iax2

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.0
Mark Spencer 21 years ago
parent 471df8f512
commit cfb711bf57

@ -362,7 +362,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
snprintf(cachefile, sizeof(cachefile), "%s/%s", cachedir, MD5Hex); snprintf(cachefile, sizeof(cachefile), "%s/%s", cachedir, MD5Hex);
fdesc=open(cachefile,O_RDWR); fdesc=open(cachefile,O_RDWR);
if (fdesc==-1) { if (fdesc==-1) {
fdesc=open(cachefile,O_CREAT|O_RDWR,S_IRWXU); fdesc=open(cachefile,O_CREAT|O_RDWR,0777);
if (fdesc!=-1) { if (fdesc!=-1) {
writecache=1; writecache=1;
strln=strlen((char *)data); strln=strlen((char *)data);

@ -3473,7 +3473,7 @@ static int send_command_transfer(struct chan_iax2_pvt *i, char type, int command
static int apply_context(struct iax2_context *con, char *context) static int apply_context(struct iax2_context *con, char *context)
{ {
while(con) { while(con) {
if (!strcmp(con->context, context)) if (!strcmp(con->context, context) || !strcmp(con->context, "*"))
return -1; return -1;
con = con->next; con = con->next;
} }

@ -250,6 +250,7 @@ host=216.207.245.47
;[biggateway] ;[biggateway]
;type=peer ;type=peer
;host=192.168.0.1 ;host=192.168.0.1
;context=*
;secret=myscret ;secret=myscret
;trunk=yes ; Use IAX2 trunking with this host ;trunk=yes ; Use IAX2 trunking with this host
; ;

Loading…
Cancel
Save