]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix application of global DTMF when a peer exists
authorMark Spencer <markster@digium.com>
Wed, 26 Mar 2003 21:09:56 +0000 (21:09 +0000)
committerMark Spencer <markster@digium.com>
Wed, 26 Mar 2003 21:09:56 +0000 (21:09 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@699 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_directory.c
channels/chan_sip.c

index 868badb020564e6c24f08e27042288eacae23996..00c19be6448ed93cc88334938748490fe3a05ec5 100755 (executable)
@@ -130,6 +130,10 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
        int found=0;
        char *start, *pos, *conv,*stringp=NULL;
        char fn[256];
+       if (!context || !strlen(context)) {
+               ast_log(LOG_WARNING, "Directory must be called with an argument (context in which to interpret extensions)\n");
+               return -1;
+       }
        memset(ext, 0, sizeof(ext));
        ext[0] = digit;
        res = 0;
index bca7cb76a903936c1ff16a4d233934d2cab9e193..e26350a801b0c4129354b140f685d8c8a3a2c7cb 100755 (executable)
@@ -232,7 +232,6 @@ struct sip_peer {
        int expire;
        int expirey;
        int capability;
-       int nonCodecCapability;
        int insecure;
        int nat;
        int canreinvite;
@@ -397,7 +396,6 @@ static int create_addr(struct sip_pvt *r, char *peer)
                if (!strcasecmp(p->name, peer)) {
                        found++;
                        r->capability = p->capability;
-                       r->nonCodecCapability = p->nonCodecCapability;
                        r->nat = p->nat;
                        if (r->rtp) {
                                ast_log(LOG_DEBUG, "Setting NAT on RTP to %d\n", r->nat);