[Sofia-sip-devel] DNS issue with Sres

2008-12-22 Thread Mohammed Sulaiman
Hi , we are using Sofia 1.12.8 on the Windows Mobile 6 platform in a voip 
client app. 
We have come across the following issue, when making a call over 3G.
 
Sofia is using the IpHelper api on a our platform to get a list of nameservers. 
We have a situation where it obtains 2 nameservers 
 

192.168.0.1 and 10.205.65.68
 
the 3G access pointIp address is 10.47.127.102 so the first one obviously is no 
use. So there is some code in Sofia to traverse the nameservers if the query 
times out.
However we fail to connect on the socket when trying to query the 10.205.65.68, 
the connect() call in "sres_server_socket" returns Windows error 10048
 
"Only one usage of each socket address (protocol/network address/port) is 
normally permitted.""
 
sres_send_dns_query(003CD300, 0041B3D0) id=9637 A xxx.xxx.com  (to 
[192.168.0.1]:53)
sres_resolver_timer() called at 1229661607 
sres_resend_dns_query(003CD300, 0041B3D0, timeout) called 
sres_send_dns_query(003CD300, 0041B3D0) called
sres_server_socket: connect: Address already in use: 10.206.65.68:53 
sres_send_dns_query(003CD300, 0041B3D0) id=9637 A xxx.xxx.com (to 
[192.168.0.1]:53)
 
The problem is after this error sofia marks this nameserver as 'bad' 
dns->dns_error = SRES_TIME_MAX;
and never uses it again. So always keeps trying to query the unreachable server 
192.168.0.1
I've noticed running in the debugger we can query the 10.205.65.68 
nameserver as the 
connect(s, (void *)dns->dns_addr, dns->dns_addrlen) succeeds 
 Without the debugger connected it always fails.
ie slowing things down makes it work. But what I am trying to work out is why 
the initial connect on the socket fails. It seems to be because we made an 
initial query to an unreachable server and the socket is maybe still in use or 
something.
 
Has anyone seen this issue before, any ideas how to resolve.
I did try setsockopt with SO_REUSEADDR, this time connect() succeeds but the 
query doesn't get a response although this nameserver is a reachable one. So 
i'm thinking the first query to 192.168.0.1 nameserver still causing a problem.
 
One final thing i would have thought using the sres library would result in 
NAPTR query
rather than A but i am seeing only A type queries going out.
 
Thanks


  --
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


[Sofia-sip-devel] Forwarding SIP message in stateful NTA

2008-12-22 Thread Aleksander Morgado
Hi all,

I need to make SIP message forwarding in a stateful NTA, but not sure
which is the correct way to do it. I receive the incoming transaction
in the default leg, but how do I forward the SIP message to another
user? Do I need to create an outgoing transaction with
nta_outgoing_tcreate() to perform the forwarding? That seems
complicated, as I would need to put the same input headers in the new
outgoing transaction...

Is it easier to do the forwarding using an stateless callback to get
the input msg_t and just call nta_msg_tsend()?

Which would be the easiest way?

Thanks in advance,
-Aleksander

--
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


[Sofia-sip-devel] MSRP Parser

2008-12-22 Thread Della Betta Filippo
Dear Pekka, all
We are trying to implement a MSRP (RFC 4975) parser.
We are evaluating the possibility to use sofia-sip built-in parser, since MSRP 
is quite similar to SIP/HTTP protocols.
We successfully used msg_parser.awk to generate the MSRP message class and MSRP 
header classes.
The only problem we faced is regarding the parsing of first line of MSRP 
message.
Requests and responses in MSRP begins with the token MSRP followed by a space, 
but the current implementation of extract_first called by msg_extract function, 
relies on the presence of '/' char after the first token to distinguish between 
request or response(status).
Can you suggest us how to cope with this issue ?
Do you think that we should use always mc_request as first line , and choose 
later the right class ?
Do you think there is a chance to add , for instance, a function pointer to the 
msg_class_s structure to be used by extract_first for choosing between request 
and/or response(status), or something similar ?

