remove debug
[asterisk/asterisk.git] / channels / h323 / chan_h323.c
index c7d8217..24f9ed9 100755 (executable)
@@ -648,6 +648,10 @@ static struct ast_channel *oh323_new(struct oh323_pvt *i, int state, const char
                tmp->priority = 1;
                if (strlen(i->callerid))
                        tmp->callerid = strdup(i->callerid);
+               if (strlen(i->accountcode))
+                       strncpy(tmp->accountcode, i->accountcode, sizeof(tmp->accountcode)-1);
+               if (i->amaflags)
+                       tmp->amaflags = i->amaflags;
                if (state != AST_STATE_DOWN) {
                        if (ast_pbx_start(tmp)) {
                                ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
@@ -958,7 +962,7 @@ int setup_incoming_call(call_details_t cd)
                        if (user->host) {
                                if (strcasecmp(cd.sourceIp, inet_ntoa(user->addr.sin_addr))){
                                        ast_log(LOG_ERROR, "Call from user '%s' rejected due to non-matching IP address of '%s'\n", user->name, cd.sourceIp);
-                                       return 0;
+                       return 0;
                                }
                        }
                        if (user->incominglimit > 0) {
@@ -983,8 +987,8 @@ int setup_incoming_call(call_details_t cd)
 
                        if (strlen(user->accountcode)) {
                                strncpy(p->accountcode, user->accountcode, sizeof(p->accountcode)-1);
-                       }
-       
+                       } 
+
                        /* Increment the usage counter */
                        user->inUse++;
                }