mirror of
https://github.com/PentHertz/OpenBTS.git
synced 2026-05-10 12:00:03 +00:00
Fixes #692 in public. This updates the SR (ip/port) for a user on every SIP transaction. Also standardizes SR interface to use just strings, no more external char*. Will modify actual SR later.
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3236 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
parent
3f264a9e86
commit
ec026dfe2e
5 changed files with 129 additions and 115 deletions
|
|
@ -33,6 +33,7 @@
|
|||
#include <GSMConfig.h>
|
||||
#include <ControlCommon.h>
|
||||
#include <TransactionTable.h>
|
||||
#include <SubscriberRegistry.h>
|
||||
|
||||
#include <Sockets.h>
|
||||
|
||||
|
|
@ -59,6 +60,15 @@ using namespace Control;
|
|||
void SIPMessageMap::write(const std::string& call_id, osip_message_t * msg)
|
||||
{
|
||||
LOG(DEBUG) << "call_id=" << call_id << " msg=" << msg;
|
||||
string name = osip_message_get_from(msg)->url->username;
|
||||
if (!gSubscriberRegistry.imsiSet(name, "ipaddr",
|
||||
osip_message_get_from(msg)->url->host)){
|
||||
LOG(INFO) << "SR ipaddr Update Problem";
|
||||
}
|
||||
if (!gSubscriberRegistry.imsiSet(name, "port",
|
||||
gConfig.getStr("SIP.Local.Port"))){
|
||||
LOG(INFO) << "SR port Update Problem";
|
||||
}
|
||||
OSIPMessageFIFO * fifo = mMap.readNoBlock(call_id);
|
||||
if( fifo==NULL ) {
|
||||
// FIXME -- If this write fails, send "call leg non-existent" response on SIP interface.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue