Hi Vadim,

As said Jérôme, it was meant to remove the Route header that is equal to the
address of the outbound proxy. That route header is not necessary and it
causes problems to some SIP proxies. The code is 'horrible' while waiting
for a global refactoring of eXosip.

Regards, 

Minh


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:wengophone-
> [EMAIL PROTECTED] On Behalf Of Jérôme WAGNER
> Sent: jeudi 7 décembre 2006 15:00
> To: [EMAIL PROTECTED]; [email protected]
> Subject: [Wengophone-devel] RE: [Wengophone-commit] r8711 - inwengophone-
> ng/trunk/wifo: eXosip/src phapi
> 
> Hello,
> 
> I'll let Minh explain.
> The code here is horrible (remove and then add the header in the exosip
> struct).
> 
> The goal is to remove the Route header from some requests (mostly INVITE)
> because this header creates problem with routing and other softphones such
> as sjphone do not add it
> 
> Jérôme
> 
> -----Message d'origine-----
> De : Vadim Lebedev [mailto:[EMAIL PROTECTED]
> Envoyé : mercredi 6 décembre 2006 20:21
> À : [email protected]; 'Jérôme WAGNER'
> Objet : Re: [Wengophone-commit] r8711 - in wengophone-ng/trunk/wifo:
> eXosip/src phapi
> 
> 
> 
> >Modified: wengophone-ng/trunk/wifo/eXosip/src/jcallback.c
> >===================================================================
> >--- wengophone-ng/trunk/wifo/eXosip/src/jcallback.c  2006-12-03 15:06:49
> UTC (rev 8710)
> >+++ wengophone-ng/trunk/wifo/eXosip/src/jcallback.c  2006-12-03 15:28:28
> UTC (rev 8711)
> >@@ -262,8 +262,20 @@
> >   freeaddrinfo (addrinfo);
> >
> >   if (o_proxy)
> >+  {
> >     osip_route_free(o_proxy);
> >+    o_proxy = 0;
> >+  }
> >
> >+    /* Check if the first route header is the same as the destination
> address */
> >+    /* Remove it just before creating the SIP buffer to send, and then
> add it */
> >+    /* again to avoid non desired behavior in eXosip */
> >+    osip_message_get_route(sip, 0, &o_proxy);
> >+    if (o_proxy && o_proxy->url && (strcmp(o_proxy->url->host, host) ==
> 0))
> >+    {
> >+            osip_list_remove_element(sip->routes, o_proxy);
> >+    }
> >+
> >   /* sVoIP integration */
> >   // SPIKE_SRTP: Check if a outgoing packet has to be processed by sVoIP
> >   if (tr)
> >@@ -298,6 +310,12 @@
> >
> >   i = osip_message_to_str(sip, &message, &length);
> >
> >+    //JULIEN: re-add the previously removed route header
> >+    if (o_proxy)
> >+    {
> >+            osip_list_add(sip->routes, o_proxy, 0);
> >+    }
> >+
> >   if (i!=0 || length<=0) {
> >     return -1;
> >   }
> >
> >
> >
> 
> 
> Jerome could you please explain why this is needed?
> Thanks
> Vadim
> 
> _______________________________________________
> Wengophone-devel mailing list
> [email protected]
> http://dev.openwengo.com/mailman/listinfo/wengophone-devel

_______________________________________________
Wengophone-devel mailing list
[email protected]
http://dev.openwengo.com/mailman/listinfo/wengophone-devel

Reply via email to