Don't override calling presentation if *name* is present (bug #5405)
authorMark Spencer <markster@digium.com>
Wed, 12 Oct 2005 05:12:43 +0000 (05:12 +0000)
committerMark Spencer <markster@digium.com>
Wed, 12 Oct 2005 05:12:43 +0000 (05:12 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6748 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 371a8a8..4dae850 100755 (executable)
@@ -2909,7 +2909,10 @@ static int iax2_call(struct ast_channel *c, char *dest, int timeout)
                iax_ie_append_str(&ied, IAX_IE_CALLING_NUMBER, l);
                iax_ie_append_byte(&ied, IAX_IE_CALLINGPRES, c->cid.cid_pres);
        } else {
-               iax_ie_append_byte(&ied, IAX_IE_CALLINGPRES, AST_PRES_NUMBER_NOT_AVAILABLE);
+               if (n)
+                       iax_ie_append_byte(&ied, IAX_IE_CALLINGPRES, c->cid.cid_pres);
+               else
+                       iax_ie_append_byte(&ied, IAX_IE_CALLINGPRES, AST_PRES_NUMBER_NOT_AVAILABLE);
        }
 
        iax_ie_append_byte(&ied, IAX_IE_CALLINGTON, c->cid.cid_ton);