Summary:ASTERISK-10003: Display on 792x phones is incorrect for outbound calls that have Macros
Reporter:sbisker (sbisker)Labels:
Date Opened:2007-08-01 14:08:32Date Closed:2007-08-02 09:59:27
Versions:Frequency of
Environment:Attachments:( 0) chan_skinny-macro-cid-fix.txt
( 1) chan_skinny-macro-cid-fix-v2.txt
( 2) skinny-10358-macroexten.diff
Description:When making a call from a 7920/7921 phone (could be other's as well) the dialing phone show Macro information instead of $EXTEN.

If my dialplan is Dial(Skinny/5500@5500)  then the dialing 7920 phone displays

To 5500 (5500)  

It's slightly different on the 7921 because it has a small image in place of the word "To"

If I have a Macro in my dialplan  Macro(stdexten,5500,Skinny/5500@5500) then the phone displays the extension portion of the Macro which is the letter s

To s (s)

Any ideas?
Comments:By: dea (dea) 2007-08-01 16:35:57

All skinny phones are impacted by this.  The fix is to test to see if
the channel has macroexten set, which would hold the originally dialed
extension if we are in a macro, and use it instead of the current exten.

Lightly tested on my phones.

** Edit **
Would an administrator please delete chan_skinny-macro-cid-fix.txt, the patch is damaged.

By: Jason Parker (jparker) 2007-08-01 16:52:38

Uploaded new but similar patch.  This uses the S_OR macro (comes in handy for these things) and changes a few more instances of ast->exten

edit: The S_OR macro checks whether the first argument is NULL or an empty string.  If it is not, then it uses it, otherwise it uses the second argument.

Basically something like (note that I'm using = rather than ast_copy_string, for ease of readability):

if (arg1 && !ast_strlen_zero(arg))
   ret = arg1;
   ret = arg2;


ret = S_OR(arg1, arg2);

By: dea (dea) 2007-08-01 17:02:00

Nice!  We get a fix and I learn something handy...

By: sbisker (sbisker) 2007-08-02 08:49:30

So the fix for this is a combo of chan_skinny-macro-cid-fix-v2.txt and skinny-10358-macroexten.diff ?

By: Jason Parker (jparker) 2007-08-02 09:30:50

Just skinny-10358-macroexten.diff :)

By: sbisker (sbisker) 2007-08-02 09:50:26

Awesome.  Works great.

By: Digium Subversion (svnbot) 2007-08-02 09:59:27

Repository: asterisk
Revision: 77895

r77895 | qwell | 2007-08-02 09:59:27 -0500 (Thu, 02 Aug 2007) | 14 lines

Merged revisions 77894 via svnmerge from

(closes issue ASTERISK-10003)
r77894 | qwell | 2007-08-02 10:15:45 -0500 (Thu, 02 Aug 2007) | 5 lines

Make sure that we show the correct extension if dialed from a macro
"From: 5555" rather than "From: s"

Issue 10358, initial patch by DEA, reworked by me to use S_OR, tested by sbisker