Re: [Sofia-sip-devel] register time-out

2011-08-19 Thread Pekka Pessi
Hi,

2011/8/19 Nick Knight :
> I have a client which registers against a server fine. The server
> imposes a register at 3600 which turns up in the expires field. Sofia
> then tries to register at aruond 1800, which is too much before what
> the server will allow.
>
> How is this controlled? Why is sofia ignoring it?

The 3600 seconds is the maximum lifetime of the expiration. Sofia SIP
follows the practice outlined in most IETF documents to do the refresh
roughly at half the expiration time.

If you want Sofia SIp to register once in hour, propose expiration
time of 7200 seconds?

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Sofia-Sip Supported RTP Stack

2011-08-19 Thread Pekka Pessi
Hi,

2011/8/18 Meftah Tayeb :
> do sofia include a RTP stack ?
> how can i integrate existing RTP stack with Sofia ?

Please see sofsip-cli for an example of integrating a media stack with
Sofia SIP.

> and if RTP stack is integrated/supported, what codecs are supported ?
> can i inject aditional codecs to the existing RTP Stack ?

All the codecs that do not require any fancy SDP features are readily supported.

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Registration authentication problem - 904 No matching challenge

2011-08-19 Thread Pekka Pessi
Hi Laurent,

2011/8/1 Laurent Lecigne :
> I am currently stuck trying to get a Sofia SIP agent to properly register to 
> a registrar (Open IMS core).
> Whenever the agent gets challenged it does not reattempt to provide its 
> credentials : the registration keeps failing.
>
> Basically, a nua_authenticate() is triggered on nua_r_register 401 but Sofia 
> says there is no matching challenge (904) although:
>  o realm (enclosed within double quotes),  login and password provided are 
> accurate,
>  o same operation handle is used than received event (hope this is the way to 
> go).
> I expected the framework to resubmit REGISTER after this nua_authenticate() 
> call (i.e. I am not re-registering after).

Sofia-SIP does not support AKA authentication out-of-the-box. What you
need is a custom authentication client plugin. I should probably write
an example how to do it...

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Possible Memory Leak if INVITE was not succesfully.

2011-08-18 Thread Pekka Pessi
Hi Stefan,

2011/7/13 Stefan Opfermann :
> we have an application based on Sofia SIP 1.12.11 which uses directly INVITE 
> methods between two SIP User Agents without a REGISTER server.
>
> In the case that the User is still busy or the caller not allowed to call ( 
> "404 Not found" etc. ), we have noticed a memory leak on the caller side if 
> the outgoing INVITE event (nua_r_invite) has an status unequal "200 OK". We 
> tried to generate the ACK Answer by our Event Handler, so NUTAG_AUTOACK( 0 
> ) and also the automatic answer with NUTAG_AUTOACK( 1 ) option. The ACK is 
> generated correctly , but  in booth modi we lost memory.

In case of an error response (status >= 300) the ACK response is part
of the transaction and transaction layer takes care of sending it.

> The ACK Response Event "nua_r_ack" is hidden them from application.

It is just used to send nua_ack() request to stack. Application is not
supposed to see it.

> So the question is, where is the best place to free the handle ?

When you get final error response in nua_r_invite or nua_i_state with
nua_callstate_terminated?


-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] tport_check_trunc() issue

2011-08-18 Thread Pekka Pessi
Hi Arsen,

2011/7/13 Arsen Chaloyan :
> Although this is a typical race condition issue, it still seems pretty
> harmless as the goal of this function is to set tp->tp_trunc which isn't
> used currently. To get rid of this message, I have just commented out
> tport_check_trunc() but wanted to know where tp->tp_trunc was supposed to be
> used.

As far as I recall, it was supposed to be used to streamline the
receiving code path. Now we ask kernel for datagram length and then
try to receive it, I believe using the MSG_TRUNC flag was supposed to
remove one system call from that.

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Problem with sofia codec selection

2011-08-18 Thread Pekka Pessi
Hi,

2011/7/12 Olivier Deme :
> Is it possible to configure sofia to pick a selection of codecs based
> on the SDP offered by the network and the SDP specified in
> nua_respond, rather than picking a single codec?

Use SOATAG_RTP_SELECT(SOA_RTP_SELECT_COMMON).

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] bug fix in su_time0.c for MacOS X 64bit

2011-08-18 Thread Pekka Pessi
2011/7/11 Frode Isaksen :
> There is a bug in su_time0.c for MacOS X 64bit since the field tv_sec in 
> struct timeval is 64bits instead of 32bits as in su_time_t, so you cannot 
> cast su_time_t to struct timeval. This patch fixes this:

Thanks. I've applied the patch.

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] PRACK and 200 OK(INVITE) forking issue

2011-08-18 Thread Pekka Pessi
Hi Nauman,

2011/7/1 Nauman Sulaiman :
> We are handling all media (SDP) ourselves and have set PRACK to be one of the 
> methods our app handles. We are using the nua API.
>
> Can Pekka or someone say whether PRACK and forking is supported with the way  
> we are using the Stack. We've seen some posts saying there are various bugs.
>
> When PRACK is not used the first 200OK received is passed to the application 
> with cancel sent to the others. This is the behaviour we would like even when 
> PRACK is used. However it seems that when the first 183 reliable is received 
> this results in subsequent 200OK from other forks to be discarded. We just 
> want the first 200OK final response to be passed to our application 
> irrespective of which fork its from and are happy for CANCEL to be sent to 
> others.

Unfortunately PRACK (and early dialog) support is broken vis-a-vis the
forking. Sofia ditches the original invite, and treats the first early
dialog as the only one.

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] auto nua_ack with bad UIR (without destination port)

2011-08-18 Thread Pekka Pessi
Hi Ivan,

2011/7/13 Иван Чистяков :
> I send INVITE to SLFphone and recv responce 100/180/200 with bad
> Contact header (without port).
> And sofia stack trying to send auto ACK with this bad Contact header
> (without port).
> SLFphone can use non standart port, but stack trying to use default port 5060.

> How to fix it?

> ACK sip:softphone@172.16.0.129:3296 SIP/2.0

You can try to force Sofia SIP to use a certain address for next hop,
for instance, include NUTAG_PROXY("sip:172.16.0.129:3296") in
nua_invite() or nua_ack() or nua_respond() tags.

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] ipv4/ipv6 issues

2011-08-18 Thread Pekka Pessi
Hi Florian,

2011/6/29 Florian Limberger :
...
> When an ipv6 client initiates a call to a ipv4 client the call is
> properly established!!

> If ipv4 calls ipv6, the final ACK is not sent.
...
> Probably, this has something to do with the Contact header, which
> contains the transport address which has been used for registration.
> However, if ipv6 invites ipv4, everything is fine.
>
> Note, that the ipv4 only host has a link-local ipv6 address but has no
> ipv6 connectivity to the Internet.
>
> Please advise me where and how the transport for an ACK is determined
> and where in the code this can be fixed.

You are correct when you assume that the Contact header is in play. It
determines the transport for ACK, unless there happens to be some
Record-Route headers. Your proxy is supposed to add those Record-Route
headers in case it notices that caller is IPv4 and callee IPv6.
Alternatively, the IPv4-only User Agent could try to do something
clever, like still using the same proxy to send ACK it used to send
INVITE, if it cannot use the transport from Contact header.
Unfortunately, Sofia is not so clever.

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Segmentation Fault After BYE 407 Proxy Authentication

2011-08-18 Thread Pekka Pessi
Hi Jerry,

2011/6/23 Jerry Richards :
> One more thing on this.  The segmentation fault was due to the assert()
> function crashing in my phone.  This was not caused by sofia-sip.  But the
> additional comparison to sip_method_bye should be added to sofia-sip so the
> assert() does not cause a printf.

I'm afraid that does not work (in other words, the ACK sent by nua is
gibberish if the cr is BYE, because it has CSeq number different from
INVITE.)

Thanks for reporting this, I'll try to make a fix to the root cause.

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] 'Network error' on FreeBSD: how to debug?

2011-08-18 Thread Pekka Pessi
Hi Yuri,

2011/6/19 Yuri :
> On 06/18/2011 17:50, Yuri wrote:
>> recvfrom call retrieving result for DNS query never receives the result
>> for some reason.
>>
>
> I found bug in code resolving the sip-dig hang:
> in file sres_blocking.c lines
>       if (c->block->fds[i].revents | POLLERR)
>         sres_resolver_error(c->resolver, c->block->fds[i].fd);
>       if (c->block->fds[i].revents | POLLIN)
>         sres_resolver_receive(c->resolver, c->block->fds[i].fd);
>
> should look like this:
>
>       if (c->block->fds[i].revents & POLLERR)
>         sres_resolver_error(c->resolver, c->block->fds[i].fd);
>       if (c->block->fds[i].revents & POLLIN)
>         sres_resolver_receive(c->resolver, c->block->fds[i].fd);

Thanks for catching this...

> After this sip-dig works fine. But empathy still has 'Network error'.

Does your UA send DNS queries? Do they look valid? Where Sofia reads
the resolv.conf? Can you get logs from UA?

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] How to remove Supported header from outgoing request.

2011-08-18 Thread Pekka Pessi
Hi Inca,

2011/6/22 Inca Rose :
> I'm using NUA and I see that by default the Supported header is sent with 
> "timer, 100rel"
> I want to control the supported header contents and find out that 
> NUATAG_SUPPORTED only adds supported values, and only SIPTAG_SUPPORTED can 
> override it.
> I want to be able to not send Supported headers at all if the UA doesn't 
> support any extension.
> I set SIPTAG_SUPPORTED_STR("") but the stack sends the Supported header empty.
>
> There is any way to tell the stack not to send the Supported header if it is 
> empty ?

You should be able to get rid of Supported with
SIPTAG_SUPPORTED_STR((void *) -1)).

-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Invite with Multipart content

2011-08-18 Thread Pekka Pessi
Hi Harinath,

There is no decent API for sending MIME multipart from nua at the
moment. Currently, if nua notices that there is a payload, it won't
touch it. I have some doubts regarding encoding of multipart (iow, it
won't work.)

I have some ideas about the API, like including an empty SDP within
multipart or so, but unfortunately little time to work on them.
Patches are always welcome, if you feel adventurous.

--Pekka

2011/6/15 harinath nanpaly :
> I need to send INVITE message with multipart content ("application/sdp" +
>
> "application/femtointerfacemsg").
>
> I would appreciate if you could give some ideas on it.
>
>
>
> I am having hard time making the sdp body manually, which eventually goes
> into the MIME payload.
>
>
>
> Any ideas?
>
>
>
> Thanks,
>
> Harinath
>
> --
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> ___
> Sofia-sip-devel mailing list
> Sofia-sip-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
>
>



-- 
Pekka.Pessi mail at nokia.com

--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] NUTAG_WITH and BYE

2011-06-14 Thread Pekka Pessi
Hi Vladimir,

2011/6/9 Vladimir Luchko :
> Can I answer to the incoming BYE with 200 ok from the application without
> using NUTAG_WITH?
> I`ve init nua with NUTAG_AUTOANSWER(0) and NUTAG_APPL_METHOD("BYE"). Than
> I got nua_i_bye event. I want to answer 200
> with nua_resopnd(nh, 200, NULL, NUTAG_NULL()), but stack emits nua_i_error
> 500 - answer to non-existing request.

The idea is that there can be multiple transactions ongoing (e.g.,
INVITE and PRACK) at the same time.

> why I must use NUTAG_WITH to respond to BYE? What side effects can I get
> if doing something like that:

>     if (!t && (sr->sr_method == sip_method_invite || sr->sr_method ==
> sip_method_bye))
>       break;

If your application receives INVITE, then BYE, and decides to answer
to BYE before answering to INVITE, stack might get confused (answering
INVITE instead and leaving BYE server transaction hanging around).

-- 
Pekka.Pessi mail at nokia.com

--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] tls_connect() Invoked On Every Outbound INVITE

2011-06-14 Thread Pekka Pessi
Hi Jerry,

2011/6/9 Jerry Richards :
> Anyone know why sofia-sip would re-establish a TLS connection for every
> outbound INVITE?  That's what I see happening.  Logs are shown below, after
> calling nua_invite() while a TLS connection was already establised (Note:
> you'll probably see some extra logs I added to help debug this).

The tport_by_addrinfo() requires that the TLS connection was opened
with same canon name (in this case, [FD00::2A0:25FF:FE00:2ABD]) or
that the subjects from the certificate match your canon name (looks
like your subject is 200.21.3.10). Was the already open connection
inbound?

--Pekka

>
>
> Thanks,
>
> Jerry
>
>
>
>   --[452] nua: nua_invite: entering
>
> --[453] nua(0xbb04a8): sent signal r_invite
>
> --[458] nua(0xbb04a8): recv signal r_set_params
>
> --[459] nua: nua_stack_set_params: entering
>
> --[460] nua(0xbb04a8): event r_set_params 200 OK
>
> --[461] nua: nua_application_event: entering
>
> --[465] nua(0xbb04a8): recv signal r_set_params
>
> --[466] nua: nua_stack_set_params: entering
>
> --[467] nua(0xbb04a8): event r_set_params 200 OK
>
> --[468] nua: nua_application_event: entering
>
> --[472] nua(0xbb04a8): recv signal r_invite
>
> --[473] nua: nua_stack_set_params: entering
>
> --[474] nua(0xbb04a8): adding session usage
>
> --[482] nta_leg_tcreate(0xbb2fd0)
>
> --[483]    [2]outgoing_create()
>
> --[484] outgoing_create:
> [1]route_url->us_url->url_host=[FD00::2A0:25FF:FE00:2ABD]
>
> --[485] outgoing_create:
> [2]route_url->us_url->url_host=[FD00::2A0:25FF:FE00:2ABD]
>
> --[486] outgoing_create:
> [3]route_url->us_url->url_host=[FD00::2A0:25FF:FE00:2ABD]
>
> --[487] outgoing_create:
> [4]route_url->us_url->url_host=[FD00::2A0:25FF:FE00:2ABD]
>
> --[488] outgoing_create:
> [5]route_url->us_url->url_host=[FD00::2A0:25FF:FE00:2ABD]
>
> --[489] nta: selecting scheme sip
>
> --[490]    url->url_host=[FD00::2A0:25FF:FE00:2ABD]
>
> --[491]    us->us_url->url_host=[FD00::2A0:25FF:FE00:2ABD]
>
> --[492] tport_tsend(0xba7390) tpn = */[FD00::2A0:25FF:FE00:2ABD]:5061
>
> --[493] tport_resolve addrinfo = [fd00::2a0:25ff:fe00:2abd]:5061
>
> --[494] tport_by_addrinfo(0xba7390): not found by name
> */[FD00::2A0:25FF:FE00:2ABD]:5061
>
> --[495] tport_tls_connect: Entering...
>
> --[496] tport_alloc_secondary(0xba7390): new secondary tport 0xbd29d0
>
> --[497]    tls_init_secondary: SSL_new(ctx=0xbaf2d8)
>
> --[498]   ...SSL_new() returned ssl=0xbbe820
>
> --[499]    tls_init_secondary: SSL_set_bio(ssl=0xbbe820, rbio=0xbb0198,
> wbio=0xbb0198)
>
> --[500]    tls_init_secondary: SSL_set_connect_state(ssl=0xbbe820)
>
> --[501]    tls_init_secondary: SSL_set_mode(ssl=0xbbe820,
> SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER)
>
> --[502] [IPv4]tport_base_connect(TCP): bind(s=29, len=16, sin_fam=2,
> sin_port=50451=0xc513, sin_addr=0x0)
>
> --[503] [IPV6]tport_base_connect(TCP): bind(s=29, len=16, sa_fam=2,
> sin6_port=50451=0xc513,
>
> --[504]    sin6_flowinfo=0, sin6_scope_id=2, sa_data=00 00 00 00 00 00 00 00
> 28 25 bd 00 43 25 bd 00
>
> --[505] tport_tls_connect(0xbd29d0): bind(local-ip): Invalid argument
>
> --[506] [IPv4]tport_base_connect(TCP): connect(s=29, len=28, sin_fam=10,
> sin_port=50451=0xc513, sin_addr=0x0)
>
> --[507] [IPV6]tport_base_connect(TCP): connect(s=29, len=28, sa_fam=10,
> sin6_port=50451=0xc513,
>
> --[508]    sin6_flowinfo=0, sin6_scope_id=2, sa_data=fd 00 00 00 00 00 00 00
> 02 a0 25 ff fe 00 2a bd
>
> --[509] tport_tls_connect(0xbd29d0): connecting to
> tls/[fd00::2a0:25ff:fe00:2abd]:5061/sips
>
> --[510] tport(0xbd29d0): reset timer
>
> --[511] tport_queue(0xbd29d0): queueing 0xbaff08 for
> tls/[fd00::2a0:25ff:fe00:2abd]:5061
>
> --[512] nta: sent INVITE (13472340) to */[FD00::2A0:25FF:FE00:2ABD]:5061
>
> --[513] tport_pend(0xbd29d0): pending 0xbaff08 for
> tls/[fd00::2a0:25ff:fe00:2abd]:5061 (already 0)
>
> --[514] nta: timer set to 32000 ms
>
> --[515] nua(0xbb04a8): call state changed: init -> calling, sent offer
>
> --[516] nua(0xbb04a8): event i_state INVITE sent
>
> --[517] nua: nua_application_event: entering
>
> --[530] tls_connect(0xbd29d0): events CONNECTING
>
> --[531] tls_connect(0xbd29d0): events NEGOTIATING
>
> --[532] tls_connect(0xbd29d0): events NEGOTIATING
>
> --[533]    SSL_get_peer_certificate(ssl=0xbbe820)
>
> --[534]   ...SSL_get_peer_certificate() returned cert=0xbbf3b8
>
> --[535]    SSL_get_verify_result(ssl=0xbbe820) returned 0 (success)
>
> --[536]    NeedCert: TRUE
>
>  --[537]    NeedCRL: FALSE
>
>  --[538]    NeedOCSP: FALSE
>
>  --[539]    OCSP_URL:
>
>  --[540] tls_post_connection_check(0xbd29d0): Peer Certificate Subject 0:
> 200.21.3.10
>
> --[541]    goto X509_VERIFY_OK: NeedOCSP=FALSE
>
> --[542] tport_send_event(0xbd29d0) - ready to send to
> (tls/[fd00::2a0:25ff:fe00:2abd]:5061)
>
> --
>
>
>
> --
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Edit

Re: [Sofia-sip-devel] one nua, multiple accounts

2011-06-03 Thread Pekka Pessi
Hi Luca,

2011/6/1 Luca Olivetti :
>>> BTW, the documentation says that sofia-sip will generate the contact using
>>> the provided NUTAG_M_USERNAME, an equal sign and a random string, but it
>>> doesn't seem to be the case, so I didn't bother checking for the presence
>>> of an equal sign and stripping the rest in 
>>> sip->sip_request->rq_url->url_user.
>>
>> The documentation tries to be future-proof in case nua will grow
>> automatic multi-registration support.
>
> Ok, in that case, url_user will be the one supplied in NUTAG_M_USERNAME or
> will it be the complete one?
> In the latter case, is there a function to strip the auto-generated part
> or should I roll my own?

It will contain "=" and then some random data. You can strip it away
with strchr(user, '=') etc.

-- 
Pekka.Pessi mail at nokia.com

--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] one nua, multiple accounts

2011-06-01 Thread Pekka Pessi
Hi Luca,

2011/6/1 Luca Olivetti :
> BTW, the documentation says that sofia-sip will generate the contact using
> the provided NUTAG_M_USERNAME, an equal sign and a random string, but it
> doesn't seem to be the case, so I didn't bother checking for the presence
> of an equal sign and stripping the rest in sip->sip_request->rq_url->url_user.

The documentation tries to be future-proof in case nua will grow
automatic multi-registration support.

-- 
Pekka.Pessi mail at nokia.com

--
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] sofia-sip SBC reference

2011-06-01 Thread Pekka Pessi
Hi,

2011/5/27 Vladimir Luchko :
> In libsofia-sip-ua/msg/msg_tag.c : msgobjtag_dup() we can see:
>
> ---
>   memset(mo, 0, omo->msg_size);
>   mo->msg_size = omo->msg_size;
>   mo->msg_flags = omo->msg_flags;
>
>   if (mo->msg_request)
>     o = mo->msg_request;
>   else
>     o = mo->msg_status;
> ---
>
> I`ve add some trace and figure out that memset nulls mo->msg_request and
> mo->msg_status as well.
> So we do not copy the headers of the structure in any case.
> Replacing in "if-else" "mo" with "omo" works for me and it looks
> meaningfull - couse we copy headers _from_ it - not _to_ it.

Thanks for catching it, I've pushed a fix to master.

-- 
Pekka.Pessi mail at nokia.com

--
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] [patch] session compare

2011-06-01 Thread Pekka Pessi
Hi Vladimir,

