The Hold and CallStates code assumes that a media channel has a JingleSession. This is not true before you actually initiate the call.
It's not immediately clear to me what should happen if you RequestHold() on an uninitiated call. Should it fail? Or should it succeed, and send <hold/> as soon as you initiate?
Regardless, calling GetCallStates and RequestHold does crash Gabble; I'd like to fix this before releasing 0.7.28, so setting this bug to blocker.
The GetCallState() crash has been fixed, and will be in 0.7.28.
Downgrading the bug to critical: Hold-before-initiate crashing is not a new issue, and isn't actively causing problems, but should still be fixed ASAP.
My branch hold-before-call-starts addresses the remaining issue, as well as addressing #22031 (by forbidding answering calls you've put on hold).
Looks good. Very clear patches, nice done!
Don't forget to upgrade NEWS.
Merged; will be in 0.7.29. Thanks!