int res = 0;
struct sip_pvt *p = ast_channel_tech_pvt(ast);
+ if (!p) {
+ ast_debug(1, "Asked to answer channel %s without tech pvt; ignoring\n",
+ ast_channel_name(ast));
+ return res;
+ }
sip_pvt_lock(p);
if (ast_channel_state(ast) != AST_STATE_UP) {
try_suggested_sip_codec(p);
struct sip_pvt *p = ast_channel_tech_pvt(ast);
int res = 0;
+ if (!p) {
+ ast_debug(1, "Asked to begin DTMF digit on channel %s with no pvt; ignoring\n",
+ ast_channel_name(ast));
+ return res;
+ }
+
sip_pvt_lock(p);
switch (ast_test_flag(&p->flags[0], SIP_DTMF)) {
case SIP_DTMF_INBAND:
struct sip_pvt *p = ast_channel_tech_pvt(ast);
int res = 0;
+ if (!p) {
+ ast_debug(1, "Asked to end DTMF digit on channel %s with no pvt; ignoring\n",
+ ast_channel_name(ast));
+ return res;
+ }
+
sip_pvt_lock(p);
switch (ast_test_flag(&p->flags[0], SIP_DTMF)) {
case SIP_DTMF_INFO:
struct sip_pvt *p = ast_channel_tech_pvt(ast);
int res;
+ if (!p) {
+ ast_debug(1, "Asked to transfer channel %s with no pvt; ignoring\n",
+ ast_channel_name(ast));
+ return -1;
+ }
+
if (dest == NULL) /* functions below do not take a NULL */
dest = "";
sip_pvt_lock(p);
struct sip_pvt *p = ast_channel_tech_pvt(ast);
int res = 0;
+ if (!p) {
+ ast_debug(1, "Asked to indicate condition on channel %s with no pvt; ignoring\n",
+ ast_channel_name(ast));
+ return res;
+ }
+
sip_pvt_lock(p);
switch(condition) {
case AST_CONTROL_RINGING: