mirror of
https://github.com/RangeNetworks/openbts.git
synced 2025-11-04 05:43:14 +00:00
- upstream r8284
- temporary workaround: conditionally strip '+' from MOSMS URI so mod_sms processes it correctly if realm mode is enabled
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
#include <L3TranEntry.h>
|
#include <L3TranEntry.h>
|
||||||
#include <L3StateMachine.h>
|
#include <L3StateMachine.h>
|
||||||
#include <GSML3MMElements.h> // for L3CMServiceType
|
#include <GSML3MMElements.h> // for L3CMServiceType
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
namespace SIP {
|
namespace SIP {
|
||||||
using namespace Control;
|
using namespace Control;
|
||||||
@@ -124,8 +125,13 @@ SipDialog *SipDialog::newSipDialogMOSMS(
|
|||||||
SipDialog *dialog = new SipDialog(SIPDTMOSMS,gConfig.getStr("SIP.Proxy.SMS"),"SIP.Proxy.SMS");
|
SipDialog *dialog = new SipDialog(SIPDTMOSMS,gConfig.getStr("SIP.Proxy.SMS"),"SIP.Proxy.SMS");
|
||||||
dialog->dsSetLocalMO(fromMsId,gPeerIsBuggySmqueue ? true : false);
|
dialog->dsSetLocalMO(fromMsId,gPeerIsBuggySmqueue ? true : false);
|
||||||
string calledDomain = dialog->localIP();
|
string calledDomain = dialog->localIP();
|
||||||
dialog->dsSetRemoteUri(makeUri(calledDigits,calledDomain));
|
if (gConfig.getStr("SIP.Realm").length() > 0) {
|
||||||
|
string tmpURI = makeUri(calledDigits,calledDomain);
|
||||||
|
tmpURI.erase(std::remove(tmpURI.begin(), tmpURI.end(), '+'), tmpURI.end());
|
||||||
|
dialog->dsSetRemoteUri(tmpURI);
|
||||||
|
} else {
|
||||||
|
dialog->dsSetRemoteUri(makeUri(calledDigits,calledDomain));
|
||||||
|
}
|
||||||
dialog->smsBody = body; // Temporary until smqueue is fixed.
|
dialog->smsBody = body; // Temporary until smqueue is fixed.
|
||||||
dialog->smsContentType = contentType; // Temporary until smqueue is fixed.
|
dialog->smsContentType = contentType; // Temporary until smqueue is fixed.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user