diff -urN asterisk-1.6.2.11_old/channels/chan_sip.c asterisk-1.6.2.11/channels/chan_sip.c --- asterisk-1.6.2.11_old/channels/chan_sip.c 2010-08-17 18:04:36.000000000 +0200 +++ asterisk-1.6.2.11/channels/chan_sip.c 2010-08-17 18:04:46.000000000 +0200 @@ -20058,6 +20058,26 @@ } else { p->jointcapability = p->capability; ast_debug(1, "Hm.... No sdp for the moment\n"); + /* Some devices signal they want to be put off hold by sending a re-invite + *without* an SDP, which is supposed to mean "Go back to your state" + and since they put os on remote hold, we go back to off hold */ + if (ast_test_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD)) { + ast_queue_control(p->owner, AST_CONTROL_UNHOLD); + /* Activate a re-invite */ + ast_queue_frame(p->owner, &ast_null_frame); + /* Queue Manager Unhold event */ + append_history(p, "Unhold", "%s", req->data->str); + if (sip_cfg.callevents) + manager_event(EVENT_FLAG_CALL, "Hold", + "Status: Off\r\n" + "Channel: %s\r\n" + "Uniqueid: %s\r\n", + p->owner->name, + p->owner->uniqueid); + if (sip_cfg.notifyhold) + sip_peer_hold(p, FALSE); + ast_clear_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD); /* Clear both flags */ + } } if (p->do_history) /* This is a response, note what it was for */ append_history(p, "ReInv", "Re-invite received");