Thanks very much in advance
Regards,
Filippo Della Betta

Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone 
indicate. La diffusione, copia o qualsiasi altra azione derivante dalla 
conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate 
ricevuto questo documento per errore siete cortesemente pregati di darne 
immediata comunicazione al mittente e di provvedere alla sua distruzione, 
Grazie.

Rispetta l'ambiente. Non stampare questa mail se non e' necessario.



www.avoicomunicare.it  Ogni giorno, il tuo luogo di dialogo.

--
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] DNS issue with Sres

2008-12-22 Thread Michael Jerris

Have you tried with the latest release (1.12.10) ?

Mike

On Dec 22, 2008, at 7:06 AM, Mohammed Sulaiman wrote:

Hi , we are using Sofia 1.12.8 on the Windows Mobile 6 platform in a  
voip client app.

We have come across the following issue, when making a call over 3G.

Sofia is using the IpHelper api on a our platform to get a list of  
nameservers. We have a situation where it obtains 2 nameservers


192.168.0.1 and 10.205.65.68

the 3G access pointIp address is 10.47.127.102 so the first one  
obviously is no use. So there is some code in Sofia to traverse the  
nameservers if the query times out.
However we fail to connect on the socket when trying to query the  
10.205.65.68, the connect() call in "sres_server_socket" returns  
Windows error 10048


"Only one usage of each socket address (protocol/network address/ 
port) is normally permitted.""


sres_send_dns_query(003CD300, 0041B3D0) id=9637 A xxx.xxx.com  (to  
[192.168.0.1]:53)

sres_resolver_timer() called at 1229661607
sres_resend_dns_query(003CD300, 0041B3D0, timeout) called  
sres_send_dns_query(003CD300, 0041B3D0) called
sres_server_socket: connect: Address already in use: 10.206.65.68:53  
sres_send_dns_query(003CD300, 0041B3D0) id=9637 A xxx.xxx.com (to  
[192.168.0.1]:53)


The problem is after this error sofia marks this nameserver as 'bad'
dns->dns_error = SRES_TIME_MAX;
and never uses it again. So always keeps trying to query the  
unreachable server 192.168.0.1
I've noticed running in the debugger we can query the 10.205.65.68  
nameserver as the

connect(s, (void *)dns->dns_addr, dns->dns_addrlen) succeeds
 Without the debugger connected it always fails.
ie slowing things down makes it work. But what I am trying to work  
out is why the initial connect on the socket fails. It seems to be  
because we made an initial query to an unreachable server and the  
socket is maybe still in use or something.


Has anyone seen this issue before, any ideas how to resolve.
I did try setsockopt with SO_REUSEADDR, this time connect() succeeds  
but the query doesn't get a response although this nameserver is a  
reachable one. So i'm thinking the first query to 192.168.0.1  
nameserver still causing a problem.


One final thing i would have thought using the sres library would  
result in NAPTR query

rather than A but i am seeing only A type queries going out.

Thanks

--
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


--
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Redirecting the log of tport module

2008-12-22 Thread Paulo Pizarro
I'm resolved this, setting the environment variables TPORT_LOG and
TPORT_DEBUG with the code above:

g_setenv("TPORT_LOG", "1", TRUE);
g_setenv("TPORT_DEBUG", "9", TRUE);



2008/12/11 Pekka Pessi 

> 2008/12/10 Stefano Sabatini :
> > I wonder if there is some way to redirect the tport log, if that's not
> > possible I'd like to know from the devs which way they suggest to
> > accomplish that modifying the source, maybe simply making tport_log
> > public should do the trick.
>
> Yes, that is possible, tport_log should be public.
>
> There is a general problem with the *_log variables that they are just
> arrays, and especially Windows (but also Symbian) seem to have lot of
> problems importing arrays from shared libraries.
>
> --
> Pekka.Pessi mail at nokia.com
>
>
> --
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you.  Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
>
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> ___
> Sofia-sip-devel mailing list
> Sofia-sip-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
>
--
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel