Summary:ASTERISK-09593: Support for current generation of Cisco phones (79X1)
Reporter:dea (dea)Labels:
Date Opened:2007-06-05 17:05:02Date Closed:2007-07-18 14:34:21
Versions:Frequency of
Environment:Attachments:( 0) chan_skinny-new-phones.txt
( 1) chan_skinny-new-phones-v3.txt
( 2) skinny-hold-improvements.txt
( 3) skinny-redial-cleanup.txt
( 4) skinny-rollup-notmerged.diff
Description:The new phones expect server messages to be of a specific size.
Packet captures from a CallManager were used to identify the expected


Legacy phones ignore the padding (7920, 7940/7960)
Patch applies to Branches/1.4 and Trunk (with fuzz)

There may be more messages that need padding.  Messages
that need padding will generate a console message:

read() returned error: ID: ##

I can try to reproduce it against CCM and fix it, but will need
to know how it was triggered.

Tested with CIPC 2.0 against Asterisk
Comments:By: dea (dea) 2007-06-05 17:08:58

Oh, and I am not sure just how severe this is.  The code in 1.4
tries to support these phones.  They fail, but not in a manner
that impacts Asterisk.

I can see points to justify a merge in either branches/1.4 or Trunk

By: Jason Parker (jparker) 2007-06-05 17:16:35

Is there some reason that you changed soft_key_default_onhook[] ? :)

Otherwise, I think it looks good.

By: Jason Parker (jparker) 2007-06-05 17:18:57

Also, do you know the type IDs of any of these new phones?  I know that the 7921 was released recently, but we have no define for it.  I'm not sure if there are others...

By: dea (dea) 2007-06-05 18:07:17

No new phones here :-)

I have a IP Communicator softphone that is modeled on the 7971,
down to the firmware (yup in a softphone)

I thought I had pulled the soft_key_default_onhook[], I believe that
came in from 9245 which has three cool, but unrelated fixes, one of
which may be needed by the new model phones.

Oh, I am trying to buy a 7921 as soon as my var has them in stock.
If no one has a device ID by then, I'll post another patch.

By: dea (dea) 2007-06-07 12:43:28

My patch is missing a fix for clearing the display on new phones.
Such a fix is in a patch attached to 9245, but that patch also
has conflicts with trunk (changes already merged).

Should I try to marry the two patches into a unified patch for
new phone support?

By: Jason Parker (jparker) 2007-06-07 12:59:01

Yeah, let's go ahead and close this issue out, and update the other one to be for "newer" phones, and not just specifically the 7935.  Would you be willing to update the other patch with your changes?  I can take care of updating the summary and closing this issue out.

By: dea (dea) 2007-06-07 13:11:00

I'll merge the patches together.

I'd rather keep this bug open, since the title is for new phones
vs. the 7935

We also have a decision to make regarding the merge target.
The 1.4 branch tries to support the new models, but fails due
to the padding issue addressed here.  We can either make 1.4
ignore the newer phones (fewer errors in the logs, just a
'Not supported yet' message when a device tries to register,
or we can fix the padding in 1.4 as well and actually support
the new models.

By: Jason Parker (jparker) 2007-06-07 15:27:12

I decided to just do this the easy way...  Merging to 1.4 was definitely proper, since it's a bug that we're sending invalid packets.

Fixed in svn branches 1.4 and trunk in revisions 68249 and 68251. :)

By: Jason Parker (jparker) 2007-06-07 17:08:33

Re-opened at request from reporter.

By: dea (dea) 2007-06-07 18:15:28

Ok, the v3 patch is a roll up of all of the interesting bits from my
patch and slimey's patch in 9245.

If you prefer I can produce a patch is just the missing bits from
9245 without the softkey changes that already exist in Trunk.

By: sbisker (sbisker) 2007-06-08 09:55:02

Just to clarify, this patch will be merged into 1.4 and support the newer phones, explicitly the 7921?  Reason I ask is that Cisco just EOL'd the 7920 and converted all 7920 orders into 7921 orders.  I have 20 new phones on order and it would stink if asterisk didn't support the phones.

By: Jason Parker (jparker) 2007-06-08 10:00:12

It actually won't support the 7921 right away, BUT, as soon as you get them, please do get me the ID that the phone sends as the "type".  Once that's added (it's trivial and would take seconds to do), it should in theory "Just Work", if these changes (and the 7935 enbloc dialing changes) are committed.

By: Jason Parker (jparker) 2007-06-08 10:27:05

Just uploaded a patch of what remains to be merged.  Everything else in the v3 patch had already been committed to 1.4/trunk.  Is there to be more added, or should I commit and close (I can add the 7921 type ID when I get that in the future)?

By: dea (dea) 2007-06-08 10:57:47

Trivial little patch from my tree that is not really related, but greatly
and (simply) improves Hold/Resume operations.

Your rollup-notmerged diff looks good.

By: pj (pj) 2007-06-09 17:13:45

my 7961 is now correctly recognized, and basic calls working, good!
"hold/resume" is working as expected
"transfer" is not working at all - get dialtone, can type digits, but second call isn't established, (MoH to first call isn't played)
"redial" is working weird in case, when I pickup, press redial, call ringing, but remote party not answers, I pres "end call"... call isn't hangup and still ringing, softkeys on calling phone disappears and phone resets after few seconds - this all is consequence of asterisk crash/core dump
"end call" isn't working to 'refuse' incomming ringing call to skinny phone,
for outgoing call it works
other softkeys pickup/gpickup,cfbusy also not working, is would be nice to write some info into skinny.doc.txt, what features should work, and what is currently not working, to eliminate later user confusing.


(gdb) bt
#0  0xb7c4f401 in free () from /lib/i686/libc.so.6
#1  0xb71d921f in dial_exec_full (chan=0x81dd4d0, data=<value optimized out>, peerflags=0xb6df4e04, continue_exec=0x0) at app_dial.c:1730
#2  0xb71dcf52 in dial_exec (chan=0x81dd4d0, data=0xb6df8ee8) at app_dial.c:1754
#3  0x080c7680 in pbx_extension_helper (c=0x81dd4d0, con=0x0, context=0x81dd658 "zamestnanci", exten=0x81dd6a8 "320", priority=2, label=0x0,
   callerid=0x81c8628 "\200&ASTERISK-9337;\034\b\b&ASTERISK-9337;\034\b\020", action=E_SPAWN) at pbx.c:558
#4  0x080c9466 in __ast_pbx_run (c=0x81dd4d0) at pbx.c:2278
ASTERISK-1  0x080ca3b7 in ast_pbx_run (c=0x81dd4d0) at pbx.c:2647
ASTERISK-2  0xb737267c in skinny_newcall (data=0x81dd4d0) at chan_skinny.c:2500
ASTERISK-3  0x080f753b in dummy_start (data=0x8181d88) at utils.c:545
ASTERISK-4  0xb7d87192 in start_thread () from /lib/i686/libpthread.so.0
ASTERISK-5  0xb7bed90e in clone () from /lib/i686/libc.so.6

By: dea (dea) 2007-06-09 19:00:43

Good news on the 7961...

Hold/resume-  Good (more work is needed here to support multiple calls)
Transfer-   Not surprised, there is no code in the channel to handle transfers

Redial-  That's odd, but I have see it.  I thought I had it fixed though.
        What happens if you end the call by pressing speakerphone/headset
        button?  Can you get a skinny debug captured when it happens?

End Call-  Seen it, same as before these patches.  It seems to only work once
          there is an active channel.

Other softkeys-  Most do not have any code 'behind' them.  I know that
                mvanbaak is working on some of these features, and I planned
                to try to tackle the ones he is not working on.

By: pj (pj) 2007-06-10 14:29:48

