mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
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:
@@ -55,7 +55,7 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#ifdef ZAPATA_PRI
|
#ifdef ZAPATA_PRI
|
||||||
#include <libpri.h>
|
#include <libpri.h>
|
||||||
#ifndef PRI_SETUP_CALL
|
#ifndef PRI_RECEIVE_SUBADDR
|
||||||
#error "You need newer libpri"
|
#error "You need newer libpri"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -7165,6 +7165,9 @@ static void *pri_dchannel(void *vpri)
|
|||||||
} else {
|
} else {
|
||||||
c = zt_new(pri->pvts[chanpos], AST_STATE_RESERVED, 0, SUB_REAL, law, e->ring.ctype);
|
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);
|
ast_mutex_lock(&pri->lock);
|
||||||
if (c && !pthread_create(&threadid, &attr, ss_thread, c)) {
|
if (c && !pthread_create(&threadid, &attr, ss_thread, c)) {
|
||||||
if (option_verbose > 2)
|
if (option_verbose > 2)
|
||||||
|
2
pbx.c
2
pbx.c
@@ -1106,7 +1106,7 @@ void pbx_substitute_variables_helper(struct ast_channel *c,const char *cp1,char
|
|||||||
brackets--;
|
brackets--;
|
||||||
} else if ((vare[0] == '$') && (vare[1] == '{')) {
|
} else if ((vare[0] == '$') && (vare[1] == '{')) {
|
||||||
needsub++;
|
needsub++;
|
||||||
vare++
|
vare++;
|
||||||
}
|
}
|
||||||
vare++;
|
vare++;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user