mirror of https://github.com/sipwise/sems.git
parent
dc868916e6
commit
89c3172468
@ -0,0 +1,186 @@
|
||||
--- a/apps/sw_vsc/SW_Vsc.cpp
|
||||
+++ b/apps/sw_vsc/SW_Vsc.cpp
|
||||
@@ -1214,36 +1214,36 @@ void SW_VscDialog::onInvite(const AmSipR
|
||||
if ((ret = regexec(&m_patterns->cfuOnPattern,
|
||||
req.user.c_str(), 0, 0, 0)) == 0)
|
||||
{
|
||||
- if (!number2uri(req, my_handler, uuid, subId, domain, domId, 4,
|
||||
- uri, username))
|
||||
+ u_int64_t attId = getAttributeId(my_handler, "cfu");
|
||||
+ if (!attId)
|
||||
{
|
||||
filename = failAnnouncement;
|
||||
goto out;
|
||||
}
|
||||
|
||||
- u_int64_t mapId = createCFMap(my_handler, subId, uri,
|
||||
- SW_VSC_DESTSET_CFU, "cfu");
|
||||
- if (!mapId)
|
||||
+ if(!checkSubscriberProfile(my_handler, profId, attId))
|
||||
{
|
||||
filename = failAnnouncement;
|
||||
goto out;
|
||||
}
|
||||
- snprintf(map_str, sizeof(mapStr), "%llu",
|
||||
- (unsigned long long int)mapId);
|
||||
- mapStr = string(map_str);
|
||||
|
||||
- u_int64_t attId = getAttributeId(my_handler, "cfu");
|
||||
- if (!attId)
|
||||
+ if (!number2uri(req, my_handler, uuid, subId, domain, domId, 4,
|
||||
+ uri, username))
|
||||
{
|
||||
filename = failAnnouncement;
|
||||
goto out;
|
||||
}
|
||||
|
||||
- if(!checkSubscriberProfile(my_handler, profId, attId))
|
||||
+ u_int64_t mapId = createCFMap(my_handler, subId, uri,
|
||||
+ SW_VSC_DESTSET_CFU, "cfu");
|
||||
+ if (!mapId)
|
||||
{
|
||||
filename = failAnnouncement;
|
||||
goto out;
|
||||
}
|
||||
+ snprintf(map_str, sizeof(mapStr), "%llu",
|
||||
+ (unsigned long long int)mapId);
|
||||
+ mapStr = string(map_str);
|
||||
|
||||
u_int64_t prefId = getPreference(my_handler, subId, attId,
|
||||
&foundPref, &prefStr);
|
||||
@@ -1331,36 +1331,36 @@ void SW_VscDialog::onInvite(const AmSipR
|
||||
if ((ret = regexec(&m_patterns->cfbOnPattern,
|
||||
req.user.c_str(), 0, 0, 0)) == 0)
|
||||
{
|
||||
- if (!number2uri(req, my_handler, uuid, subId, domain, domId, 4,
|
||||
- uri, username))
|
||||
+ u_int64_t attId = getAttributeId(my_handler, "cfb");
|
||||
+ if (!attId)
|
||||
{
|
||||
filename = failAnnouncement;
|
||||
goto out;
|
||||
}
|
||||
|
||||
- u_int64_t mapId = createCFMap(my_handler, subId, uri,
|
||||
- SW_VSC_DESTSET_CFB, "cfb");
|
||||
- if (!mapId)
|
||||
+ if(!checkSubscriberProfile(my_handler, profId, attId))
|
||||
{
|
||||
filename = failAnnouncement;
|
||||
goto out;
|
||||
}
|
||||
- snprintf(map_str, sizeof(mapStr), "%llu",
|
||||
- (unsigned long long int)mapId);
|
||||
- mapStr = string(map_str);
|
||||
|
||||
- u_int64_t attId = getAttributeId(my_handler, "cfb");
|
||||
- if (!attId)
|
||||
+ if (!number2uri(req, my_handler, uuid, subId, domain, domId, 4,
|
||||
+ uri, username))
|
||||
{
|
||||
filename = failAnnouncement;
|
||||
goto out;
|
||||
}
|
||||
|
||||
- if(!checkSubscriberProfile(my_handler, profId, attId))
|
||||
+ u_int64_t mapId = createCFMap(my_handler, subId, uri,
|
||||
+ SW_VSC_DESTSET_CFB, "cfb");
|
||||
+ if (!mapId)
|
||||
{
|
||||
filename = failAnnouncement;
|
||||
goto out;
|
||||
}
|
||||
+ snprintf(map_str, sizeof(mapStr), "%llu",
|
||||
+ (unsigned long long int)mapId);
|
||||
+ mapStr = string(map_str);
|
||||
|
||||
u_int64_t prefId = getPreference(my_handler, subId, attId,
|
||||
&foundPref, &prefStr);
|
||||
@@ -1448,6 +1448,19 @@ void SW_VscDialog::onInvite(const AmSipR
|
||||
if ((ret = regexec(&m_patterns->cftOnPattern,
|
||||
req.user.c_str(), 0, 0, 0)) == 0)
|
||||
{
|
||||
+ u_int64_t attId = getAttributeId(my_handler, "cft");
|
||||
+ if (!attId)
|
||||
+ {
|
||||
+ filename = failAnnouncement;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ if(!checkSubscriberProfile(my_handler, profId, attId))
|
||||
+ {
|
||||
+ filename = failAnnouncement;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
string::size_type timend = req.user.find('*', 4);
|
||||
string tim = req.user.substr(4, timend - 4);
|
||||
INFO("Extracted ringtimeout of '%s' from '%s' for uuid '%s'",
|
||||
@@ -1471,19 +1484,6 @@ void SW_VscDialog::onInvite(const AmSipR
|
||||
(unsigned long long int)mapId);
|
||||
mapStr = string(map_str);
|
||||
|
||||
- u_int64_t attId = getAttributeId(my_handler, "cft");
|
||||
- if (!attId)
|
||||
- {
|
||||
- filename = failAnnouncement;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- if(!checkSubscriberProfile(my_handler, profId, attId))
|
||||
- {
|
||||
- filename = failAnnouncement;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
u_int64_t prefId = getPreference(my_handler, subId, attId,
|
||||
&foundPref, &prefStr);
|
||||
if (!prefId)
|
||||
@@ -1628,36 +1628,36 @@ void SW_VscDialog::onInvite(const AmSipR
|
||||
if ((ret = regexec(&m_patterns->cfnaOnPattern,
|
||||
req.user.c_str(), 0, 0, 0)) == 0)
|
||||
{
|
||||
- if (!number2uri(req, my_handler, uuid, subId, domain, domId, 4,
|
||||
- uri, username))
|
||||
+ u_int64_t attId = getAttributeId(my_handler, "cfna");
|
||||
+ if (!attId)
|
||||
{
|
||||
filename = failAnnouncement;
|
||||
goto out;
|
||||
}
|
||||
|
||||
- u_int64_t mapId = createCFMap(my_handler, subId, uri,
|
||||
- SW_VSC_DESTSET_CFNA, "cfna");
|
||||
- if (!mapId)
|
||||
+ if(!checkSubscriberProfile(my_handler, profId, attId))
|
||||
{
|
||||
filename = failAnnouncement;
|
||||
goto out;
|
||||
}
|
||||
- snprintf(map_str, sizeof(mapStr), "%llu",
|
||||
- (unsigned long long int)mapId);
|
||||
- mapStr = string(map_str);
|
||||
|
||||
- u_int64_t attId = getAttributeId(my_handler, "cfna");
|
||||
- if (!attId)
|
||||
+ if (!number2uri(req, my_handler, uuid, subId, domain, domId, 4,
|
||||
+ uri, username))
|
||||
{
|
||||
filename = failAnnouncement;
|
||||
goto out;
|
||||
}
|
||||
|
||||
- if(!checkSubscriberProfile(my_handler, profId, attId))
|
||||
+ u_int64_t mapId = createCFMap(my_handler, subId, uri,
|
||||
+ SW_VSC_DESTSET_CFNA, "cfna");
|
||||
+ if (!mapId)
|
||||
{
|
||||
filename = failAnnouncement;
|
||||
goto out;
|
||||
}
|
||||
+ snprintf(map_str, sizeof(mapStr), "%llu",
|
||||
+ (unsigned long long int)mapId);
|
||||
+ mapStr = string(map_str);
|
||||
|
||||
u_int64_t prefId = getPreference(my_handler, subId, attId,
|
||||
&foundPref, &prefStr);
|
||||
Loading…
Reference in new issue