ad Redial issue:
- Redial with OnHook, all softkeys dissappears (on display is RingOut), I can hangup only with pressing speaker or line button, but asterisk does not crash
- Redial with Speaker (offhook) - softkeys does not dissapears, but after some seconds, ringing call is terminated skinny phone (hangup) by no reason, with this console log:

Setting Callinfo to Pavel Jezek(324) from 320(320) on PJ(1)
   -- Asked to indicate 'Stop tone' condition on channel Skinny/324@PJ-2
skinny_hangup(Skinny/324@PJ-2) on 324@PJ
[Jun 10 21:15:23] WARNING[26819]: channel.c:1126 ast_channel_free: PBX may not have been terminated properly on 'Skinny/324@PJ-2'

calling site still rings, when I pickup or refuse/hangup on ringing site (sip softphone xlite), asterisk crashes,
in same situation (offhook dialling), but when I terminate call manually using "end call" softkey on skinny phone, asterisk immediatelly crash, with no reason message on console, same symptoms like with speakerphone are with Redial with handset offhook.

seems, that chan_skinny still doesn't recognize some messagess:
Device SEP001818B98F6A is attempting to register
   -- Device 'SEP001818B98F6A' successfully registered
Requesting capabilities
Found device: PJ
Buttontemplate requested
Adding button: 9, 1
Sending 30018 template to PJ
Received SoftKey Template Request
Received SoftKeySetReq
Received CapabilitiesRes
Adding codec capability '0 (25)'
Adding codec capability '4 (4)'
Adding codec capability '8 (2)'
Adding codec capability '0 (15)'
Adding codec capability '0 (16)'
Adding codec capability '0 (11)'
Adding codec capability '256 (12)'
Adding codec capability '256 (12)'
Adding codec capability '0 (257)'
Device capability set to '8'
Received LineStatRequest
Received Time/Date Request

date and time on 7961 is not updated or even set (it set to some random value like 00:21, 00:56 etc.), on 7920 with same skinny.conf, time/date is working fine.

By: pj (pj) 2007-06-10 14:55:32

when in idle and put handset OffHook, phone generates unknown 49 message and on display stays "volume settings bar"

Setting ringer mode to '1'.
skinny_new: tmp->nativeformats=8 fmt=8
Attempting to Clear display on Skinny 324@PJ
Clearing Display
Found device: PJ
   -- Starting simple switch on '324@PJ'

Skinny 324@PJ went on hook
Found device: PJ
skinny_hangup(Skinny/324@PJ-18) on 324@PJ
Setting ringer mode to '1'.
Found device: PJ

when "offhook" using speaker phone button, it doesn't generate this message and "volume settings bar" is not displayed.

speaker offhook:
Setting ringer mode to '1'.
skinny_new: tmp->nativeformats=8 fmt=8
Attempting to Clear display on Skinny 324@PJ
Clearing Display
Found device: PJ
   -- Starting simple switch on '324@PJ'

speaker hangup:
Skinny 324@PJ went on hook
Found device: PJ
skinny_hangup(Skinny/324@PJ-19) on 324@PJ
Setting ringer mode to '1'.
Found device: PJ

By: dea (dea) 2007-06-10 16:17:38

skinny-redial-cleanup contains-

1.  Moved test for a previous call to redial, avoids starting a
channel if there is no previous call, avoids wedged 1/2 up channels.

2.  Small softkey rework for ring-out (the template was not used in the code)

3.  Added the ring-out template to redial and speeddial processes

I can not duplicate the crash, but I suspect you had already tried one
failed redial and the second triggered the crash due to the 1/2 up channel.
By avoiding that situation, I hope I solved your crash.

By: pj (pj) 2007-06-11 03:09:21

sad to say, but  skinny-redial-cleanup.txt doesn't resolve asterisk crashing, after a while, ringing call is still terminated:
[Jun 11 09:45:32] WARNING[1198]: channel.c:1126 ast_channel_free: PBX may not have been terminated properly on 'Skinny/324@PJ-2'

