Author: sayer
Date: 2010-05-01 17:19:55 +0200 (Sat, 01 May 2010)
New Revision: 1880
Modified:
trunk/core/AmSession.cpp
trunk/core/AmSipDialog.cpp
Log:
support public_ip for contact
Modified: trunk/core/AmSession.cpp
===================================================================
--- trunk/core/AmSession.cpp 2010-05-01 15:06:11 UTC (rev 1879)
+++ trunk/core/AmSession.cpp 2010-05-01 15:19:55 UTC (rev 1880)
@@ -784,6 +784,7 @@
case AmSipDialog::Pending:
switch(reply.code){
+ // todo: 180 with body (remote rbt)
case 180: {
onRinging(reply);
@@ -972,8 +973,7 @@
}
// Utility for basic NAT handling: allow the config file to specify the IP
-// address to use in SDP bodies and Contact header.
-// TODO: Contact header! :)
+// address to use in SDP bodies
string AmSession::advertisedIP()
{
string set_ip = AmConfig::PublicIP; // "public_ip" parameter.
Modified: trunk/core/AmSipDialog.cpp
===================================================================
--- trunk/core/AmSipDialog.cpp 2010-05-01 15:06:11 UTC (rev 1879)
+++ trunk/core/AmSipDialog.cpp 2010-05-01 15:19:55 UTC (rev 1880)
@@ -332,7 +332,9 @@
contact_uri += user + "@";
}
- contact_uri += AmConfig::LocalSIPIP + ":";
+
+ contact_uri += AmConfig::PublicIP.empty() ?
+ AmConfig::LocalSIPIP : AmConfig::PublicIP + ":";
contact_uri += int2str(AmConfig::LocalSIPPort);
contact_uri += ">";
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev