diff options
Diffstat (limited to 'channels/chan_sip.c')
-rwxr-xr-x | channels/chan_sip.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index c2b2f5450..a9a2c3fb3 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -3694,8 +3694,10 @@ static void initreqprep(struct sip_request *req, struct sip_pvt *p, char *cmd, c snprintf(p->lastmsg, sizeof(p->lastmsg), "Init: %s", cmd); - l = p->owner->cid.cid_num; - n = p->owner->cid.cid_name; + if (p->owner) { + l = p->owner->cid.cid_num; + n = p->owner->cid.cid_name; + } if (!l || !ast_isphonenumber(l)) l = default_callerid; /* if user want's his callerid restricted */ |