Add subaddress support (bug #1877)
authorMark Spencer <markster@digium.com>
Fri, 25 Jun 2004 19:33:27 +0000 (19:33 +0000)
committerMark Spencer <markster@digium.com>
Fri, 25 Jun 2004 19:33:27 +0000 (19:33 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3306 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c
pbx.c

index b0e9ab6..2c48f67 100755 (executable)
@@ -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)
diff --git a/pbx.c b/pbx.c
index fc7fe10..f0e988e 100755 (executable)
--- a/pbx.c
+++ b/pbx.c
@@ -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++;
                        }