summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2009-04-06 17:03:07 +0000
committerJoshua Colp <jcolp@digium.com>2009-04-06 17:03:07 +0000
commit369ca789287164c2ebb70e71171df318aa29b785 (patch)
treed65cfe16b1b3366783b7164e7fc31711deac3665 /channels/chan_sip.c
parent4eaa651a8a67981c9bc62b709b31b23b77ad122b (diff)
Fix problem when authenticating a non-RTP dialog.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 17b7c8cbb..5b66b936e 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -13458,8 +13458,10 @@ static enum check_auth_result check_peer_ok(struct sip_pvt *p, char *of,
if (p->t38.peercapability)
p->t38.jointcapability &= p->t38.peercapability;
if (!dialog_initialize_rtp(p)) {
- ast_rtp_codecs_packetization_set(ast_rtp_instance_get_codecs(p->rtp), p->rtp, &peer->prefs);
- p->autoframing = peer->autoframing;
+ if (p->rtp) {
+ ast_rtp_codecs_packetization_set(ast_rtp_instance_get_codecs(p->rtp), p->rtp, &peer->prefs);
+ p->autoframing = peer->autoframing;
+ }
} else {
res = AUTH_RTP_FAILED;
}