Index: channels/chan_sip.c =================================================================== --- channels/chan_sip.c (revision 403615) +++ channels/chan_sip.c (working copy) @@ -14617,19 +14617,28 @@ ast_channel_connected(callee)->id.name.str), ""), remote_display, sizeof(remote_display)); + /* QUICK HACKS: Use the real dialoginfo for proper non-magic pickup behaviour. */ + if (sip_cfg.notifyhold) { + struct sip_pvt *callee_pvt = ast_channel_tech_pvt(callee); + ast_str_append(tmp, 0, "\n", + exten, callee_pvt->callid, callee_pvt->theirtag, callee_pvt->tag); + } + ast_channel_unlock(callee); callee = ast_channel_unref(callee); + if (sip_cfg.notifyhold) callee = (void*)0x1; /* QUICK HACKS: mark that we already added a dialog element */ } /* We create a fake call-id which the phone will send back in an INVITE Replaces header which we can grab and do some magic with. */ - if (sip_cfg.pedanticsipchecking) { + if (!callee && sip_cfg.pedanticsipchecking) { /* QUICKLY HACKED the !callee check */ ast_str_append(tmp, 0, "\n", exten, p->callid, p->theirtag, p->tag); - } else { + } else if (!callee) { /* QUICKLY HACKED the !callee check */ ast_str_append(tmp, 0, "\n", exten, p->callid); } + ast_str_append(tmp, 0, "\n" /* See the limitations of this above. Luckily the phone seems to still be