possitive efect is, that softkeys menu doesn't dissapper, I can end call by pressing softkey even in case of onhook dialing.
volume bar still stays on display, when pickup handset and hangup.
I have applied all latest three patches, make clean, make, make install

By: dea (dea) 2007-06-12 18:17:13

Can you check the placed call log and let me know if it looks correct?

By: pj (pj) 2007-06-13 08:03:26

placed calls log is always empty on 7961.

premature channel hangup with message:
channel.c:1134 ast_channel_free: PBX may not have been terminated properly on 'Skinny/324@PJ2-5'
and asterisk crash occur only when I redial from offhook (also crash, when redial from offhook and terminate call manually with end call softkey),
in other cases, ie: redial with onhook, or manually dial when offhook is working fine.

persist issue with not working time/date on 7961.
volume bar is currently successfully cleared from display after pickup and hangup.

By: dea (dea) 2007-06-14 01:12:56

Kindly ignore the hold-improvements patch.  I much prefer the approach
taken in 9939.

By: Damien Wedhorn (wedhorn) 2007-06-14 03:27:59

Sorry, I should have noted in 9939 that I actually grabbed the code from your hold-improvements patch and copied it into 9939 because I was revising the hold stuff anyway.

By: pj (pj) 2007-06-14 06:55:11

without skinny-hold-improvements.txt, but with transfer2.diff patch from 9939 i can hold, but can not resume :(

By: dea (dea) 2007-06-14 12:53:13

Just to be clear, you cannot hold and resume a single call, or is the issue
that you hold a call, place another, then attempt to resume the first?

By: pj (pj) 2007-06-14 14:02:21

A has call with B
B put call on hold
A hears music on hold
B for some reason want to continue talk with A, so B press "resume" softkey, but it does nothing now. before (with your patch hold improvement patch) it was works.

By: dea (dea) 2007-06-15 18:06:11

PJ-  The hold improvements were merged into the transfer patch, as
was redial-improvements and I think all of the rollup-not-merged (for trunk)

All four patches depended on the same changes and the relationships
were getting hard to keep seperate.

So we can either focus on testing/finishing the transfer patch, or the three
unmerged patches here and I can re-work the transfer patch to stand alone.

Lastly, and this one is interesting, we need to figure out what can be
merged to 1.4.  A large portion of the patches deals with correcting
packet structures and properly setting the values in the packets.  That
is pretty clearly a valid concern for 1.4, yet the 'feature' portion of
the patches is fairly trivial.  If we do not want to enable the features
for chan_skinny in 1.4, we should seriously consider removing these features
from the softkey templates...

By: pj (pj) 2007-06-16 02:35:49

Dan, if I want to test all your latest work, is sufficient to apply this patches (to current trunk)?
chan_skinny-transfer-trunk-v2.txt from 9939
I'm little confused, what is already in trunk, or what work was moved into other patches.
I think, that all latest improvements in chan_skinny should be merged into 1.4 (regardless if it some new feature or simply bugfix), as you know, chan_skinny in 1.4 is quite useless, and probably nobody can use it for common users in production.
Also, softkeys for all features that still missing/not working (pickups, confern, cfwdall, cfwdbusy, end/refuse call), should be hidden, it's also related to DND feature, that is currently mapped to CFwdALL softkey - it's very confusing for common users.

By: dea (dea) 2007-06-16 12:25:57

With a fresh trunk checkout you should be able to use:
chan_skinny-transfer-trunk-v2.txt from 9939

To get all of the changes.  I still have a concern with my
handling of the subchannel linked list.  This channel would
greatly benefit from having all of its linked lists converted
to use the AST_LIST* macros, but I do not think I will have a
chance to do that.

Please let me know what works and what does not..

By: Michiel van Baak (mvanbaak) 2007-06-16 18:39:06

does these patches work together with my regexten/regcontext patch ? (issue 9762)
If so, we should get both into trunk :)

