Browse code

core: basic support for contact_params

Raphael Coeffic authored on 01/10/2013 15:46:58 • Václav Kubart committed on 16/10/2013 09:19:56
Showing 2 changed files
... ...
@@ -105,13 +105,18 @@ string AmBasicSipDialog::getContactHdr()
105 105
   if(!ext_local_tag.empty()) {
106 106
     contact_uri += local_tag + "@";
107 107
   }
108
-    
108
+
109 109
   int oif = getOutboundIf();
110 110
   assert(oif >= 0);
111 111
   assert(oif < (int)AmConfig::SIP_Ifs.size());
112 112
   
113 113
   contact_uri += AmConfig::SIP_Ifs[oif].getIP();
114 114
   contact_uri += ":" + int2str(AmConfig::SIP_Ifs[oif].LocalPort);
115
+
116
+  if(!contact_params.empty()) {
117
+    contact_uri += ";" + contact_params;
118
+  }
119
+
115 120
   contact_uri += ">" CRLF;
116 121
 
117 122
   return contact_uri;
... ...
@@ -95,6 +95,8 @@ protected:
95 95
   string remote_tag;
96 96
   string first_branch;
97 97
 
98
+  string contact_params; // params in Contact-HF
99
+
98 100
   string user;         // local user
99 101
   string domain;       // local domain
100 102
 
... ...
@@ -249,6 +251,10 @@ public:
249 251
   virtual void setExtLocalTag(const string& new_ext_tag)
250 252
   { ext_local_tag = new_ext_tag; }
251 253
 
254
+  const string& getContactParams() const { return contact_params; }
255
+  virtual void setContactParams(const string& new_contact_params)
256
+  { contact_params = new_contact_params; }
257
+
252 258
   const string& getUser() const { return user; }
253 259
   virtual void setUser(const string& new_user)
254 260
   { user = new_user; }