Add subaddress support (bug #1877)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer 2004-06-25 19:33:27 +00:00
parent dbea1448bd
commit c9f168ed0f
2 changed files with 5 additions and 2 deletions

View File

@ -55,7 +55,7 @@
#include <ctype.h>
#ifdef ZAPATA_PRI
#include <libpri.h>
#ifndef PRI_SETUP_CALL
#ifndef PRI_RECEIVE_SUBADDR
#error "You need newer libpri"
#endif
#endif
@ -7165,6 +7165,9 @@ static void *pri_dchannel(void *vpri)
} else {
c = zt_new(pri->pvts[chanpos], AST_STATE_RESERVED, 0, SUB_REAL, law, e->ring.ctype);
}
if(!ast_strlen_zero(e->ring.callingsubaddr)) {
pbx_builtin_setvar_helper(c, "CALLINGSUBADDR", e->ring.callingsubaddr);
}
ast_mutex_lock(&pri->lock);
if (c && !pthread_create(&threadid, &attr, ss_thread, c)) {
if (option_verbose > 2)

2
pbx.c
View File

@ -1106,7 +1106,7 @@ void pbx_substitute_variables_helper(struct ast_channel *c,const char *cp1,char
brackets--;
} else if ((vare[0] == '$') && (vare[1] == '{')) {
needsub++;
vare++
vare++;
}
vare++;
}