By: dea (dea) 2007-06-17 01:32:15

   You patch stood alone, without any dependencies, and managed to
apply with and without the remaining patches.  Of all the recent
chan_skinny changes, your regcontext/regexten is the easiest to

By: pj (pj) 2007-06-17 05:02:05

Dan, your patch chan_skinny-new-phones-v3.txt fails to apply to current svn trunk (rev69624).
11 out of 22 hunks FAILED -- saving rejects to file channels/chan_skinny.c.rej

By: dea (dea) 2007-06-17 13:21:53

Try with just a fresh Trunk checkout and chan_skinny-transfer-trunk-v2.txt

new-phones-v3 was the complete set of changes, but new-phones had already
been merged (so conflicts and rejects will happen).  The remaining three
patches ended-up in the transfer patch (which needed the changes they

By: pj (pj) 2007-06-19 05:20:52

clean svn trunk checkout (r69583M) + chan_skinny-transfer-trunk-v2.txt
I can't even dial from 7961 (regardles of onhook/offhook method), 7920 is working fine.

Received Softkey Event: New Call(0/0)
skinny_new: tmp->nativeformats=8 fmt=8
Found device: PJ2
Attempting to Clear display on Skinny 324@PJ2
Clearing Display
   -- Starting simple switch on '324@PJ2'
Found device: PJ2
Received Alarm Message: 32: Name=SEP001818B98F6A Load= SCCP41.8-2-2SR3S : Invalid SCCP message! : ID :11
Received Alarm Message: 32: Name=SEP001818B98F6A Load= SCCP41.8-2-2SR3S : Invalid SCCP message! : ID :9a

By: Jason Parker (jparker) 2007-06-19 11:34:34

Can somebody let me know which patches depend on which other patches, so I can start committing them?

The fixes from this bug should be applicable to 1.4.  The transfer patches and the regexten/regcontext feature patches will go into trunk only.

By: dea (dea) 2007-06-19 11:39:12

OK, that proved simple enough.  Merging in the transfer patch to my
svn copy caused a couple of the packet structure fixes to be reverted.

There is an updated transfer patch in 9939.

By: dea (dea) 2007-06-19 11:46:36

The V3 patch in 9939 is enough for Trunk.

For 1.4 we need:

Based on what I have learned by cleaning up the transfer patch,
more work will be needed, but it will be easier with these three

Would you also consider a softkey template patch that hides the keys
in 1.4 for functions not implimented or known to be broken?

By: Jason Parker (jparker) 2007-06-19 11:55:04

Yes, I was just about to comment in the transfer feature issue about the hiding of softkeys.  If they don't work, I agree that we should hide them.

By: Michiel van Baak (mvanbaak) 2007-06-19 12:04:55

qwell: the regcontext/regexten is a standalone patch. no others needed

By: sbisker (sbisker) 2007-07-12 11:28:29

Just received my 7921 phones.  The device ID is 365.  In chan_skinny I copied the 7920 pieces to 7921 and the phone seems to register with asterisk, but the phone still has "Registering" on the screen until a call is received.

It can receive calls fine.  
The send key doesn't work for making a call, but works fine for answering a call. crashes when attempting to make a call from the 7921G phone using the send softkey.

I have console output, debug info, and a backtrace if you thing that will help.

By: Jason Parker (jparker) 2007-07-12 11:33:03

Thanks, I added the 7921 device ID to 1.4 and trunk in revisions 74864 and 74865.

By: Digium Subversion (svnbot) 2007-07-18 14:34:21

Repository: asterisk
Revision: 75710

r75710 | qwell | 2007-07-18 14:34:20 -0500 (Wed, 18 Jul 2007) | 13 lines

Merged revisions 75707 via svnmerge from

(closes issue ASTERISK-9593)
r75707 | qwell | 2007-07-18 14:48:12 -0500 (Wed, 18 Jul 2007) | 4 lines

Fix issues with new 79x1 phones.

Issue 9887, patches by DEA