]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
make cid rings configurable (bug #2889)
authorRussell Bryant <russell@russellbryant.com>
Thu, 30 Dec 2004 20:36:57 +0000 (20:36 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 30 Dec 2004 20:36:57 +0000 (20:36 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4608 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c
configs/zapata.conf.sample

index eb5a60a888928d244268b5f29ca94c98306ecf0f..2fce6b09d183721aa8b714fe50c4299fa794d8ea 100755 (executable)
@@ -264,6 +264,9 @@ AST_MUTEX_DEFINE_STATIC(iflock);
 
 static int ifcount = 0;
 
+/* When to send the CallerID signals (rings) */
+static int sendcalleridafter = DEFAULT_CIDRINGS;
+
 /* Protect the monitoring thread, so only one process can kill or start it, and not
    when it's doing something critical. */
 AST_MUTEX_DEFINE_STATIC(monlock);
@@ -543,6 +546,7 @@ static struct zt_pvt {
        int dtmfrelax;          /* whether to run in relaxed DTMF mode */
        int fake_event;
        int zaptrcallerid;      /* should we use the callerid from incoming call on zap transfer or not */
+       int sendcalleridafter;
 #ifdef ZAPATA_PRI
        struct zt_pri *pri;
        struct zt_pvt *bearer;
@@ -1532,7 +1536,7 @@ static int zt_call(struct ast_channel *ast, char *rdest, int timeout)
                        } else {
                                if (ioctl(p->subs[SUB_REAL].zfd, ZT_SETCADENCE, NULL))
                                        ast_log(LOG_WARNING, "Unable to reset default ring on '%s'\n", ast->name);
-                               p->cidrings = DEFAULT_CIDRINGS;
+                               p->cidrings = p->sendcalleridafter;
                        }
 
 
@@ -9595,6 +9599,8 @@ static int setup_zap(void)
                        cur_rxflash = atoi(v->value);
                } else if (!strcasecmp(v->name, "debounce")) {
                        cur_debounce = atoi(v->value);
+               } else if (!strcasecmp(v->name, "sendcalleridafter")) {
+                       sendcalleridafter = atoi(v->value);
                } else
                        ast_log(LOG_WARNING, "Ignoring %s\n", v->name);
                v = v->next;
index c692a27b8671dd6c1a794954de65c1793ca367b8..b7b660318da5da9f04e691a020d20f14eb9f8ec3 100755 (executable)
@@ -177,6 +177,13 @@ callwaiting=yes
 ;
 usecallingpres=yes
 ;
+; Some countries (UK) have ring tones with different ring tones (ring-ring),
+; which means the callerid needs to be set later on, and not just after
+; the first ring, as per the default. 
+;
+;sendcalleridafter=1
+;
+;
 ; Support Caller*ID on Call Waiting
 ;
 callwaitingcallerid=yes