Title: Untitled Document
Hello,

I also have a header modification. It is about a REFER expires.

Index: AmSipDialog.h
===================================================================
--- AmSipDialog.h    (revision 1108)
+++ AmSipDialog.h    (working copy)
@@ -176,7 +176,7 @@
   int invite(const string& hdrs, 
          const string& content_type,
          const string& body);
-  int refer(const string& refer_to);
+  int refer(const string& refer_to, int expires = -1);
   int transfer(const string& target);
   int drop();
 
Index: AmSipDialog.cpp
===================================================================
--- AmSipDialog.cpp    (revision 1108)
+++ AmSipDialog.cpp    (working copy)
@@ -449,11 +449,21 @@
   }   
 }
 
-int AmSipDialog::refer(const string& refer_to)
+int AmSipDialog::refer(const string& refer_to,
+                       int expires)
 {
   switch(status){
   case Connected:
-    return sendRequest("REFER", "", "", "Refer-To: "+refer_to);
+    if(expires > -1)
+    {
+       char tmp[22];
+       sprintf(tmp, "%d", expires);
+       return sendRequest("REFER", "", "", "Refer-To: "+refer_to+"\nExpires: "+ tmp  +"\n");
+    }
+    else
+    {
+       return sendRequest("REFER", "", "", "Refer-To: "+refer_to+"\n");
+    }
   case Disconnecting:
   case Pending:
     DBG("refer(): we are not yet connected."


If you think it would be useful to have it in the general release, please 
apply the patch.

:-)
Balu


--
  Balint Kovacs
Software Engineer
Gamma Telecom
Mobile +36 (06) 70 244 6677
Phone +44 (0) 207 078 8213
Email [email protected]
Web www.gammatelecom.com
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to