[svn-commits] mmichelson: branch group/v14_colp r146402 - /team/group/v14_colp/channels/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Sat Oct 4 13:54:24 CDT 2008
Author: mmichelson
Date: Sat Oct 4 13:54:24 2008
New Revision: 146402
URL: http://svn.digium.com/view/asterisk?view=rev&rev=146402
Log:
This now compiles. I will run some test calls to see if
logically, all is well
Modified:
team/group/v14_colp/channels/chan_sip.c
Modified: team/group/v14_colp/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/v14_colp/channels/chan_sip.c?view=diff&rev=146402&r1=146401&r2=146402
==============================================================================
--- team/group/v14_colp/channels/chan_sip.c (original)
+++ team/group/v14_colp/channels/chan_sip.c Sat Oct 4 13:54:24 2008
@@ -9843,14 +9843,17 @@
p->autoframing = user->autoframing;
}
/* replace callerid if rpid found, and not restricted */
- if (!ast_strlen_zero(rpid_num) && ast_test_flag(&p->flags[0], SIP_TRUSTRPID)) {
- char *tmp;
- if (*calleridname)
- ast_string_field_set(p, cid_name, calleridname);
- tmp = ast_strdupa(rpid_num);
- if (ast_is_shrinkable_phonenumber(tmp))
- ast_shrink_phone_number(tmp);
- ast_string_field_set(p, cid_num, tmp);
+ if (!get_rpid(p, req)) {
+ if (!ast_strlen_zero(user->cid_num)) {
+ char *tmp = ast_strdupa(user->cid_num);
+ if (ast_is_shrinkable_phonenumber(tmp))
+ ast_shrink_phone_number(tmp);
+ ast_string_field_set(p, cid_num, tmp);
+ }
+ if (!ast_strlen_zero(user->cid_name))
+ ast_string_field_set(p, cid_name, user->cid_name);
+ if (user->callingpres)
+ p->callingpres = user->callingpres;
}
do_setnat(p, ast_test_flag(&p->flags[0], SIP_NAT_ROUTE) );
@@ -9954,13 +9957,17 @@
peer->sipoptions = p->sipoptions;
/* replace callerid if rpid found, and not restricted */
- if (!ast_strlen_zero(rpid_num) && ast_test_flag(&p->flags[0], SIP_TRUSTRPID)) {
- char *tmp = ast_strdupa(rpid_num);
- if (*calleridname)
- ast_string_field_set(p, cid_name, calleridname);
- if (ast_is_shrinkable_phonenumber(tmp))
- ast_shrink_phone_number(tmp);
- ast_string_field_set(p, cid_num, tmp);
+ if (!get_rpid(p, req)) {
+ if (!ast_strlen_zero(peer->cid_num)) {
+ char *tmp = ast_strdupa(peer->cid_num);
+ if (ast_is_shrinkable_phonenumber(tmp))
+ ast_shrink_phone_number(tmp);
+ ast_string_field_set(p, cid_num, tmp);
+ }
+ if (!ast_strlen_zero(peer->cid_name))
+ ast_string_field_set(p, cid_name, peer->cid_name);
+ if (peer->callingpres)
+ p->callingpres = peer->callingpres;
}
do_setnat(p, ast_test_flag(&p->flags[0], SIP_NAT_ROUTE));
@@ -10057,14 +10064,10 @@
res = AUTH_FAKE_AUTH; /* reject with fake authorization request */
else
res = AUTH_SECRET_FAILED; /* we don't want any guests, authentication will fail */
- } else if (!ast_strlen_zero(rpid_num) && ast_test_flag(&p->flags[0], SIP_TRUSTRPID)) {
- char *tmp = ast_strdupa(rpid_num);
- if (*calleridname)
- ast_string_field_set(p, cid_name, calleridname);
- if (ast_is_shrinkable_phonenumber(tmp))
- ast_shrink_phone_number(tmp);
- ast_string_field_set(p, cid_num, tmp);
- }
+ } else {
+ get_rpid(p, req);
+ res = AUTH_SUCCESSFUL;
+ }
}
}
More information about the svn-commits
mailing list