linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] Problem: ?eXosip: no ACK received during 20s:


From: IVAN FERNANDEZ
Subject: Re: [Linphone-developers] Problem: ?eXosip: no ACK received during 20s: dropping call?
Date: Fri, 11 Jan 2013 14:54:58 +0100

Hi again, 

I've had to add some lines of code to this solution to prevent some memory leaks that the function introduce to the app.

In particular, it is necessary to free the created chars after use them:

osip_free(msg);

osip_free(contact);

osip_free(newContact);

osip_free(result);


Best regards...


2012/10/2 IVAN FERNANDEZ <address@hidden>
We've had to add some lines more to the solution code to prevent certain problem when the '200 OK' message doesn't include any contact field.

Here is the final solution:

...

SSL *ssl = NULL;

   

   //*************************************************

   //the modification starts here:


char *msg;

char *contact;

char *newContact;

osip_contact_t *c;

char *result = NULL;

//we get the message

osip_message_to_str(sip, &message, &length);

//check if a 200OK message

msg = strtok(message, "\n");

if (strncmp(msg, "SIP/2.0 200 OK",14) == 0){

osip_contact_init(&c);

osip_message_get_contact(sip, 0, &c);


//check if 'contact' field exists

if(c){

osip_contact_to_str(c, &contact);

//check if the ‘contact’ includes the ‘transport’ sufix

result = strstr(contact, "transport");

if (result == NULL){

contact[strlen(contact) - 1] = '\0';

newContact = (char *) osip_malloc(strlen(contact) + 16);

sprintf(newContact,"%s;transport=TLS>", contact);

/*OSIP_TRACE(osip_trace(__FILE__, __LINE__, OSIP_ERROR, NULL,

             "New Contact: %s\n", newContact));*/

//update the ‘contact’ field to include the missing ‘transport’ sufix

osip_list_remove(&sip->contacts, 0);

osip_message_set_contact(sip, newContact);

}

}

}

   //the modification ends here

   //******************************************************************


if (host == NULL) {




2012/10/1 IVAN FERNANDEZ <address@hidden>
Hi all,

Finally, after a deeper analysis of the issue, we’ve found a better solution for this problem, that looks a linphone issue after all.

The analysis has revealed that in the described scenary,  Linphone isn’t forming correctly the ‘SIP 200 OK’ message that notifies the call acceptance: the ‘contact’ field must include the ‘transport=tls’ sufix but the packet that Linphone is generating doesn’t includes this sufix, what is causing a port mismatch that causes not only this problem but any more.

In order to solve this issue we’ve had to modified the eXtl_tls.c file for appending this ‘transport=tls’ sufix to the contact field in the following way (within tls_tl_send_message function):

...

SSL *ssl = NULL;

   

   //*************************************************

   //the modification starts here:


char *msg;

char *contact;

char *newContact;

osip_contact_t *c;

char *result = NULL;

//we get the message

osip_message_to_str(sip, &message, &length);

//check if a 200OK message

msg = strtok(message, "\n");

if (strncmp(msg, "SIP/2.0 200 OK",14) == 0){

osip_contact_init(&c);

osip_message_get_contact(sip, 0, &c);

osip_contact_to_str(c, &contact);

//check if the ‘contact’ includes the ‘transport’ sufix

result = strstr(contact, "transport");

if (result == NULL){

contact[strlen(contact) - 1] = '\0';

newContact = (char *) osip_malloc(strlen(contact) + 16);

sprintf(newContact,"%s;transport=TLS>", contact);

/*OSIP_TRACE(osip_trace(__FILE__, __LINE__, OSIP_ERROR, NULL,

            "New Contact: %s\n", newContact));*/

//update the ‘contact’ field to include the missing ‘transport’ sufix

osip_list_remove(&sip->contacts, 0);

osip_message_set_contact(sip, newContact);

}

}

   //the modification ends here

   //******************************************************************


if (host == NULL) {


Any comments about this issue/solution?

Thanks and regards...


2012/8/23 Ramon Poca <address@hidden>
Then the problem is in the SIP routing setup, not on Linphone.
Breaking Linphone to fix whatever your Asterisk+opensips is doing
wrong seems an ugly fix.

If the dialog is not ACKed after a certain timeout, the UA should drop
the call. You should look at your opensips/asterisk logs to check if
it's being dropped.


> We use opensips as proxy to register the softphones and this opensips
> routes the call between the softphones throught an asterisk server.
> The problem with no ACK only appears if the called terminal is registered
> with TLS transport. Despite this lost ACK, the call is coursed without
> other problems...
> Regards
> 2012/8/22 Ramon Poca <address@hidden>
> > If no ACK is being received there might be some trouble in the call setup
> > (e.g. the SIP proxy is dropping it). What is the exact scenario?
> >
> > Ramon Poca - address@hidden
> >
> >


Ramon Poca - address@hidden

_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers




reply via email to

[Prev in Thread] Current Thread [Next in Thread]