2011/5/26 Владимир Лучко :
> There is a patch. There is a some typo in session compare code.
> I don`t realy sure aboute patched code version - but patch is not very big

Applied. Thanks for the patch.

-- 
Pekka.Pessi mail at nokia.com

--
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] one nua, multiple accounts

2011-06-01 Thread Pekka Pessi
Hi Luca,

2011/5/29 Luca Olivetti :
> If in nua_register I use NUTAG_M_USERNAME, can I be sure that the proxy will
> use it as a "Contact:" for every incoming request?
> If that's the case, I no longer need to rely on the "To:" header.

Yes, NUTAG_M_USERNAME is best way to implement an user agent with
multiple registrations.

The proxy is supposed to use the URL from contact. Of course, there
may be buggy proxies.

-- 
Pekka.Pessi mail at nokia.com

--
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] No ACK sent after PRACK and CANCEL

2011-05-25 Thread Pekka Pessi
Hi Inca,

2011/5/24 Inca Rose :
> I work at the NUA level so
> NTATAG_UA(1) is set internally by nua_create()

I've added test cases to nta and nua testing this scenario, and the
tests seem to pass.

Please give the latest master from gitorious.org a try:



-- 
Pekka.Pessi mail at nokia.com

--
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] No ACK sent after PRACK and CANCEL

2011-05-24 Thread Pekka Pessi
Hi,

2011/5/24 Pekka Pessi :
> 2011/5/20 Inca Rose :
>> We are experiencing a strange behavior in the following scenario:
>>
>> A: Using Sofia SIP stack
>>
>>
>> A ---> INVITE
>> A <--  183 with RSeq
>> A > PRACK
>> A <--- OK ( PARCK )
>> A <--- 180
>> A --> CANCEL
>> A <-- OK ( Cancel )
>> A <-- 487 Request terminated
>>
>> At this point I was expected A to send ACK to terminate the INVITE 
>> Transaction, but the ACK is never sent.
>>
>> In the same scenario, but without PRACK, the ACK after the 487
>
>> This is a known bug 
>
> There seems to be serious problems in processing the final answer from
> another fork in case of early dialogs. Thanks for reporting this.

Hmmm, do you happen to use NTATAG_UA(0)?

-- 
Pekka.Pessi mail at nokia.com

--
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] No ACK sent after PRACK and CANCEL

2011-05-24 Thread Pekka Pessi
Hi Inca,

2011/5/20 Inca Rose :
> We are experiencing a strange behavior in the following scenario:
>
> A: Using Sofia SIP stack
>
>
> A ---> INVITE
> A <--  183 with RSeq
> A > PRACK
> A <--- OK ( PARCK )
> A <--- 180
> A --> CANCEL
> A <-- OK ( Cancel )
> A <-- 487 Request terminated
>
> At this point I was expected A to send ACK to terminate the INVITE 
> Transaction, but the ACK is never sent.
>
> In the same scenario, but without PRACK, the ACK after the 487

> This is a known bug 

There seems to be serious problems in processing the final answer from
another fork in case of early dialogs. Thanks for reporting this.

-- 
Pekka.Pessi mail at nokia.com

--
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] MSRP Support

2011-05-20 Thread Pekka Pessi
Hi,

2011/5/3 Ubuntu Explorer :
> Are there any plans to add MSRP support to Sofia SIP in the roadmap?

We might add support for the SDP negotiation for setting up MSRP, but
I see no MSRP implementation ahead. However, feel free to contribute.
;)

-- 
Pekka.Pessi mail at nokia.com

--
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Early dialog not working after Update method

2011-05-19 Thread Pekka Pessi
Hi Matteo,

2011/5/17 Matteo :
> going on with debug, the issue is that outgoing_find does not
> check for different to_tag in provisional response.
>
> I've created a patch that "works for me" which
> handles different to_tag in provisional responses and
> manage RSeq in right way if to_tag changed.
>
> but I don't know if this is the proper way to do it.

The early dialog and especially early media with forking is, indeed,
tricky.  There was some talk with Anthony M. on media handling in that
case, but we got never around to define how the media should behave.
(Should the early media from all forks be played? Should they be
mixed? If a 200 OK is received from another fork, how it should be
handled?)

Currently, I think, nua on FreeSwitch sticks to first fork sending it
a 100rel response as you noticed.

My original idea was to handle each fork (especially with reliable 1xx
responses) in a separate nua handle and let the application (in this
case FreeSwitch) to handle all the hairiness related to media, but
perhaps there is a cleaner approach.

-- 
Pekka.Pessi mail at nokia.com

--
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] How to know remote hold in nua_i_invite event?

2011-05-03 Thread Pekka Pessi
Hi Chris,

2011/4/24 Chris :
> In sofia-sip nua reference page, it indicates we can retrieve tags
> SOATAG_ACTIVE_AUDIO() when we get a nua_i_invite event. It is useful
> if I could use that tag to check remote holding events. However, I
> found I can not get SOATAG_ACTIVE_AUDIO() in nua_i_invite event. I can
> only get its value in nua_i_state. My question is: Is there any
> possibility to check remote holding in nua_i_invite? In my design, I
> want to handle SDP negotiation in nua_i_state but all SIP related
> things in their respective events.

The current Sofia SIP version does not include the media-related tags
in nua_i_invite, however, that seems to be a bug.

I've pushed a patch fixing that into gitorious:

https://gitorious.org/sofia-sip/sofia-sip/commit/4f58617329fa8821ba1014a27e32c9292cf6f874/diffs

-- 
Pekka.Pessi mail at nokia.com

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] [PATCH] NUTAG_DETECT_NETWORK_UPDATES linux implementation

2011-04-21 Thread Pekka Pessi
Hi,

2011/4/20 Luca Olivetti :
> the following patch adds support for NUTAG_DETECT_NETWORK_UPDATES for linux
> (it's currently implemented only for OS-X).
> C is not my primary language so there could be a more elegant way to do it.

Thanks Luca. I'll try to incorporate this (and your other fixes) in Sofia.

--Pekka

> ---
>
> diff --unified --recursive 
> sofia-sip-1.12.11.orig/libsofia-sip-ua/su/su_os_nw.c 
> sofia-sip-1.12.11/libsofia-sip-ua/su/su_os_nw.c
> --- sofia-sip-1.12.11.orig/libsofia-sip-ua/su/su_os_nw.c        2011-03-11 
> 15:49:19.0 +0100
> +++ sofia-sip-1.12.11/libsofia-sip-ua/su/su_os_nw.c     2011-04-20 
> 19:57:20.0 +0200
> @@ -46,7 +46,7 @@
>  #include "sofia-sip/su_os_nw.h"
>  #include "sofia-sip/su_debug.h"
>
> -#if defined(__APPLE_CC__)
> +#if defined(__APPLE_CC__) || defined(__linux)
>  # define SU_NW_CHANGE_PTHREAD 1
>  #endif
>
> @@ -64,6 +64,14 @@
>  #include 
>  #endif /* __APPLE_CC__ */
>
> +#if defined(__linux)
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#endif /* __linux */
> +
>  struct su_network_changed_s {
>   su_root_t                  *su_root;
>   su_home_t                  *su_home;
> @@ -80,7 +88,7 @@
>   su_network_changed_magic_t *su_network_changed_magic;
>  };
>
> -#if defined(__APPLE_CC__)
> +#if defined(__APPLE_CC__) || defined(__linux)
>  static void su_nw_changed_msg_recv(su_root_magic_t *rm,
>                                   su_msg_r msg,
>                                   su_network_changed_t *snc)
> @@ -95,8 +103,9 @@
>
>   return;
>  }
> +#endif
>
> -
> +#if defined(__APPLE_CC__)
>  void nw_changed_cb(SCDynamicStoreRef store,
>                   CFArrayRef changedKeys,
>                   void *info)
> @@ -242,6 +251,86 @@
>  }
>  #endif
>
> +#if defined(__linux)
> +static void *su_start_nw_os_thread(void *ptr)
> +{
> +  su_network_changed_t *snc = (su_network_changed_t *) ptr;
> +
> +  assert(snc);
> +
> +  struct sockaddr_nl addr;
> +  int sock, len;
> +  char buffer[4096];
> +  struct nlmsghdr *nlh;
> +
> +  if ((sock = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE)) == -1) {
> +      perror("su_start_nw_os_thread: couldn't open NETLINK_ROUTE socket");
> +      return NULL;
> +  }
> +
> +  memset(&addr, 0, sizeof(addr));
> +  addr.nl_family = AF_NETLINK;
> +  addr.nl_groups = RTMGRP_IPV4_IFADDR | RTMGRP_IPV6_IFADDR;
> +  if (bind(sock, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
> +      perror("su_start_nw_os_thread: couldn't bind");
> +      return NULL;
> +  }
> +
> +  nlh = (struct nlmsghdr *)buffer;
> +  struct timeval tv;
> +  int changes;
> +  int forever;
> +
> +  while(1) {
> +    changes = 0;
> +    forever = 1;
> +    /* first notification, wait forever */
> +    tv.tv_sec = 0;
> +    tv.tv_usec = 0;
> +    setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
> +    while ((len = recv(sock, nlh, 4096, 0)) > 0) {
> +      while ((NLMSG_OK(nlh, len)) && (nlh->nlmsg_type != NLMSG_DONE)) {
> +        if (nlh->nlmsg_type == RTM_NEWADDR || nlh->nlmsg_type == RTM_DELADDR 
> ) {
> +          struct ifaddrmsg *ifa = (struct ifaddrmsg *) NLMSG_DATA(nlh);
> +         if (ifa->ifa_family == AF_INET || ifa->ifa_family == AF_INET6)
> +           changes =1;
> +        }
> +        nlh = NLMSG_NEXT(nlh, len);
> +      }
> +      if (changes && forever) {
> +       /* wait for some more notifications */
> +       forever = 0;
> +       tv.tv_sec = 2;
> +       tv.tv_usec = 0;
> +       setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
> +      }
> +    }
> +    if (errno == EAGAIN || errno == EWOULDBLOCK) {
> +      su_network_changed_t *snc2;
> +      su_msg_r rmsg = SU_MSG_R_INIT;
> +
> +      if (su_msg_create(rmsg,
> +                   su_root_task(snc->su_root),
> +                   su_root_task(snc->su_root),
> +                   su_nw_changed_msg_recv,
> +                   sizeof *snc) != SU_FAILURE) {
> +        snc2 = su_msg_data(rmsg); assert(snc2);
> +        snc2->su_root = snc->su_root;
> +        snc2->su_home = snc->su_home;
> +        snc2->su_os_thread = snc->su_os_thread;
> +        snc2->su_network_changed_cb = snc->su_network_changed_cb;
> +        snc2->su_network_changed_magic = snc->su_network_changed_magic;
> +        if (su_msg_send(rmsg) == SU_FAILURE) {
> +          su_msg_destroy(rmsg);
> +        }
> +      }
> +    } else
> +      break;
> +  }
> +  return 0;
> +}
> +#endif /* __linux */
> +
>  /** Register a callback for the network change event.
>  *
>  * @since New in @VERSION_1_12_2.
>
>
> --
> Benefiting from Server Virtualization: Beyond Initial Workload
> Consolidation -- Increasing the use of server virtualization is a top
> priority.Virtualization can reduce costs, simplify management, and improve
> application availability and disaster protection. Learn more about boosting
> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
> __

Re: [Sofia-sip-devel] Sofia uses different Call ID upon 407 authentication required

2011-04-21 Thread Pekka Pessi
Hi,

2011/4/20 Olivier Deme 

> I am trying to send a SIP MESSAGE through a SIP proxy with authentication
> turned on.
> It doesn't work because after receiving a 407 proxy authentication
> required, our application calls nua_authenticate and this results in SOFIA
> re-sending the SIP MESSAGE with credentials but a different Call-ID and from
> tag.
> The proxy then generates another 407 because it expects the second MESSAGE
> with authentication response information to have the same Call-ID.
>
> Is there a way to ensure sofia uses the same Call-ID?
> It seems to do that properly during authentication of a SIP INVITE or SIP
> REGISTER.
>

It is possible to circumvent the problem by generating the Call-Id in the
application and adding that as SIPTAG_CALL_ID() parameter to nua_message().

However, there is a problem in nta that it does not always generate a new
CSeq if such a request is retransmitted. I pushed today a fix to Gitorious
that tries to circumvent that problem.

-- 
Pekka.Pessi mail at nokia.com
--
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] NUTAG_DETECT_NETWORK_UPDATES still unimplemented under linux?

2011-04-18 Thread Pekka Pessi
Hi Luca,

2011/4/18 Luca Olivetti :
>> A2 = MD5(REGISTER:sip:ekiga.net)
>> auth_response: db79b8a5046c76654b742311b7d4a33d = 
>> MD5(53060310bbad90036d54e1954983ae4e:4dab21dbe3306f1513e34e9e24eedc00a7827bd9394f:14bd7ed1967527d3770ab1f7c12901c5)
>>  (qop=NONE)
>> svd: nta.c: 7785: outgoing_create: Assertion 
>> `tport_name_is_resolved(orq->orq_tpn)' failed.
>
> It seems the same as this one:
>
> http://www.mail-archive.com/sofia-sip-devel@lists.sourceforge.net/msg03243.html
>
> outgoing_create is using a "bogus" override_tport, here, around line 7770 of 
> nua.c,
> causing the crash

The network change is probably suffering from bit-rot.

The transport is cached in nua/outbound.c, I suppose it should drop
its reference to tport_t, too, when network change is detected. See:
https://gitorious.org/~ppessi/sofia-sip/pessi-sofia-sip/commits/network-change

-- 
Pekka.Pessi mail at nokia.com

--
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Sofia informs rtpmap non-existent in the sdp

2011-04-12 Thread Pekka Pessi
Hi,

2011/4/12 Alexsander Petry :
> The sdp of answer:
>
>    v=0
>    o=2081 1298903400 1910755662 IN IP4 192.168.46.124
>    s=A_converstion
>    c=IN IP4 192.168.46.124
>    t=0 0
>    m=audio 9000 RTP/AVP 18
>    a=rtpmap:18 G729/8000
>    a=ptime:20
>    a=fmtp:18 annexb=no
>    m=video 0 RTP/AVP 99 34 102
>    a=direction:active
>
> Sofia reported: sdp_rtpmap_t of sdp_media_t (sdp_media_t -> sdp_rtpmap_t):
>  (media audio)
>  rm_pt:18; rm_encoding:G729; rm_rate:8000; rm_fmtp:annexb=no;
> rm_params:(NULL)
>  (media VIDEO)
>  rm_pt:99; rm_encoding:""; rm_rate:(NULL); rm_fmtp:(NULL); rm_params:(NULL)
>  rm_pt:34; rm_encoding:H263; rm_rate:9; rm_fmtp:(NULL); rm_params:(NULL)
>  rm_pt:102; rm_encoding:""; rm_rate:(NULL); rm_fmtp:(NULL); rm_params:(NULL)
>
> PS: rm_encoding:"" -> empty string
>
> My problem is here: Why sofia reports rm_encoding and rm_rate for payload 34
> and nothing to others?

The payload type 34 is well-known, so Sofia knows that 34 is H.263
even if there is no rtpmap line in SDP. However, 99 and 102 are not
well-known, and if there is no rtpmap, Sofia cannot invent one.

-- 
Pekka.Pessi mail at nokia.com

--
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Handling 486 Busy Here

2011-04-12 Thread Pekka Pessi
Hi,

2011/4/11 Manuel Argüelles :
>> On client side, stack calls the ordinary response callback on client
>> transaction. If the request method is INVITE and the response status
>> is >= 300 (and the response is not internally generated), you know
>> that stack will automatically send an ACK.
>>
>> Do you want to have indication when a retransmitted error response is 
>> received?
>
> Yes, I'm on the server side, what I will like is for the program (using sofia
> sip) to realize when it receives the 486 from a client.

Technically, transction-wise Client sends method requests, like INVITE
and ACK and Server is the party that sends the response messages, like
200 or 486. Most SIP applications are both clients and servers, like
user-agents and proxies.

Here is a good introduction to SIP

http://www.iptel.org/sip/intro

and if you still wonder why you don't get the indications you want,
please read RFC 3261, especially sections 4, 5 and 17:

http://tools.ietf.org/html/rfc3261

-- 
Pekka.Pessi mail at nokia.com

--
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Handling 486 Busy Here

2011-04-11 Thread Pekka Pessi
Hi,

2011/4/11 Manuel Argüelles :
>> The ACK to error responses such as 486 is part of the transaction so
>> NTA takes care of it. What kind of notification would you like to get?

> Anything that notifies the program about this event will do.

On client side, stack calls the ordinary response callback on client
transaction. If the request method is INVITE and the response status
is >= 300 (and the response is not internally generated), you know
that stack will automatically send an ACK.

Do you want to have indication when a retransmitted error response is received?

Or do you want to have notification when the server receives the ACK?
There are no events when the transactions change their state, perhaps
there should be.

-- 
Pekka.Pessi mail at nokia.com

--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Handling 486 Busy Here

2011-04-11 Thread Pekka Pessi
Hi,

2011/4/10 Manuel Argüelles :
> I'm using an nta agent in a multi-thread application (proxy), I noticed that
> during an invite transaction if the peer returns a 486 Busy Here code, sofia
> sip seems to internally handle it and replies with an ACK, since the callback
> function doesn't gets called, is there a way to get a notification about it?

The ACK to error responses such as 486 is part of the transaction so
NTA takes care of it. What kind of notification would you like to get?

-- 
Pekka.Pessi mail at nokia.com

--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Setting sofia-sip Source Port

2011-04-05 Thread Pekka Pessi
Hi Jerry,

2011/4/4 Jerry Richards :
> This is a Govt. requirement (AS-SIP).  We can't change it.

Huh? And I thought that IMS had it bad...

>What function is invoked when reconnect is attempted if the initial connection 
>fails?

Hm. socket(), bind() and connect()?

--Pekka

> -Original Message-----
> From: Pekka Pessi [mailto:ppe...@gmail.com]
> Sent: Monday, April 04, 2011 9:14 AM
> To: Jerry Richards
> Cc: sofia-sip-devel@lists.sourceforge.net
> Subject: Re: [Sofia-sip-devel] Setting sofia-sip Source Port
>
> Hi Jerry,
>
> 2011/4/4 Jerry Richards :
>> I temporarily got it working by patching the tport_tls_connect() function to 
>> set  susa.su_port to 5061 (instead of setting it to 0).  I do use nua, so 
>> I'll try NUTAG_OUTBOUND() as you suggest.  We have a requirement that TLS 
>> connections must specifically use source port 5061 (not a random port).
>
> There is the problem you cannot reconnect once the initial connection fails 
> (as there is no way to make difference between old and new connections).
>
> Please try to reconsider the requirement, it will not work.
>
> --
> Pekka.Pessi mail at nokia.com
>
>
>



-- 
Pekka.Pessi mail at nokia.com

--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Setting sofia-sip Source Port

2011-04-04 Thread Pekka Pessi
Hi Jerry,

2011/4/4 Jerry Richards :
> I temporarily got it working by patching the tport_tls_connect() function to 
> set  susa.su_port to 5061 (instead of setting it to 0).  I do use nua, so 
> I'll try NUTAG_OUTBOUND() as you suggest.  We have a requirement that TLS 
> connections must specifically use source port 5061 (not a random port).

There is the problem you cannot reconnect once the initial connection
fails (as there is no way to make difference between old and new
connections).

Please try to reconsider the requirement, it will not work.

-- 
Pekka.Pessi mail at nokia.com

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Setting sofia-sip Source Port

2011-04-04 Thread Pekka Pessi
Hi,

2011/3/31 Jerry Richards :
> I am setting my contact address to specify port 5061 (for TLS), but a
> wireshark trace shows the message being sent with a source port of 1025.
> This is confusing the Redcom server.  How can I make sofia-sip send the
> message with the same port as is in the contact header?

Do you use nua? If so, you can set NUTAG_OUTBOUND("outbound natify
use-rport"), and Sofia will use the ephemeral source port in Contact,
too.

Otherwise, the situation is a bit more complicated. What kind of setup you have?

-- 
Pekka.Pessi mail at nokia.com

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Integrating sofia with other event loop libraries

2011-04-04 Thread Pekka Pessi
Hi,

2011/3/30 Leandro Lucarella :
> Hi, I noticed sofia has its own event loop and there is integration with
> glib event loop. It is possible (and easy) to integrate sofia with other
> event loop libraries? I'm interested in integrating it with libev
> specifically.

Integration is possible, the easiness depends how well the concepts
suit with the other event loop libraries. See various su_*_port.c
files for examples.

> If not (possible or easy ;), is it sofia thread-safe?

Sofia-SIP is threadsafe in the sense it uses no static data.

> Can I enqueue
> sofia events into my own loop and thus do the processing in another
> thread (calling sofia API from another thread, different from where
> sofia event loop is running)?

The NUA API is supposed to do suit that model, iow, you should be able
to call nua methods from multiple threads. Other APIs have some design
problems. Your idea of queuing the events sounds interesting. ;)

-- 
Pekka.Pessi mail at nokia.com

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] NOTIFY sip frag set to 503 when receiving 407 Invite response

2011-03-30 Thread Pekka Pessi
Hi,

2011/3/30 Nauman Sulaiman :
> Hi, when performing an attended transfer, when the transfer destination sends 
> a 407 to the INVITE with replaces generated by transferee, a NOTIFY with 503 
> sipfrag is sent to the transferrer. Code is here in nua_session.c
> in function nh_referral_respond. The transfer destination is in different
> domain. The resulting NOTIFY 503 sent to the transferrer makes him think the 
> transfer has failed rather than just being in progress. Is there some reason 
> for this or is it a bug?

I think it is a bug, the stack should check if the request is restartable.

--Pekka

-- 
Pekka.Pessi mail at nokia.com

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] release & debug version of test_nua.exe run differently (sofia-sip-1.12.11)

2011-03-29 Thread Pekka Pessi
Hi Allen,

2011/3/25 Allen :
> Thanks a lot for your reply.
>
> I have tried the --no-nat setting, the results are the same.
>
> Actually the log information I provided in my original email for Visual
> studio 2003 release version is already the result with BOTH --no-nat AND
> --no-proxy setting, otherwise it halts even earlier with the following
> log information:

OK. The problem is, test_nua test cases may suffer from some nasty
timing issues, but the newer check-based tests do not work at all on
Windows.

> 
> TEST NUA-2.6.1: REGISTER b to c
> test_nua: testing b_call->nh = nua_handle(b->nua, b_call, (tag_type_t)0,
> (tag_value_t)0)
> test_nua: ok: (b_call->nh = nua_handle(b->nua, b_call, (tag_type_t)0,
> (tag_value_t)0))
> nta: REGISTER (10166550): Connection refused (10061) with
> tcp/[192.168.1.5]:1685
> 
>
> I have test these release version of test_nua.exe on XP SP3, Vista
> business, and Windows 7 Home Preminum, all all have same results as the
> log shown in my original email. All these three operation systems have
> the latest patches installed.
>
> I have checked the su_init() function, it's the su_init(void) at the
> line 304 of su.c, it DOES include the code to load the _DisconnectEx
> function pointer, and I have checked the log information, the loading
> function call didn't fail.

OK, so that is not an issue.

> I am confused why the release version runs differently from debug
> version, the debug version just passes all the test cases.

The optimization has a tendency to change the work flow slightly and
exposing weaknesses and bugs not present in unoptimized versions. Of
course, the compilers always have bugs, most of them show up when
optimizing.

I wonder if the latest MSVCs allow you to debug optimized versions. If
so, please try to increase optimization level in debug version and try
to see if that helps.

> According to
> my limited experiences, it might caused by not initializing some
> varibles before using them since the debug version always set the
> varibles to zero when they are declared.

Compiler should warn about not initializing some variables. The
project files disable quite a many warnings on MSVC, please see if
enabling them reveals something.

> Would you please give me some more advices to dig into this issue? Thanks!

First, try test_nua with -s option. If it works with that, the issue
is most probably in the test suite.

You can also run test_nua with various logging options, using -e with
--log=a, --log=b or --log=c might reveal something. I'm mostly
interested in the logs from the runs that stop at test case 9.1.4 ...

-- 
Pekka.Pessi mail at nokia.com

--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Anyone still using CVS?

2011-03-25 Thread Pekka Pessi
Jerry,

2011/3/24 Jerry Richards :
> I pulled the version using darcs.  If you're now using git, what would be the 
> command line to fetch the latest source (using git)?

git clone git://gitorious.org/sofia-sip/sofia-sip.git

and afterwards

git pull

--Pekka

> -Original Message-
> From: Pekka Pessi [mailto:ppe...@gmail.com]
> Sent: Thursday, March 24, 2011 7:50 AM
> To: Jerry Richards
> Cc: sofia-sip-devel@lists.sourceforge.net
> Subject: Anyone still using CVS?
>
> Hello all,
>
> Are there a a lot of people still using CVS?
>
> As it is now, CVS is not really very useful in tracking the development, nor 
> it is very useful in tracking releases as Jerry noticed.
>
> If there is no objections, I'll stop updating the CVS repo and try to remove 
> the links to it from the Sourceforge developer pages.
>
> --
> Pekka.Pessi mail at nokia.com
>
>



-- 
Pekka.Pessi mail at nokia.com

--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


[Sofia-sip-devel] Anyone still using CVS?

2011-03-24 Thread Pekka Pessi
Hello all,

Are there a a lot of people still using CVS?

As it is now, CVS is not really very useful in tracking the
development, nor it is very useful in tracking releases as Jerry
noticed.

If there is no objections, I'll stop updating the CVS repo and try to
remove the links to it from the Sourceforge developer pages.

-- 
Pekka.Pessi mail at nokia.com

--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] soatag_local_sdp_str_ref undeclared ('soa:remove duplicate definitions')

2011-03-24 Thread Pekka Pessi
Hi Erik,

2011/3/24 Erik Habicht :
>> Looks like there was a bogus soatag_session_sdp_str_ref declaration
>> instead of soatag_local_sdp_str_ref.
>>
> Yes ... adding SOFIAPUBVAR tag_typedef_t soatag_local_sdp_str_ref; also
> solve the problem.
>
> Is SOFIAPUBVAR tag_typedef_t soatag_session_sdp_str_ref; needed any more?
>
> In my case removing SOFIAPUBVAR tag_typedef_t
> soatag_session_sdp_str_ref; works.

I think I've planned on adding SOATAG_SESSION_SDP() at some point and
the duplicate was an abortive attempt on it.

Anyways, thanks for spotting this, I've already pushed the patch to gitorious.

-- 
Pekka.Pessi mail at nokia.com

--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Good TLS Hellos But No SIP REGISTER Sent

2011-03-24 Thread Pekka Pessi
Hi Jerry,

2011/3/22 Jerry Richards :
> I am seeing an issue with TLS where the REGISTER message is not getting
> sent.  The TLS Hello/Certificate exchange seems to always happens correctly
> (which just precedes the REGISTER request).  The scenario is that it is
> previously registered and then later lose registration because of this
> issue.  Interestingly enough, it seems to be timing related, because if I
> enable all the sofia debug logging in the sofia stack, it does not have this
> problem.  Could this be a timing issue?  Any thoughts on how to resolve
> this?

How you manage your TLS connections? Do you have an active connection
during the lifetime of the  registration? Can you send other requests,
like, INVITE after a period of inactivity?

-- 
Pekka.Pessi mail at nokia.com

--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Prack

2011-03-24 Thread Pekka Pessi
Hi Vikas,

2011/3/18 Vikas Bhat :
> i am implenting early dialog in Sofia sip application using prack.
> the application is stateless using NTA modul.
>
> my application send invite with Supported header,receives 183 with RSeq.
> then the applcation tries to send the PRACK message as shown below but it
> fails
>
> orq=nta_outgoing_prack(leg,  //leg created before sending the invite
>    (nta_outgoing_t *)dialogue->orq,   // this is orq of INVITE message send
> earlier using nta_outgoing_tcreate
>    (nta_response_f *)sofia_sip_response, //call back function for
> receiving response
>    (nta_outgoing_magic_t*)dialogue,  //dialogue pointer that
> is created after sending initial INVITE
>    NULL,
>    NULL,
>    NTATAG_STATELESS(1),
>   SIPTAG_RACK(pRackHdr), //added rack header
>   TAG_END());
>
> Kindly guide me to implement Prack .

If you want to use nta_outgoing_prack(), you first have to create a
new instance of INVITE client transaction specific to the new early
dialog you want to PRACK with nta_outgoing_tagged().

When you receive an early response with Require: 100rel, you create
the new invite transaction with nta_outgoing_tagged(), and keep both
it and the original invite transaction around. Depending on your
application, you might run to a situation where the final 200 OK is
received from some other UA (or you might receive 100rel responses
from other UAs, too).

There is a disturbing @bug in nta_outgoing_tagged(), however, I
believe the leak is fixed, but the PRACK and early dialog code is not
very well tested. Please report if you run to any assert() failure.

-- 
Pekka.Pessi mail at nokia.com

--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Getting started: parsing a message

2011-03-24 Thread Pekka Pessi
Hi Bendan,

2011/3/21 Brendan Loudermilk :
> As a weekend project I've begun to play around with Sofia-SIP. I'm using FFI
> to build a simple Ruby interface to some of the lower-level functions in the
> library. My first goal is to be able to parse arbitrary strings from a Ruby
> networking library. I saw the example on this page for parsing memory, but
> I'm wondering if theres a simpler way.

What kind of strings you want to parse? Something like "Contact:
"?

> As a secondary question, what options are there for those of us who are
> interested in the SIP/SDP protocol behavior implementations, but want to
> implement our own networking? Are we forced to re-implement the various
> behavioral RFCs in our implementation? Or is there an event-based hook
> portion of Sofia that I have yet to discover?

I'm a bit loss what you want to do by yourself? Interface towards the
sockets and network? Something else?

-- 
Pekka.Pessi mail at nokia.com

--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] soatag_local_sdp_str_ref undeclared ('soa:remove duplicate definitions')

2011-03-24 Thread Pekka Pessi
Hi Erik,

2011/3/22 Erik Habicht :
> while building against the new release 1.12.11 i got the following error:
>
> soatag_local_sdp_str_ref undeclared
>
> After i revert the changes in /libsofia-sip-ua/soa/sofia-sip/soa_tag.h
> from from 'soa:remove duplicate definitions' the build finished without
> errors.
>
> Maybe the wrong 'duplicate definitions' where removed.

Looks like there was a bogus soatag_session_sdp_str_ref declaration
instead of soatag_local_sdp_str_ref.

-- 
Pekka.Pessi mail at nokia.com

--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Version 1.12.11

2011-03-24 Thread Pekka Pessi
Hi Jerry,

2011/3/23 Jerry Richards :
> I noticed the latest trunk still has the following line in the configure.ac
> file:

> AC_INIT([sofia-sip], [1.12.10devel])

> Shouldn't this line show 1.12.11?

It seems to me that I have actively forgotten about CVS. I committed
the release to CVS, too.

-- 
Pekka.Pessi mail at nokia.com

--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] release & debug version of test_nua.exe run differently (sofia-sip-1.12.11)

2011-03-24 Thread Pekka Pessi
Hi Allen,

2011/3/23 Allen Guan :
> I am new to this mail list. I have built sofia-sip-1.12.11 under XP
> SP3 and tried the test programs.
>
> I have noticed strange behaviors of the test program test_nua.exe when
> running in release version. I have tried to compiled with Visual
> studio 2003, visual studio 2005 and visual studio 2010 express. All
> the debug versions of test_nua.exe compiled with these three compilers
> run well; but the release versions hang in the middle of the running,
> I have attached the log information got when I ran these programs in
> verbose mode. Please take a look at it and give me some advices on the
> possible reasons why these release versions have issues and how to
> tune them up to make them work.

The test_nua has some problems in the way some WinSock implementations
route the local TCP/IP traffic. You can try to run it with command
line option --no-nat, and see if the problem persists.

You could also check if the su_init() manages to load the
_DisconnectEx function pointer. I was under the impression that it
should work in later XP SPs, too, but it is not first time I have made
a mistake.

-- 
Pekka.Pessi mail at nokia.com

--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


[Sofia-sip-devel] ANN: sofia-sip-1.12.11

2011-03-11 Thread Pekka Pessi
Hi all,

The Sofia-SIP release 1.12.11  is now available for download from
SourceForge.net.

Please find the release notes attached.

-- 
Pekka.Pessi mail at nokia.com

Release notes for Sofia SIP version 1.12.11 (2011-03-11)


Sofia SIP is an open-source SIP User-Agent library, compliant with
the IETF RFC3261 specification. It can be used as a building block
for SIP client software for uses such as VoIP, IM, and many other
real-time and person-to-person communication services. The primary
target platform for Sofia SIP is GNU/Linux. Sofia SIP is based on a
SIP stack developed at the Nokia Research Center. Sofia SIP is
licensed under the LGPL.


Changes since last release
--

- su_close() implemented using DisconnectEx() on Win32 (available on XP
  or later Windows). The su_close() semantics on Win32 are now similar
  to Unix/BSD.

- Application can feed hashed passwords (HA1) instead of plain text
  password to the iptsec authentication library

- Using NTATAG_EXTRA_100() with server transactions. Applications can now
  control whether stack sends extra 100 Trying responses after N1 timer
  or retransmissions.

- nta_leg_tag(leg, NULL) now always returns the tag (old or new).

- SOA uses addresses present in SDP if they are local.

- Deferrable timers were added.

- Timing out forked INVITE client transactions is now done by stack.
  The stack generates a 408 response to each INVITE transaction fork that
  has not received a final response within 32 seconds (or 64 times SIP T1)
  after first final response to the INVITE was received.

- An INVITE transaction that has been timed out with stack timer C is now
  CANCELed automatically. Previously, such INVITE client transactions
  were restarted instead of timing out under certain circumstances.

- Timing out forked INVITE client transactions is now done by stack.
  The stack generates a 408 response to each INVITE transaction fork that
  has not received a final response within 32 seconds (or 64 times SIP T1)
  after first final response to the INVITE was received.

- Added s2check library for writing check-based module tests for network 
protocols.

- User Via header with NULL host and port gets filled automatically

API/ABI changes and versioning
--

New features in API are marked with Doxytag macro @VERSION_1_12_11 or
@NEW_1_12_11.

libsofia-sip-ua:
- Added functions auth_digest_ha1(), auc_save_credentials(), and
  auc_copy_credentials()
- Added function msg_fragment_clear_chain().
- Added tag SOATAG_DELAYED_OFFER_ENABLE().
- Added tags NUTAG_AUTO302(), NUTAG_AUTO305().
- Added functions nta_outgoing_magic(), nta_agent_tports(),
  nta_leg_client_reroute().
- Added functions su_home_parent(), su_root_clone(),
  su_root_set_max_defer(), su_root_get_max_defer(),
  su_timer_deferrable(), su_timer_is_set(), su_timer_latest(),
  su_task_deferrable(), su_task_wakeup().
- Added locale-independent, NULL-safe string comparison, matching and
  searching functions:
su_strcmp(), su_strncmp(), su_strcasecmp(), su_strncasecmp(),
su_strmatch(), su_strnmatch(), su_casematch(), su_casenmatch(),
su_strncspn(), su_strnspn(), su_strcasestr(), su_memspn() and
su_memcspn().
- The mp_len type was changed from usize_t to unsigned.
  The change is binary-incompatible on 64-bit platforms when compiled with
  the configure option --disable-size-compat
- Removed globals which should have been static in first place:
  - su_t64_to_time()
  - mutex_trylocker()
  - su_port_set_system_preferences()
  - t_null_next(), t_null_move(), t_null_dup(), t_null_copy(), t_null_find()
  - t_skip_next(), t_skip_move(), t_skip_len(), t_skip_dup(), t_skip_filter()
  - t_next_next(), t_next_move(), t_next_len(), t_next_dup(), t_next_filter()
  - t_filter_with(), t_any_filter()
  - sres_record_class(), urandom
  - u2s_alloc()
  - memmem (on platforms that do not support memmem)
- This release is ABI/API compatible with applications linked against
  any 1.12.x release. However, applications built against this release won't
  work against an older library. The ABI has been tested with the nua module
  unit test (test_nua) built against original 1.12.0 release.

libsofia-sip-ua-glib:
- No ABI/API changes, compatible with 1.12.0. Note, libsofia-sip-ua-glib
  interface is not considered stable and may change in a future 1.12.x
  release.

Contributors to this release


Mikhail Zabaluev (numerous patches)
Michael Jerris (numerous patches)
Jarod Neuner (patches to TLS tport)
Stas Maximov (patch user Via processing) 
Paulo Pizarro (fixes to NTA protocol engine, add SOATAG_DELAYED_OFFER_ENABLE)
Della Betta Filippo (tport fixes, etc.)
Aleksander Morgado (patch for using NTATAG_EXTRA_100)
Kai Samposalo (Symbian build dixes)
Mathieu Rene (fix openssl build, fix stun encoding)
Stephan Knoblich (build fixes)
Bernh

Re: [Sofia-sip-devel] Incoming REFER , how does app receive status of NOTIFYs

2011-03-07 Thread Pekka Pessi
Hi Nauman,

2011/2/10 Nauman Sulaiman :
> Hi, Using latest Sofia master from git. When i get an incoming REFER the 
> stack sends NOTIFY's to the referror if i pass the event to the INVITE i 
> generate. This works very nicely.
>
> But how does the app know what NOTIFY's are being sent to the referror  ie i 
> would like to get hold of the Sipfrag, event nua_r_notify or nua_i|_state are 
> both no good.  So i need to know when 180 ringing is being sent, or if the 
> Invite generated failed eg with 486 etc.

The code is here:

http://gitorious.org/sofia-sip/sofia-sip/blobs/master/libsofia-sip-ua/nua/nua_session.c#line3019

The fragment is not sent to application. In case of autoalert or
autoanswer, the application gets the initial status from nua_i_invite.

-- 
Pekka.Pessi mail at nokia.com

--
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Setting return address/port for responses to INVITEs

2011-03-04 Thread Pekka Pessi
Hi Dan,

2011/2/15 Dan O'Donovan :
> It is my understanding that, when Sofia gets an INVITE request, it saves the
> host address/port from the UAC's Contact header and uses them to direct
> responses (and other requests for that dialog) back to the UAC.
> I'd like to be able to configure Sofia to use the actual source address/port
> that the request came from, when sending back responses (i.e. ignoring the
> Contact header).

The responses to INVITE are sent according to the Via header. In case
the client inserts rport parameter in the request, the stack already
does what you want.

However, if you want to send re-INVITEs and BYEs to the UACs source
port, you could add NUTAG_PROXY() with UAC's IP and port to the 200 Ok
response you return to UAC.

-- 
Pekka.Pessi mail at nokia.com

--
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] sofia sip stack 1.12.10 crashed in stateless mode

2011-03-04 Thread Pekka Pessi
Hi Kiran,

2011/2/26 kiran kumar :
> In my application I am destroying the invite transaction (irq) after
> receiving ack for 200 OK,
> the ACK transaction (irq) immediately after receiving the ACK.
> And that of BYE transaction (irq) after sending 200 OK.
> I am using nta_incoming_destroy(irq) method to do the same.
> 1) But while i was running the load, Sofia stack is getting crashed with the
> following assertion failure
>     for a completely new request which may be invite or bye,
>     (independent of the transaction for which i am destroying irq in the
> application).
>      sipng: nta.c:5438: incoming_queue: Assertion `*queue->q_tail == ((void
> *)0)' failed.
>      Aborted (core dumped)
>      And from the GDB findings I observed that
>      *queue->q_tail points to the irq which i was destroying in my
> application.

I think you end up destroying the same irq twice. Please doublecheck your code..

> 2) From the api documentation it is clear that the destroyed irq should be
> in disposable state up to the timer expires.
>      Please tell me when exactly this timer expires. (i.e., the default
> timer value )

The non-INVITE irqs are destroyed once the timer J expires, the timer
J duration is T1x64 (normally, 32 seconds). However, the irq can be
destroyed earlier if

1) if the NTA is not in UA mode or
2) the response was sent via TCP or TLS

> 3) Is there any way that i can put mutex locks in my application to avoid
> this synchronization problem.
> I am suspecting this behavior as bug in stack.

You should protect whole nta_agent_t with a mutex, I'm afraid.

-- 
Pekka.Pessi mail at nokia.com

--
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] sdp_rtpmap_find_matching doubt

2011-03-04 Thread Pekka Pessi
Hi Fransesco,

2011/2/27 Francesco Lamonica :
> Hi all, i have a doubt regarding the aforementioned function
> if i pass two sdp_rtpmap_t objects to that, i get as returned value a
> new struct with all the codecs of the second one that follow the first
> matching codec. is this correct? i kind of imagined i would get all
> the matching ones
>
> i.e
> object 1: pcma pcmu gsm
> object 2: g729, pcmu, dvi4, g723
>
> what i get in the returned struct is:
> pcmu, dvi4, g723

> is this the correct behaviour?

The function returns the first matching entry. Its rm_next pointer is
not modified, nor new rtpmap structs allocated.

-- 
Pekka.Pessi mail at nokia.com

--
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


[Sofia-sip-devel] ANN: release candidate 1 for sofia-sip-1.12.11

2011-03-04 Thread Pekka Pessi
Hello all,

Long time no release.

However, now I've put out a pre-release tar package available from
sofia-sip.org:



md5sum: 3c9dbb7dee430ccb5d1d0b088eef5516
sha1sum: a0da65f9e8031df1f016545dc83b9ff362760b35
sha256sum: 6c683625cf9c069c6dbe9c99f29377c123555200deeaab359a37a2684d917ff6

The release candidate is tagged in
http://gitorious.org/sofia-sip/sofia-sip as sofia-sip-1_12_11rc1 with
git commit

93ccbc1230708aa4947d824823e39ce56105291f

I've only tested it on Ubuntu 10.10 and Windows 7 (compiled with VS
2010), I'd appreciate if people with more exotic platforms would give
it a try.

-- 
Pekka.Pessi mail at nokia.com

--
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Sofia Getting 900 Internal Error When SIPTAG_TO_STR("sip:7348902; rfrid=eaff000000221c6035b5@200.21.3.10")

2011-02-03 Thread Pekka Pessi
Hi Jerry,

2011/2/3 Jerry Richards :
> Okay, I think I fixed it.  For some reason, sofia did not like when I set
> both NUTAG_URL() in the nua_handle() call and also set SIPTAG_TO_STR() to
> the same thing in the nua_invite() call.  So I removed specifying the
> SIPTAG_TO_STR() in the nua_invite() call and the error no longer occurs.

I think your problem is a syntax violation:

> SIPTAG_TO_STR("sip:7348902;rfrid=eaff00221c6035b5@200.21.3.10")

Try to enclose the URI in <>, otherwise To header parser thinks the
URI is  and the parameter
rfrid=eaff00221c6035b5@200.21.3.10 has invalid syntax..

-- 
Pekka.Pessi mail at nokia.com

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] How to retrieve the local bound SIP port when created dynamically? (as used in contact-header)

2011-02-03 Thread Pekka Pessi
Hi,

2011/1/31 EiSl 1972 :
> I have the feeling the answer lays in front of my nose, but for some reason
> I cannot find/see it...

nua_get_params(.., NTATAG_CONTACT(NULL), TAG:END())

and look for ntatag_contact in the tag list of nua_r_get_params().
> I'm using the released stable version 1.12.10.
> I know there is a lot of incident repair and other development still
> ongoing. If I would like to use a more recent version, which branch/tag is
> considered then most stable?

The master branch at

git://gitorious.org/sofia-sip/sofia-sip.git

is currently pretty stable...

-- 
Pekka.Pessi mail at nokia.com

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Multi home and sofia-sip

2011-01-26 Thread Pekka Pessi
Hi Inca,

2011/1/21 Inca Rose :
>  What about the selection of Contact and Via and Transport on a multi-home 
> environment ?
> I remember that the selection was not consistent, for example sending the 
> packet from NIC1 while selecting Via / Contact from NIC2.

This is a problem that has no generic solution, at least not in Linux.
Can you bind sockets or applications to a NIC in iOS?

> Also there is no way to check from which NIC the proxy is reachable, imagine 
> a VPN situation where the proxy is only
> reachable from the VPN but not from the real NIC.
>
> Where can I add iOS implementation for the Network change detection ??

See nua_register.c/nua_network_changed_cb() and su_os_nw.c and
su_root_add_network_changed()

-- 
Pekka.Pessi mail at nokia.com

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Sip messages truncated

2011-01-26 Thread Pekka Pessi
Hi Philippe,

2011/1/21 Philippe Maymat :
> Since I allowed th multidialog sent in Notify, I received fragmented
> messages and it seems that the message is truncated by th sofia SIP
> stack because ethereal show all informations.

Check the Content-Length from the ethereal, is it correct? It would
help if you could save the problematic message from ethereal and send
it on the list, too.

-- 
Pekka.Pessi mail at nokia.com

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] [sofia-sip-devel] digest authorization using HA1 directly

2011-01-26 Thread Pekka Pessi
Hi Paulo,

2011/1/13 Paulo Vicentini :
> Attached is hack to use HA1 with sofia-sip
> Example:
> nua_authenticate(nh, SIPTAG_EXPIRES_STR("3600"), NUTAG_AUTH(authentication),
> TAG_END())
>
> where authentication is string: Digest-HA1:"realm":user:HA1

I did it in a more complex way, so you should have

HA1+Digest:"realm":user:HA1+

For example

HA1+Digest:"ims3.so.noklab.net":user1:HA1+c0890ff7a4fadc50c45f392ec4312965

-- 
Pekka.Pessi mail at nokia.com

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Multi home and sofia-sip

2011-01-21 Thread Pekka Pessi
Hi Inca,

2011/1/14 Inca Rose :
> Hi;
> I remember there was a limitation with Sofia-SIP and multi-home hosts ( in my 
> case is a device ).
> I do not remember if it was the Via header not populated correctly or the 
> transport was not selected correctly.
>
> There was any improvement in this area ??
>
> Why am I asking ?
> I need to support network changing on the fly during an active call.
> If the device changes network, from 3g to wifi or vice-versa, during an 
> active call, the application has to be notified
> and do whatever needed to continue the call without user intervention.
>
> If NUA was initialized with the 3G address how can I move the call to WiFi 
> 
> -- I need to change the Contact and SDP, so I need to send a 
> re-invite/update, but NUA is not aware of the WiFi transport.

There was some code in NUA and NTA for changing the transports (grep
for NUTAG_DETECT_NETWORK_UPDATES).

However, it is pretty untested and it is currently triggered only in
OS X. Triggering it on Linux should be trivial, but it has been on
TODO list last five years.. ;-/


-- 
Pekka.Pessi mail at nokia.com

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Format of contact header

2011-01-21 Thread Pekka Pessi
Hi Stefan,

2011/1/13 Stefan Eckel :
> we are looking for a method to put transport tags into the contact header 
> field of an invite message.
> With
>
> nua_invite(m_handle,   SIPTAG_CONTACT_STR( 
> "sip:100.100.100.100:5160;tansport=tcp" ) , 
>
> we get
>
> Contact: ;transport=tcp

If there is no <> aroung the URI, it ends at first ;. Try

SIPTAG_CONTACT_STR( "" )

-- 
Pekka.Pessi mail at nokia.com

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Fighting SIP-ALG

2011-01-12 Thread Pekka Pessi
Hi Inca,

2011/1/11 Inca Rose :
> During  a deployment with a service provider I come across several home based 
> routers that the SIP-ALG implementation is wrong.
> the router changes the Contact IP address from the private to the public 
> during a REGISTER request, but do not change it back to the private address 
> when sending
> back the OK to the client.
> Sofia-SIP will ignore the OK because it doesn't recognize the Contact.
>
> I want to make NUA a little bit more flexible here. What will be the best 
> approach to tell NUA to
> ignore this erroneous SIP-ALG behavior ?

Do you get the username correct if you use NUTAG_M_USERNAME()? Or does
the ALG drop everything from your Contact?

-- 
Pekka.Pessi mail at nokia.com

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Old version of sofia-sip

2011-01-11 Thread Pekka Pessi
Hi Khnykin,

2011/1/11 Khnykin Evgeniy :
> I develop SIP-gateway for XMPP protocol. Gateway works on server which works
> under "xen".
> I can't build latest versions of sofia-sip on this server, so i've built
> something like 1.10.x.
> Everything works good, but now i must add P-Asserted-Identity field to
> INVITE query.
> But SIPTAG_P_ASSERTED_IDENTITY macro was added only in 1.12.7 version, so i
> don't have it in my version.
> Can i resolve it trouble? Can i add, for example, my custom field to query?
> Can i parse this field in future?
> How should i change my code:
> nua_handle_t *t_inviteHandle = nua_handle(
>    m_SipThread.getNua(),
>    t_inviteData,
>    SIPTAG_FROM_STR( t_initJid.toArray().data() ),
>    SIPTAG_TO_STR( t_respJid.toArray().data() ),
>    SIPTAG_P_ASSERTED_IDENTITY(t_asserty.data()),
>    TAG_END());

You can pass unparsed header contents with SIPTAG_HEADER_STR(). Something like

#ifndef SIPTAG_P_ASSERTED_IDENTITY
char *p_a_id = su_sprintf(NULL, "P-Asserted-Identity: <" URL_FORMAT_STRING ">",
URL_FORMAT_ARGS(t_asserty.data().url));
#endif

nua_handle_t *t_inviteHandle = nua_handle(
   m_SipThread.getNua(),
    t_inviteData,
    SIPTAG_FROM_STR( t_initJid.toArray().data() ),
    SIPTAG_TO_STR( t_respJid.toArray().data() ),
#ifdef SIPTAG_P_ASSERTED_IDENTITY
    SIPTAG_P_ASSERTED_IDENTITY(t_asserty.data()),
#else
SIPTAG_HEADER_STR(p_a_id);
#endif
    TAG_END());

#ifndef SIPTAG_P_ASSERTED_IDENTITY
   su_free(NULL, p_a_id);
#endif

-- 
Pekka.Pessi mail at nokia.com

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] [sofia-sip-devel] digest authorization using HA1 directly

2011-01-10 Thread Pekka Pessi
Hi Paulo,

2010/12/18 Paulo Vicentini :
> Thanks for your tips
> If It uses a "Digest-HA1" scheme, it would need to receive the same from the
> registrar server (matching schemes). It would be good to be server agnostic
> (Digest)
> int ca_credentials(...
> ... ...
> if ((scheme != NULL && !su_casematch(scheme, ca->ca_scheme)) ||
> (realm != NULL && !su_strmatch(realm, ca->ca_realm)))
> return 0;
>
> It needs to somehow to ignore above code, maybe checking for "Digest-HA1"

Yes, the ca_credentials should somehow magically match the
"Digest-HA1" with Digest, and somehow store the HA1 in the
auth_client_t structure so that the digest algorithm itself would
recognize the HA1. The current authentication client design does not
support that very well.

-- 
Pekka.Pessi mail at nokia.com

--
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] [SOFIA NTA MODULE]- - ACK is not forwarded from STACK to APPLICATION

2011-01-10 Thread Pekka Pessi
Hi Manju,

2010/12/24 manju nath :
>    Am using sofia nta module in my applicaton, for the case shown below ACK
> is coming to stack but these ACK is not getting forwarded from stack to my
> application plz help in finding the reasons for that.

That is a design issue. Application should not care about ACK to 300,
it is not supposed to contain anything interesting. The stack just
stops retransmitting the response upon receiving the ACK.

-- 
Pekka.Pessi mail at nokia.com

--
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Memory allocation problem on windows, Sorry It s nua_stack.c file :)

2011-01-10 Thread Pekka Pessi
Hi Philippe,

2010/12/29 Philippe Maymat :
> I made several modifications to compile cotrrectly the SOFIA-SIP project
> with Visual studio 8. There is mistakes on both project files for static
> and dynamic library on line 4305 and 3216. There was 
> instead of . With this modification the XML is valid and the
> project cn be loaded.

Thanks for reporting this, I've fixed the problem.

>I need to add smoothsort.c in static lib project which is
> forgotten too.

...and added this one, too.

> Now it works but It seem I have a big memory leak, software crash during
> subscribe...
>
> My project works well on linux (QT project) and it is the same revision
> of SOFIA-SIP
> I use th version from this repository :
> git://gitorious.org/sofia-sip/sofia-sip.git
> Is it correct ?
> Because I do not had problem with the old cvs version but this doesn't
> work for me on windows ...
> Now I try to debug and find why it crashes, but it's very hard ... I
> often have error in nta.c line 2388 because of a corrupted content in
> strucures.
>
> I have this problem in both static and dynamic lib linking

Can you run the test cases? The check.cmd script should run them.

-- 
Pekka.Pessi mail at nokia.com

--
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Link error on visual studio 2008

2011-01-10 Thread Pekka Pessi
Hi,

2010/12/28 Philippe Maymat :
> I found a solution, the file string.c is not included in the project and
> contains all missing definitions.

Oops, the dll projects were not updated. I've added them to the git version.

> Now my problem is a crash on line 550 in nua_client.c when subscribing.
> The same code works fine on linux, so I try to find the difference ...

Any news?

--Pekka

-- 
Pekka.Pessi mail at nokia.com

--
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Register WWW-Authenticate header 'qop' missing

2011-01-10 Thread Pekka Pessi
Hi Nauman,

2011/1/8 Nauman Sulaiman :
> Hi, using 1.12.10 sofia. If one receives a challenge to register request I 
> currently reply with nua_authenticate(NUTAG_AUTH())
>
> However if the challenge had the 'qop' parameter then this does not get 
> copied to the response sent by nua_authenticate. Plus no 'nc' parameter. how 
> do i add these to the response??

The client probably fails to parse the qop parameter in the challenge.
If there is no qop in challenge, nc is not used.

-- 
Pekka.Pessi mail at nokia.com

--
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Is CLRF UDP keepalive supported in sofia sip

2011-01-10 Thread Pekka Pessi
Hi Nauman,

2011/1/10 Nauman Sulaiman :
> Hi, have noticed there is a TCP CLRF keepalive. Was wondering if there is 
> equivalent UDP?

There is no easy keepalive for UDP. In principle, you can use STUN or
some simple SIP message. The outbound module within nua uses OPTIONS
as keepalive message by default.

-- 
Pekka.Pessi mail at nokia.com

--
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Parsing OPTIONS SDP body

2011-01-10 Thread Pekka Pessi
Hi Arsen,

2011/1/4 Arsen Chaloyan 

> Let me clarify this a bit.
>
> The response to the SIP OPTIONS request does contain an SDP message and
> it's clear how it should be parsed in general. The question is how to
> retrieve the SDP message included in the response to the SIP OPTIONS request
> using nua API in particular.
>
> nua_options() is used to send requests, while nua_r_options is intended to
> be used to handle the responses. The nua documentation states
>
> http://sofia-sip.sourceforge.net/refdocs/nua/nua_8h.html#abca3606ce16e538a279413d2ca51a379a42069d0268db014b5d3bb5d40112
>
> *nua_r_options*
>
> Answer to outgoing OPTIONS.
> *Parameters:*
> *status* response status code (if the request is retried the *status* is
> 100 and the *sip->sip_status->st_status* contain the real status code from
> the response message, e.g., 302, 401, or 407)
> *phrase* a short textual description of *status* code
> *nh* operation handle associated with the incoming OPTIONS request
> *hmagic* application context associated with the handle
> *sip* response to OPTIONS request or NULL upon an error (status code is in
> *status* and descriptive message in *phrase* parameters)
> *tags* empty  *See 
> also:*nua_options(),
> RFC 3261  section 11, 
> nua_i_options
> All is good. However, as you can see, the tags are always empty and this is
> the problem. As a workaround, instead of nua, it's certainly possible to use
> nta directly...
>

Sofia-SIP does not parse the body in the OPTIONS reply, because it is not
supposed to change the session state. Instead you can find the SDP payload
in the sip->sip_payload field in nua_r_options event. Like Jarod said, you
can parse the SDP in your application using the sdp module.

I'm just curious, what you plan to do with SDP returned by OPTIONS reply?
Initiate re-INVITE if needed?

--Pekka


-- 
Pekka.Pessi mail at nokia.com
--
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl ___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Populating to header from Refer message with replaces

2010-12-15 Thread Pekka Pessi
Hi Nauman,

2010/12/8 Nauman Sulaiman :
> Hi, using sofia 1.12.10 how to populate TO header of Invite created in 
> response to incoming REFER with refer-to header containing replaces parameter.

> I can't just use the refer-to uri on its own as it has the all the replaces 
> stuff. I suppose i could grab the various bits from the refer-to header and 
> create a To uri but was wondering  if there is a better way. I am currently 
> using the following tags

> SIPTAG_FROM_STR
> SIPTAG_TO_STR
> NUTAG_URL
> NUTAG_NOTIFY_REFER
> NUTAG_REFER_EVENT

> the new invite is being created with a replaces header,  just the to header 
> is wrong

Is there something extra in To header? I guess you could parse the
refer-to URL and remove all the header parameters from it.

Do you want to have the to-tag from Replaces in the new INVITE? The
Replaces header and to-tag is used to find an existing call to drop
when the new referred call gets connected.

-- 
Pekka.Pessi mail at nokia.com

--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] [sofia-sip-devel] digest authorization using HA1 directly

2010-12-15 Thread Pekka Pessi
Hi Paulo,

2010/12/15 Paulo Vicentini :
> I using sofia-SIP as an UAC to register with a SIP registrar
> I'd like to avoid using the secret (it is indeed not available) directly
> while creating a digest authorization header with:
> int auc_digest_authorization(auth_client_t *ca,
> su_home_t *home,
> char const *method,
> url_t const *url,
> msg_payload_t const *body,
> msg_header_t **return_headers)
>
> Only HA1 = md5(username:realm:password) is available
> So that I intend to use HA1 = md5(username:realm:password) instead
> What do you say about that?

It is doable with some modifications to iptsec/auth_client.c. You
could modify the ca_credentials to store only the HA1 in the
ca_client_t structure instead of the password (in case of Digest) and
add a special scheme, e.g., Digest-HA1 where the password would
contain the HA1.

Patches are welcome.

-- 
Pekka.Pessi mail at nokia.com

--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] "we *still* have a race condition"

2010-11-11 Thread Pekka Pessi
2010/10/23 Jen Chitty :
> We are trying to track down an intermittent failure in the Sofia SIP stack
> where we appear to be getting an EPERM error back from some POSIX API call
> or another on a powerpc Linux 2.6.23.  This error is somehow triggering the
> stack to report an ACK timeout, even though no timer has expired.  Does this
> sound familiar to anyone?
>
> Anyway, I came across a line of code in tport_type_udp.c that I found
> somewhat alarming:
>
>     su_soerror(self->tp_socket);  /* XXX - we *still* have a race condition
> */
>
> Does anyone know what race condition this is referring to?

When network reports an error with ICMP message, the kernel stores the
error in the socket and wakes up the application with special error
event. Application can ask for the error code using su_soerror()
(getsockopt system call with SO_ERROR argument) but if it does not,
next time application tries to read or write from the socket, the
error is reported to it.

If Sofia SIP application talks with two other SIP instances, say A and
B, and it sends a request to A, but A is unreachable and A's router
reports back an error with ICMP, send to *B* may fail if the ICMP
packet from A is received before call to su_vsend() (sendmsg() system
call).

The above code clears the error just before call to su_vsend. Doing so
reduces the size of the window where an unrelated ICMP can trigger
failure when sending but it does not remove it entirely.

-- 
Pekka.Pessi mail at nokia.com

--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Using VPN

2010-09-20 Thread Pekka Pessi
Hi all,

2010/9/16  :
>> Hi, using 1.12.10. Sofia doesn't seem to select the vpn ip when
>> connected over VPN. It still seems to be listening on the usual WiFI
>> access point ip, this is the same no matter what ip is passed to
>> NUTAG_URL.
>
> It should work if the nua stack is created with this tag.
> I set it as an url_t equivalent to "sip:IPADDR:*".

The socket is bind with maddr parameter, like "sip:IPADDR:*;maddr=IPADDR".

> That said, it is unfortunate that Sofia cannot determine the preferred IP 
> binding by itself, even though it requires platform-specific code (so a Linux 
> fix using rtnetlink will not solve the problem for iPhone).

Yes, the netlink or equivalent code is surely needed.

-- 
Pekka.Pessi mail at nokia.com

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] make check fails

2010-09-20 Thread Pekka Pessi
Hi Filippo,

2010/9/20 Della Betta Filippo :
> Attached config.h and config.status.
> Below output of ifconfig...

It seems to me that you do not have openssl-dev, but my make check
passes through even if I remove it... Mysterious.

-- 
Pekka.Pessi mail at nokia.com

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] make check fails

2010-09-17 Thread Pekka Pessi
2010/9/17 Della Betta Filippo :
> From a clean VM Ubuntu 10.04 x86, I did the following steps to reproduce 
> failure
>
> sudo apt-get install build-essential autoconf automake1.9 libtool git-core 
> check
> git clone http://git.gitorious.org/sofia-sip/sofia-sip.git
> cd sofia-sip
> ./autogen.sh
> mkdir build
> cd build
> ../configure && make && make check

I could not reproduce the problem on my host. Could you send me your
config.h and config.status (and perhaps output from ip addr)?

-- 
Pekka.Pessi mail at nokia.com

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] su_root_threading query

2010-09-17 Thread Pekka Pessi
2010/9/15 Nauman Sulaiman :
> Hi, using 1.12.10 i've set su_root_threading to multithreading mode. But when
> i call nua_register for example from the main thread of my app it blocks it,
> it appears to be all the sresolv stuff. Should this be expected and i should 
> be calling the nua functions on a separate thread. If someone could confirm.

The nua_register should just queue a message for the other thread to
process. Even in single-threaded mode, it should queue it and not
block (but the message would be processed only when the tread returns
to su_root_run() or does su_root_step()).

-- 
Pekka.Pessi mail at nokia.com

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] make check fails

2010-09-13 Thread Pekka Pessi
Hi Filippo,

2010/9/10 Della Betta Filippo :
>        With the latest git code, make check fails during check_nua (I have 
> 4/5 errors).
> The first test that fails is call_2_3_1.
> So I launched "check_nua call_2_3_1"
> With CHECK_NUA_THREADING=no : fails
> With CHECK_NUA_THREADING=yes : ok
> Can you check this ?

It runs fine on my Ubuntu Lucid host. What kind of environment you have?


-- 
Pekka.Pessi mail at nokia.com

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Minor patches

2010-08-31 Thread Pekka Pessi
Hi Filippo,

2010/8/27 Della Betta Filippo 

>  I’m trying to update sofia-sip to the latest git version.
>
> Is it possible to have the function nua_handle_by_call_id exported ?
> (nua_h.patch)
>

I've applied your patches but slightly modified latter two. Thanks.

--Pekka

-- 
Pekka.Pessi mail at nokia.com
--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Internal error at nua_stack.c:2388 on SUBSCRIBE

2010-08-16 Thread Pekka Pessi
Hi Philippe,

2010/8/13 Philippe Maymat 
>with the latest git repo, I now have the following error in return of 
>nua_subscribe:
>
> Internal error at nua_client.c:550
>
> It's due to the ';', with any other char, it works.

Could you show us your code? How do you initialize nh? Which other
tags you include with nua_handle() and nua_subscribe() besides
NUTAG_URL?

--
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] forking calls and overlapping

2010-08-16 Thread Pekka Pessi
2010/8/12 Михаил Кривушин :
> Hello!
> We use FreeSWITCH and OpenSIPS, and have problem - when we try use forking
> calls, it seems that sofia nta/nta.c doesnt distinct INVITE-s by Via
> headers, and its branches.
> Is it right, or I need more code reading?

By default, the server side on nta.c detects the branched INVITEs (and
responds with 482 Request Merged to them).

On client side, the same client side transaction can be used to
receive all the responses. It is also possible to create a
fork-specific client-side transaction with nta_outgoing_tagged().

The nua call model does not support forking, and the sdp processing
and media handling gets outright confused on multiple forks.

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Problem in using sofia-sip libraries

2010-08-16 Thread Pekka Pessi
Hi Amir,

2010/8/14 Amir Khezrian :
> From the errors, It seems that compiler can't find sofia-sip/msg_types.h and
> sofia-sip/msg_mime.h
> Have i missed something that is necessary to be installed before using
> sofia-sip?

You should -I the directory where the inlude files has been installed,
not the sofia-sip source tree. By default the include path is
/usr/local/include/sofia-sip .

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] sofia-sip not sending correct Via headers in 200 OK to NOTIFY request

2010-08-13 Thread Pekka Pessi
Hi Gaurac,

2010/8/13 Pekka Pessi :
> 2010/8/11 Gaurav Srivastva :
>> The Via headers on Linux are sent correctly if TPORT_LOG is not defined. If 
>> I define this variable then the problem starts happening.
>
> Oh my. Thanks for digging this out.

I've pushed the fix to gitorious, please test.

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] nua_callstate_authenticating don't work

2010-08-11 Thread Pekka Pessi
Hi Paolo,


2010/8/5 Paulo Pizarro :
> The "nua_callstate_authenticating" is documented:
>
> http://sofia-sip.sourceforge.net/refdocs/nua/nua__tag_8h.html#904045132b398207f1597320c860eca3
>
> But, it is not used on the source (only defined).
>
> Maybe, it's better to remove it from the enum or fix documentation with 
> "TODO".

It seems to me that it never has been used. I'll fix the documentation.

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Null Callid and To Tag

2010-08-10 Thread Pekka Pessi
2010/8/5 Vikas Bhat :
> Thanks for the information.
> Do u mean to say that Sofia Stack(NTA) should send the 400.
> since we are using the STACK in is STATELESS mode .should our application
> check for
> CallID with null values and respond with 400.

Yes and no, the nta stack should check for bad requests even in stateless mode.

> is there any stack configuration to be enabled from SOFIA STACK side to
> Check such scenerios and respond appropriately.

See, e.g., the documentation of NTATAG_BAD_REQ_MASK():

http://sofia-sip.sourceforge.net/refdocs/nta/nta__tag_8h.html#23d0ebce6f3a594c5547e0ff72fc5777

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Initialize video in client with SDP sent to server

2010-08-10 Thread Pekka Pessi
Hi Peter,

Please be more specific. What is wrong? How far you get? What kind of
response you get? What are you using to receive the media?

--Pekka

2010/8/6 peter hanshon :
>
> I want to initialize a video streaming service  (by VLC)  by sending a
> message sip-prompt client to server when I use the following SDP but its not
> working
>
>
> nua_invite(handle,SIPTAG_CONTENT_TYPE_STR("application/sdp")
>                ,  SOATAG_USER_SDP_STR(v=0\n "
> "o=- 2890844536 28008255796 IN IP4 192.168.200.212 \n"
> "c=IN IP4 192.168.200.212 \n"
> "t=0 8\n"
> "a=tool:vlc 1.1.2\n"
> "a=recevonly\n"
> "a=type:broadcast\n"
> "m=video 52862 RTP/AVP 96\n"
> "a=rtpmap:96 H264/9\n"
> "a=fmtp:96\n"
> "m=audio 43714 RTP/AVP 97\n"
> "a=rtpmap:97 mpeg-generic/44100/2\n"
> "a=fmtp:97\n"),
>                TAG_END ());
>
>
> help me please
>
>
> --
> This SF.net email is sponsored by
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev
> ___
> Sofia-sip-devel mailing list
> Sofia-sip-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
>
>



-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] One more question about cloned task

2010-08-10 Thread Pekka Pessi
Hi Pete,
Hi Pete,

2010/8/7 Pete Kay :
>> Do you have multiple nta_agent_t instances running, or how do you
>> handle the UAS side? What kind of task you plan to implement in the
>> cloned task, some kind of db lookup?

> Yes, I am using DB to store routing information.

Have you considered using su_msg_send() and su_msg_reply() to talk
with the DB thread instead of multi-threaded agent?
Please note that while nta functions are thread-safe, the nta objects are not.

>> If you want to see later messages from UAC, you need to insert a
>> Record-Route header into the request which you forward towards the
>> UAS.
>
> I am looking at
> http://sofia-sip.sourceforge.net/refdocs/sip/group__sip__record__route.html
> which shows how to creat a record_route structure.  How do I add it to
> the outgoing sip message?  Which api should I use?

That depends on how you plan to do the forwarding. E.g.,

sip_record_route_t *rr = sip_record_route_format(msg_home(msg), ...);
msg_header_insert(mg, NULL, (msg_header_t *)rr);

> Also, should I store both UAC-related RR and UAS-related RR in the
> RR-URI's user part?

User part is easiest, I think.

> In the hash table you suggested, should I use an UUID to represent
> each leg ( one for UAC and the other one for UAS) and then store the
> leg corrspond to each UUID?

I would not use legs: if you process same request twice (say, one of
your users forwards his calls to another user) the legs cannot make
difference between loops. I'd process each incoming request either
statelessly or with default leg, and look for the UUID from the
topmost route.

> Also, I don't understand why it matter whether I am using one or two
> nta_agent_t.  I still need two UUID ( one for each leg ) regardless of
> whether I use one or two nta_agent_t right?  Or am I missing
> something?

Well, in principle you could do with one UUID and RR if you used one agent.

>> You have to remove the resulting Route headers when processing the
>> later messages, too.
>
> Which API can I use to remove the Route header and when you say later
> messages, what are you referring to?  When should the Route header be
> removed?

The RFC 3216 sections 16.4 and 16.12 describes how the Route header
should be processed. Basically, when you receive a request with Route
header, you should forward request based on topmost Route instead of
request-URI. If topmost Route URI belongs to your proxy, you remove
it.

The lr URI parameter complicates matters, however.

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] sofia-sip not sending correct Via headers in 200 OK to NOTIFY request

2010-08-10 Thread Pekka Pessi
2010/8/10 Gaurav Srivastva :
> Would highly appreciate if someone can tell me if this issue is resolved in
> sofia-sip stack or not.

Are you sure there is no other Via header down the response? ;-o

I've never seen the bug on Linux, but I've added test cases for it in
nta and nua just in case you manage to compile git head on OSX
(patches on any of the problems encountered are welcome).

--Pekka

> On Aug 8, 2010, at 2:49 AM, Gaurav Srivastva wrote:
> The notify request to the subscription is being responded to by Sofia-Sip
> stack with one Via header from the SIP request missing.
> In the NOTIFY, the Via header is,
>    Via: SIP/2.0/UDP
> ift-uca.mitel.com:5060;branch=z9hG4bK693c3fbd3b6fa114ad984c7a522a1964.1,SIP/2.0/UDP
> 172.16.14.209:6015;branch=z9hG4bK86266194643563
> In the 200 OK response, the Via header being sent is,
>    Via: SIP/2.0/UDP
> ift-uca.mitel.com:5060;branch=z9hG4bK693c3fbd3b6fa114ad984c7a522a1964.1;received=172.16.14.209
> I'm using nua to send the subscribe request.
>       handle = nua_handle(appl->nua,
>                           NULL,
>                           SIPTAG_FROM(from_header),
>                           SIPTAG_TO(to_header),
>                           SIPTAG_ROUTE(route_header),
>                           SIPTAG_CONTACT(contact_header),
>                           TAG_END());
>
>       if(handle)
>       {
>         nua_subscribe(handle,
>                       SIPTAG_EXPIRES_STR("3600"),
>                       SIPTAG_EVENT_STR("presence"),
>                       SIPTAG_ACCEPT_STR("application/pidf+xml"),
>                       TAG_END());
>
>       }
> The platform is OSX and xcode IDE.
> Can someone tell me what I'm doing wrong or is this a bug in sofia-sip
> stack?
> Thanks
> Gaurav


-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Using TLS with sofia

2010-08-06 Thread Pekka Pessi
2010/8/2 Nauman Sulaiman :
> Hi, using version 1.12.10. We've compiled OpenSSL 0.9.8, also compiled the 2 
> source files related to tls in tport. We know that in NUTAG_URL we must pass 
> in transport=tls. What else do we need to do to enable tls on Sofia, is there 
>  any sample code to show how to use it?

You should have root (cafile.pem) and server certificates ready
(agent.pem) in a suitable directory ($HOME/.sip/auth by default).
-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Fixed documentation of the detailed client call model

2010-08-06 Thread Pekka Pessi
2010/8/5 Paulo Pizarro :
> I'm sending a patch fixing the documentation of the detailed client call 
> model.

Thanks, applied.

> I hope this is true! :)

Hope so too. ;)


-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Multiple transports with single nua_create instance

2010-08-06 Thread Pekka Pessi
Hi,

2010/8/2 Nauman Sulaiman :
> Hi, using sofi 1.12.10 we have managed t support multiple registrations using 
>  separate nua handle to nua_register call, single nua_create call.
>
> However is it possible to specify separate ports and transport for each 
> nua_handle OR do we need to create a separate stack instance to support this 
> ie multiple nu_create calls with unique NUTAG_URL for each instance.

Unfortunately, you can only specify two transports in nua_create(),
one with NUTAG_URL() another with NUTAG_URL_SIPS().

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] One more question about cloned task

2010-08-06 Thread Pekka Pessi
Hi Pete,

2010/7/30 Pete Kay :
> In my request_handler, I am creating a new cloned_task upon receiving
> of INVITE from uac.  I am using this cloned_task to create a leg to
> talk to the uas and forward the INVITE to the uas.

Do you have multiple nta_agent_t instances running, or how do you
handle the UAS side? What kind of task you plan to implement in the
cloned task, some kind of db lookup?

> When I get another message from uac, such as ACK, how can I reuse the
> same cloned task and the same leg that was previously created or I
> should recreate it for ACK as well?

If you want to see later messages from UAC, you need to insert a
Record-Route header into the request which you forward towards the
UAS.

> Where can I store the cloned task and the nta_leg_t object and have it
> be reused for the next message received from the same UAC?

The problem with legs is that you have no control on Call-ID and
From/To tags, they are chosen by UAC/AUS. Also, a dialog may loop
through your proxy multiple times. It is better to insert a
Record-Route URL that you can use to lookup the dialog and the
associated state from some kind of hash table. (E.g., insert a hashed
identifier of your dialog in user-part of the RR URI, use that to
lookup from the hash table). If the RR points to different nta_agent_t
instances, you need to insert two Record-Route headers, one used by
UAC, another by UAS. With two Record-Route headers you can also easily
make difference between requests sent by original UAC and UAS.

You have to remove the resulting Route headers when processing the
later messages, too.

-- 
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Contact header incorrect

2010-08-04 Thread Pekka Pessi
Hi,

2010/7/26 Nauman Sulaiman :
> Hi, using Sofia 1.12.10. I have multiple sip accounts, with separate nua 
> handles for each nua_register etc. When i get a nua_i_invite and send a 
> response it seems to pick a contact randomly from sip accounts that i have
> for the contact header. I am switching on the sip_request field to determine
> the account the invite is for then i manually attach SIPTAG_CONTACT_STR  to 
> each nua_respond etc then all is ok.
>
> But is there a better way i should be doing this?

Unfortunately, no. SIPTAG_CONTACT() is best you can do at the moment.

-- 
Pekka.Pessi mail at nokia.com

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Threading - Root problem Newbie

2010-08-04 Thread Pekka Pessi
Hi Rohan,

2010/7/24 rohan kala :
> 1) I have initialized su_root_create() function in my main() function, now
> do I have to initialize it in callback function or every othe function to
> send request or incoming request etc.. Or I have to just put
> su_root_run(context->c_root) every time when I expect callback function.

The main loop is executed within the su_root_run() function (until one
of your callbacks call su_root_break(context->c_root)

> 2) What's the role of su_root_threading() where should I initialize it?

If you create a su_root_t clone (e.g., nua_create() creates one), it
can be executed with the original thread and su_root_t main loop, or
by an separate thread. You can select the mode with
su_root_threading() call before the clone is created.

> 3) Once I have created nta_outgoing_tcreate() function and  had sent request
> with it do I have to do nta_outgoing_destroy() before using
> nta_outgoing_tcreate() etc. Or threading can take care of it?

There can be multiple client transactions ongoing, you should call
nta_outgoing_destroy() after you get the final response (or, in case
of INVITE, after you send the ACK to 2XX response).

-- 
Pekka.Pessi mail at nokia.com

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Null Callid and To Tag

2010-08-04 Thread Pekka Pessi
2010/7/26 Vikas Bhat :
> Sofia stack is not able to detect empty/null CallID in INVITE request.
> similarly Sofia is not able to detect empty/NULL TO TAG.
> Ideally Sofia should reject the calls in above scenerios.

I think NTA is supposed to return a 400 response to a request received
from network if CallID header is missing.

On client side, it generates a CallID automatically, if application
has not provided one. Likewise, it generates a random To tag if
application has not provided one.

The To tag is always empty or missing in initial requests; do you
propose that a Sofia should automatically try to clear any call if a
response to an INVITE request contains empty/null To tag?

-- 
Pekka.Pessi mail at nokia.com

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] NTA authentication request problem

2010-08-04 Thread Pekka Pessi
2010/7/24 Mayur Mahajan :
>  I have made a shorter version of my mail.
>   When I send a request to the server through my NTA client, I get the
> response of the message(407 Unauthorized) in the callback. So, when the
> callback function gets the 407 message it invokes authorize_ua() method. The
> problem is I am not able to send the request which authorizes me.  Could you
> please help me in the following things :-

The 407 Unauthorized is sent by a proxy (as opposed to the 401
Unauthorized which is sent by UAS). The 407 carries Proxy-Authenticate
header (instead of WWW-Authenticate in 401) and the subsequent retry
should contain Proxy-Authorization header.

> nta_leg_destroy(context->c_leg), context->c_leg = NULL;
>
>   if (context->c_leg)

This is an another problem...

-- 
Pekka.Pessi mail at nokia.com

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] adding rinstance to NOTIFY request line in nua

2010-08-04 Thread Pekka Pessi
2010/7/22 Markus Bucher :
>> Is the notify for a existing subscribe/notify session or is it for a
>> "blind notify"?
>
> It's actually for both, though blind notifies have priority.
> The scenario is, that there is a security server between my application an
> the receiver of the notify (client).
> This server adds the rinstance to the contact-header of a register. I save
> this rinstance-tag and have to add it to the request line of all requests to
> the client (that are initiated by my application).
> If a packet is not in a dialog and does not have the rinstance tag, the
> packet will be droped by the server.
>
> I'm nor really able to try it, so I don't really know if subscribe/notify
> sessions are concerned, but blind notifies are definitely concerned.

NUTAG_URL() should work for blind NOTIFYs but not with the SUBSCRIBEd
NOTIFYs. The latter take the URL from the Contact (or Record-Route)
header. However, they are part of an existing dialog, so your security
servers should let them through. (You may need to respond to SUBSCRIBE
before sending NOTIFY, however.)

-- 
Pekka.Pessi mail at nokia.com

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Does soa module support “Del ayed Offer” ?

2010-08-03 Thread Pekka Pessi
2010/7/21 edson.gomes.leme :
> Hi Pekka Pessi;
>
> a) Does the Sofia-SIP soa module support “Delayed Offer” ?

Yes..

> b) How can this call scenario be implemented with the soa module?
>
>     SOFIA-SIP (soa)
>      A (UAC) B (UAS)
>     |   |
>     |<--  INVITE  --|
>     |   |
>     |---  100 Trying  ->|
>     |---  180 Ringing  >|
>     |   |
>     |---  200 (offer)  >|
>     |<--  ACK (answer)  |
>     |   |

You need nothing special (but the usual remote sdp tags in
nua_i_invite are missing).

> c) How can this call scenario be implemented with the soa module?
>
>        SOFIA-SIP (soa)
>             A (UAC)                         B (UAS)
>                |                               |
>                |--  INVITE  -->|
>                |                               |
>                |<---  100 Trying  -|
>                |<---  180 Ringing  |
>                |                               |
>                |<---  200 (offer)  |
>                |--  ACK (answer)  >|
>                |                               |

Currently, this requires a kludge, you have to include an empty
payload (I think SIPTAG_PAYLOAD_STR("") is ok) in nua_invite().

--Pekka

-- 
Pekka.Pessi mail at nokia.com
--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Multiple Registration support

2010-07-14 Thread Pekka Pessi
Hi,

2010/7/12 Nauman Sulaiman 
>
> Then i tried with 2 different accounts, one Sipgate the other Callcentric. I 
> created 2 separate register handles and separate call back handlers for each 
> handle. I call nua_register twice with the separate handles now.

It should work fine, there is probably something else hosed in your code..

>
> What i noticed is the REGISTER messages go out to the 2 different providers 
> and i get a 401 back from each one, but my callback handlers are not getting 
> called, its like the stack is not passing these on.
> I also noticed that the REGISTER messages to the 2 differnet providers are 
> getting sent with the same CSEQ number!!! So i assume the stack is getting 
> completely confused with the responses. I assumed that sending nua_register 
> with separate handles would allow each REGISTER transaction to be treated 
> separately and the responses would be routed to the separate handlers.

The CSeq number is generated based on the current time. Two REGISTERs
may have same CSeq as long as their Call-ID header (and tags in From
and To headers) are different.

>
> Can someone give me a high level description how to set up what i want to, as 
> mentioned i have a single account working fine.

It should work just fine, but you can try to enable more detailed
debugging logging with NUA_DEBUG=9 and NTA_DEBUG=9 environment
variable.

--
Pekka.Pessi mail at nokia.com

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


  1   2   3   4   5   6   7   8   9   >