diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-05 06:23:22 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-05 06:23:22 +0000 |
commit | a40442e17360c8b914091ee1f9f116acf8bfa1f7 (patch) | |
tree | 00e348c0ae8c148d6136f1d647a98401624b2deb /channels/chan_sip.c | |
parent | 838e178948073965c5321201fd21e96fb8b518a9 (diff) |
Only override callingpres set by rpid if user/peer preference is set. (Issue #7240)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32183 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | 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 975ad73d7..7e6a3300a 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -7739,7 +7739,8 @@ static enum check_auth_result check_user_full(struct sip_pvt *p, struct sip_requ p->amaflags = user->amaflags; p->callgroup = user->callgroup; p->pickupgroup = user->pickupgroup; - p->callingpres = user->callingpres; + if (user->callingpres) /* User callingpres setting will override RPID header */ + p->callingpres = user->callingpres; p->capability = user->capability; p->jointcapability = user->capability; p->maxcallbitrate = user->maxcallbitrate; @@ -7811,7 +7812,8 @@ static enum check_auth_result check_user_full(struct sip_pvt *p, struct sip_requ ast_string_field_set(p, peersecret, peer->secret); ast_string_field_set(p, peermd5secret, peer->md5secret); ast_string_field_set(p, subscribecontext, peer->subscribecontext); - p->callingpres = peer->callingpres; + if (peer->callingpres) /* Peer calling pres setting will override RPID */ + p->callingpres = peer->callingpres; if (peer->maxms && peer->lastms) p->timer_t1 = peer->lastms; if (ast_test_flag(&peer->flags[0], SIP_INSECURE_INVITE)) { |