mirror of
https://github.com/RangeNetworks/openbts.git
synced 2025-11-12 09:25:39 +00:00
- add GSM.CallerID.Source so the source string for numeric caller id in SIP INVITES can be selected
This commit is contained in:
@@ -297,8 +297,20 @@ TranEntry *SipDialog::createMTTransaction(SipMessage *invite)
|
|||||||
{
|
{
|
||||||
// Create an incipient TranEntry. It does not have a TI yet.
|
// Create an incipient TranEntry. It does not have a TI yet.
|
||||||
TranEntry *tran = NULL;
|
TranEntry *tran = NULL;
|
||||||
//string& callerId = this->mRemoteUsername;
|
string callerId;
|
||||||
string callerId = sipRemoteDisplayname();
|
if (gConfig.getStr("GSM.CallerID.Source").compare("username") == 0) {
|
||||||
|
callerId = sipRemoteUsername();
|
||||||
|
LOG(INFO) << "source=username, callerId = " << callerId;
|
||||||
|
} else if (gConfig.getStr("GSM.CallerID.Source").compare("p-asserted-identity") == 0) {
|
||||||
|
string tmpcid = invite->msmHeaders.paramFind("P-Asserted-Identity");
|
||||||
|
unsigned first = tmpcid.find("<sip:");
|
||||||
|
unsigned last = tmpcid.find_last_of("@");
|
||||||
|
callerId = tmpcid.substr(first+5, last-first-5);
|
||||||
|
LOG(INFO) << "source=p-asserted-identity, callerId = " << callerId;
|
||||||
|
} else {
|
||||||
|
callerId = sipRemoteDisplayname();
|
||||||
|
LOG(INFO) << "source=username, callerId = " << callerId;
|
||||||
|
}
|
||||||
FullMobileId msid;
|
FullMobileId msid;
|
||||||
msid.mImsi = invite->smGetInviteImsi();
|
msid.mImsi = invite->smGetInviteImsi();
|
||||||
if (invite->isINVITE()) {
|
if (invite->isINVITE()) {
|
||||||
|
|||||||
@@ -1408,6 +1408,21 @@ ConfigurationKeyMap getConfigurationKeys()
|
|||||||
map[tmp->getName()] = *tmp;
|
map[tmp->getName()] = *tmp;
|
||||||
delete tmp;
|
delete tmp;
|
||||||
|
|
||||||
|
tmp = new ConfigurationKey("GSM.CallerID.Source","displayname",
|
||||||
|
"",
|
||||||
|
ConfigurationKey::CUSTOMERTUNE,
|
||||||
|
ConfigurationKey::CHOICE,
|
||||||
|
"displayname,username,p-asserted-identity",
|
||||||
|
false,
|
||||||
|
"The source for numeric Caller ID has traditionally been the username field. After version 4.0 this behavior "
|
||||||
|
"was changed to use the displayname field as it is a more accepted practice. This parameter will "
|
||||||
|
"allow those with existing integrations to easily return to the legacy behavior until their SIP "
|
||||||
|
"switches can be reconfigured. Additionally, using the P-Asserted-Identity header to source the "
|
||||||
|
"Caller ID number is supported."
|
||||||
|
);
|
||||||
|
map[tmp->getName()] = *tmp;
|
||||||
|
delete tmp;
|
||||||
|
|
||||||
// (pat 8-30-2013) We experienced a BTS lockup at Burning Man that I believe was caused
|
// (pat 8-30-2013) We experienced a BTS lockup at Burning Man that I believe was caused
|
||||||
// by QMax == 5 being too high. The BTS showed all channels being allocated but none being used.
|
// by QMax == 5 being too high. The BTS showed all channels being allocated but none being used.
|
||||||
// After RACH the MS listens to BCCH and CCCH for T3126, which is defined by equations
|
// After RACH the MS listens to BCCH and CCCH for T3126, which is defined by equations
|
||||||
@@ -1907,7 +1922,6 @@ ConfigurationKeyMap getConfigurationKeys()
|
|||||||
map[tmp->getName()] = *tmp;
|
map[tmp->getName()] = *tmp;
|
||||||
delete tmp;
|
delete tmp;
|
||||||
|
|
||||||
|
|
||||||
// (pat) This seems redundant with GSM.Neighbors, because if you want to limit the number of neighbors sent
|
// (pat) This seems redundant with GSM.Neighbors, because if you want to limit the number of neighbors sent
|
||||||
// you can just leave them out of GSM.Neighbors. But not quite - this is a limit on the number of neighbors
|
// you can just leave them out of GSM.Neighbors. But not quite - this is a limit on the number of neighbors
|
||||||
// from the GSM.Neighbors list who actually respond to the Peer ping.
|
// from the GSM.Neighbors list who actually respond to the Peer ping.
|
||||||
|
|||||||
Reference in New Issue
Block a user