Hi,

The Refer-To Number is correct, but I want to transfer to an unknown
number (unknown on the PBX side). I have tested this scenario with some
others PBX's and they response f.e. with Forbidden. In that case the
dialog will not be destroyed. Therefore I think this should also work
with Asterisk. With the attached patch, it works perfectly!

Best regards,
Bernhard Suttner

Am Donnerstag, den 15.01.2009, 15:19 +0200 schrieb Pekka Pessi:
> 2009/1/14 Bernhard Suttner <bernhard.sutt...@comdasys.com>:
> > So, if you have an Asterisk PBX, you have to allow the 484, because
> > Asterisk PBX will cancel the REFER with 484.
> 
> It does not like your Refer-To header?
> 
> > sip/sip_util.c
> >
> >  case 484: /* Address Incomplete */
> >  case 485: /* Ambiguous */
> >    /** @par 484 Address Incomplete and 485 Ambiguous
> >
> >      Similar to 404 and 410, these
> >      responses came to a request whose Request-URI was provided by the
> >      peer in a @Contact header field.  Something has gone fundamentally
> >      wrong, and the dialog and all of its usages are destroyed.
> >    */
> >    if (method == sip_method_refer)
> >    {
> >      *return_graceful_terminate_usage = 0;
> >      return 0;
> >    }
> >    return terminate_dialog;
> >
> > If that is also interessting for the main branch, I can create an patch!
> 
> Please do. Could you also add some explanation in a comment?
> 
--- sofia-sip-1.12.9.X/libsofia-sip-ua/sip/sip_util.c.orig	2008-11-10 16:12:21.000000000 +0100
+++ sofia-sip-1.12.9.X/libsofia-sip-ua/sip/sip_util.c	2009-01-15 08:44:40.000000000 +0100
@@ -1172,6 +1172,17 @@
       peer in a @Contact header field.  Something has gone fundamentally
       wrong, and the dialog and all of its usages are destroyed.
     */
+
+	 /* Asterisk (v 1.2.7.1) does response with 484 if a client does send a refer
+	    with a Refer-to header to an unknown number.  This is therefore not 
+		fundamentally wrong and the dialog should not be destroyed!
+	 */
+    if (method == sip_method_refer)
+    {
+      *return_graceful_terminate_usage = 0;
+      return 0;
+    }
+
     return terminate_dialog;
 
   case 486: /** @par 486 Busy Here 
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to