Add option to wait to be able to explicitly send ACM via the Proceeding() application...
[asterisk/asterisk.git] / channels / chan_dahdi.c
index b00bd23..081b4bb 100644 (file)
@@ -339,6 +339,8 @@ static int ringt_base = DEFAULT_RINGT;
 
 #define SS7_NAI_DYNAMIC                -1
 
 
 #define SS7_NAI_DYNAMIC                -1
 
+#define LINKSET_FLAG_EXPLICITACM (1 << 0)
+
 struct dahdi_ss7 {
        pthread_t master;                                               /*!< Thread of master */
        ast_mutex_t lock;
 struct dahdi_ss7 {
        pthread_t master;                                               /*!< Thread of master */
        ast_mutex_t lock;
@@ -359,6 +361,7 @@ struct dahdi_ss7 {
        char unknownprefix[20];                                         /*!< for unknown dialplans */
        struct ss7 *ss7;
        struct dahdi_pvt *pvts[MAX_CHANNELS];                           /*!< Member channel pvt structs */
        char unknownprefix[20];                                         /*!< for unknown dialplans */
        struct ss7 *ss7;
        struct dahdi_pvt *pvts[MAX_CHANNELS];                           /*!< Member channel pvt structs */
+       int flags;                                                      /*!< Linkset flags */
 };
 
 static struct dahdi_ss7 linksets[NUM_SPANS];
 };
 
 static struct dahdi_ss7 linksets[NUM_SPANS];
@@ -9303,8 +9306,10 @@ static void ss7_start_call(struct dahdi_pvt *p, struct dahdi_ss7 *linkset)
        if (res < 0) 
                ast_log(LOG_WARNING, "Unable to set law on channel %d\n", p->channel);
        
        if (res < 0) 
                ast_log(LOG_WARNING, "Unable to set law on channel %d\n", p->channel);
        
-       p->proceeding = 1;
-       isup_acm(ss7, p->ss7call);
+       if (!(linkset->flags & LINKSET_FLAG_EXPLICITACM)) {
+               p->proceeding = 1;
+               isup_acm(ss7, p->ss7call);
+       }
 
        ast_mutex_unlock(&linkset->lock);
        c = dahdi_new(p, AST_STATE_RING, 1, SUB_REAL, law, 0);
 
        ast_mutex_unlock(&linkset->lock);
        c = dahdi_new(p, AST_STATE_RING, 1, SUB_REAL, law, 0);