[Sofia-sip-devel] How to generate SIP NOTIFY after SIP SUBSCRIBE in NTA

2008-11-06 Thread Aleksander Morgado
Hi all, This is a newbie question which I hope has an easy answer :-) I receive a SIP SUBSCRIBE message in an NTA agent processing the calls in a stateless way (no call legs). I use nta_msg_treply to send the 200 OK response, but I would also need to initiate an outgoing transaction to send a

[Sofia-sip-devel] Talking about memory leaks...

2008-11-11 Thread Aleksander Morgado
Hi all, More than probably, it's my fault, but I am getting tons of memory leaks in my NTA-based application (using sofia-sip v1.12.8). The worst one is reported by valgrind like this: ==31415== 8,795,284 (1,302,928 direct, 7,492,356 indirect) bytes in 2,692 blocks are definitely lost in loss

Re: [Sofia-sip-devel] Talking about memory leaks...

2008-11-11 Thread Aleksander Morgado
), and when freed, it is just marked as freed in the home (so the home won't be smaller). Is this home memory ever going smaller? Maybe (probably) I am missing something. Any hint on this? Thanks, -Aleksander Aleksander Morgado wrote: Hi all, More than probably, it's my fault, but I am getting tons

Re: [Sofia-sip-devel] [NEWBIE] How to print a SIP message

2008-11-20 Thread Aleksander Morgado
If it's just printing I/O SIP messages, you can also export TPORT_LOG=1 before running your app, or include the following code: setenv(TPORT_LOG, 1, 1); I also have a sofia-sip log redirection to my own function: su_log_redirect(NULL, __sofiasip_logger_func, NULL); And this is my

[Sofia-sip-devel] nta_leg_magic() parameters

2008-12-09 Thread Aleksander Morgado
I see that nta_leg_magic() is defined like this: nta_leg_magic_t * nta_leg_magic (nta_leg_t const *leg, nta_request_f *callback) Return application context for the leg. But what's the purpose of including the callback function in the request? Shouldn't it be enough with passing

Re: [Sofia-sip-devel] Managing call legs in multi-threaded environment

2008-12-11 Thread Aleksander Morgado
In a brief, is making the home of NTA agent thread-safe enough for all those situations? Unfortunately no. The nta functions are thread-safe in the mean that they do not use any shared global data, the nta objects like nta_leg_t or nta_agent_t are not thead-safe. You have to obtain the

[Sofia-sip-devel] sip_contact_t question

2008-12-12 Thread Aleksander Morgado
Hi all, I need to somehow store the whole Contact Sip Header info, coming in the sip_t as sip_contact_t (struct sip_contact_s) for latter use. I can store it either un-parsed (char *) or parsed (sip_contact_t). Is there any API function to obtain a (char *) with the whole contact header from a

Re: [Sofia-sip-devel] sip_contact_t question

2008-12-15 Thread Aleksander Morgado
I need to somehow store the whole Contact Sip Header info, coming in the sip_t as sip_contact_t (struct sip_contact_s) for latter use. I can store it either un-parsed (char *) or parsed (sip_contact_t). Is there any API function to obtain a (char *) with the whole contact header from a

Re: [Sofia-sip-devel] Managing call legs in multi-threaded environment

2008-12-17 Thread Aleksander Morgado
You have to obtain the root (via su_root_obtain()) that is used by nta in order to access the nta objects in safe manner. (The original thread used to create the root object must first release it with su_root_release()). Like locking/unlocking a mutex, understood. I guess this also applies

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

2008-12-22 Thread Aleksander Morgado
Hi all, I need to make SIP message forwarding in a stateful NTA, but not sure which is the correct way to do it. I receive the incoming transaction in the default leg, but how do I forward the SIP message to another user? Do I need to create an outgoing transaction with nta_outgoing_tcreate() to

[Sofia-sip-devel] SigComp support?

2008-12-23 Thread Aleksander Morgado
Does sofia-sip support SigComp somehow? I noticed the configure option shown in the help: $ ./configure --help ... --with-sigcomp=dir use Sofia SigComp package [not used] Is that Sofia SigComp package implemented and public? Thanks, -Aleksander

Re: [Sofia-sip-devel] SigComp support?

2009-01-05 Thread Aleksander Morgado
Is that Sofia SigComp package implemented and public? Sofia SigComp package is Nokia proprietary code, it is not publicly available. There is a GPL sigcomp packages available, however, some plumbing is required in order to fit it with Sofia. I guess you mean Open SigComp, right?

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

2009-01-12 Thread Aleksander Morgado
I need to make SIP message forwarding in a stateful NTA, but not sure which is the correct way to do it. I receive the incoming transaction in the default leg, but how do I forward the SIP message to another user? Do I need to create an outgoing transaction with nta_outgoing_tcreate() to

[Sofia-sip-devel] Sending outgoing transaction with TCP instead of UDP

2009-01-16 Thread Aleksander Morgado
Hi all, In a stateful NTA, I am getting SIP SUBSCRIBE from a sip client using TCP connection, and I would like to send back the NOTIFY messages to the subscriber also using TCP, instead of UDP. I found that nta_outgoing_tcreate() uses UDP by default, and I didn't found any way to make it use TCP.

[Sofia-sip-devel] Multipart payload handling

2009-01-20 Thread Aleksander Morgado
Hi all, I'm getting a SIP INVITE with a multipart payload: Content-Type: multipart/mixed;boundary=MessageBoundary I supposed that sofia-sip would split the payload into different msg_multipart_t accessible in sip-sip_multipart, but it doesn't do it (I get NULL pointer in sip-sip_multipart),

[Sofia-sip-devel] Bug dupping msg_t with multipart payload?

2009-01-29 Thread Aleksander Morgado
Hi all, Is this a bug in sofia-sip? #0 0xe410 in __kernel_vsyscall () #1 0xb7943640 in raise () from /lib/i686/cmov/libc.so.6 #2 0xb7945018 in abort () from /lib/i686/cmov/libc.so.6 #3 0xb793c5be in __assert_fail () from /lib/i686/cmov/libc.so.6 #4 0xb7f45b50 in sub_alloc

[Sofia-sip-devel] Using su_msg_r

2009-02-27 Thread Aleksander Morgado
Hi all, I'm using su_msg_r objects to pass information between clones, using `su_msg_create()' and `su_msg_send()'. These functions are perfect for inter-clone communications (with threading enabled, so inter-thread communication at the end). Now, I may want to send a su_msg_r object to a given

Re: [Sofia-sip-devel] Using su_msg_r

2009-03-02 Thread Aleksander Morgado
In my case, no such reply/report is needed, as I just need to dispatch the su_msg_r and nothing else, so I was wondering if this other approach is acceptable: * Instead of `su_msg_create()', use `su_msg_new()' * Then, instead of `su_msg_send()', use `su_msg_send_to()', as this last

Re: [Sofia-sip-devel] Variable number of tag parameters

2009-03-09 Thread Aleksander Morgado
Hi Fabio, I'd like to know it there is a way for me to pass a variable number of tagged parameters for Sofia functions. For example, I have an array with an unknown number of strings that represent headers, and I'd like to call nua_invite() with a SIP_HEADER_STR() tag for each member of the

Re: [Sofia-sip-devel] Duplicate sip_t structure cont.

2009-03-12 Thread Aleksander Morgado
Not sure if anyone ever had the same problem, but msg_dup() gave me continuous errors when dupping a SIP message with multipart payload: http://sourceforge.net/mailarchive/message.php?msg_name=71e7543a0901290159m16ee387fj9d93c17338f68eed%40mail.gmail.com Cheers, -Aleksander On Wed, Mar 11, 2009

[Sofia-sip-devel] Logging in sofia-sip

2009-03-13 Thread Aleksander Morgado
Hi all, I am trying to discover why a call to nta_outgoing_tcreate() returns NULL. It probably is due to a wrong tag, but the thing is that even if I enable the maximum logging level, I don't get any error message explaining what's wrong. I set SOFIA_DEBUG, NTA_DEBUG and SU_DEBUG environment

Re: [Sofia-sip-devel] P-Asserted Header in RINGING

2009-04-17 Thread Aleksander Morgado
Hi Bernhard, my nua application has to do something if it receives a P-Asserted Header in the 180 Ringing and/or in the 181 Call Is Being Forwarded. The problem is, that it is not possible to get the header value of the SIP struct (using sip_p_asserted_identity), because the SIP

Re: [Sofia-sip-devel] Avoid sending 100 Trying?

2009-05-07 Thread Aleksander Morgado
was to modify the UAC scenario to accept the 100 message. Jonathan On Tue, Apr 7, 2009 at 7:12 AM, Aleksander Morgado sofia-sip-de...@aleksander.es wrote: Is there any way in sofia-sip to avoid the automatic sending of the 100 TRYING reply to an INVITE nta_incoming_t? I've got a UAC which

Re: [Sofia-sip-devel] Avoid sending 100 Trying?

2009-05-13 Thread Aleksander Morgado
Hi Jonathan, What I discovered was that even though the documentation did not explicitly show the 100 message being handled, it was in fact handled by the client. For my situation, everything worked as you would hope according to the SIP protocol. Well, in my case I know that the UAC

Re: [Sofia-sip-devel] Avoid sending 100 Trying?

2009-05-14 Thread Aleksander Morgado
Hi there, I prepared a small patch (attached) to current darcs implementing a new tag NTATAG_AVOID_100(), which can be used in nta_incoming_set_params(). That function was meant to provide sigcomp support (at least the allowed tags were just only for that), but I guess it's the correct

Re: [Sofia-sip-devel] Avoid sending 100 Trying?

2009-05-25 Thread Aleksander Morgado
Hi Pekka, I will modify the patch with your suggestions and post it here. Cool. Thanks! Attached a new patch to current darcs. To disable now the 100 Trying at transaction level, you should call: nta_incoming_set_params(irq, NTATAG_EXTRA_100(0), TAG_END()); Also the flag is now

Re: [Sofia-sip-devel] Question aboiut NTA and sip_t

2009-09-22 Thread Aleksander Morgado
Hi Daniel, When NTA receives a request which doesn't match an existing transaction it passes a pointer to the callback function of type sip_t. Can this pointer be dereferenced through the lifetime of the transaction or does it go poof as soon as I exit the callback function? My

[Sofia-sip-devel] New release schedule?

2009-09-22 Thread Aleksander Morgado
Hi all, Is there any planned date for a new stable (1.12.11) release of sofia-sip? Cheers, -Aleksander -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to

[Sofia-sip-devel] 64-bit issue in sofia-sip (patch)

2009-09-23 Thread Aleksander Morgado
Hi Pekka all, We just faced an issue happening only in 64-bit architecture, and found that it was already fixed by FreeSWITCH guys in their own sofia-sip repo: http://jira.freeswitch.org/browse/SFSIP-136 It seems the fix is not included in the official repo, which would be good to have.

Re: [Sofia-sip-devel] 64-bit issue in sofia-sip (patch)

2009-09-24 Thread Aleksander Morgado
We just faced an issue happening only in 64-bit architecture, and found that it was already fixed by FreeSWITCH guys in their own sofia-sip repo: http://jira.freeswitch.org/browse/SFSIP-136 It seems the fix is not included in the official repo, which would be good to have. Thanks

[Sofia-sip-devel] SIPTAG_END() vs TAG_END() problem in 64bit

2009-11-17 Thread Aleksander Morgado
Hi Pekka all, Is there any difference in using SIPTAG_END() instead of TAG_END() as end-of-list terminator in a nta_incoming_treply() ? Actually, SIPTAG_END() is segfaulting in a 64bit architecture, while TAG_END() is not. Cheers and thanks, -Aleksander

[Sofia-sip-devel] su_home_new() documentation

2009-12-18 Thread Aleksander Morgado
Hi Pekka all, Would be a good idea to explicitly say in the documentation of su_home_new() that the allocated memory chunk is also zero-initialized, as it is a call to calloc(). Cheers, -Aleksander -- This SF.Net email

Re: [Sofia-sip-devel] Disable automatic responses for incoming Re-Invites

2009-12-30 Thread Aleksander Morgado
Hi Daniel, is there any way to disable automatic responses for incoming reinvites ? I want do process and respond the reinvite in appl level, like an incoming call, and it seems like the nua_stack_process_request() is hard coded at this point (flag in_dialog), and I did not found any tag to

Re: [Sofia-sip-devel] question on lifetime of msg_t, sip_t objects after stateless callback

2010-01-04 Thread Aleksander Morgado
HI Dave, I am writing a fairly simply stateless redirect server. It is multithreaded, where the main thread creates the root task and runs the thread loop, and receives incoming SIP invites. If I simply respond to the INVITE with nta_msg_treply in the main thread, everything works.

Re: [Sofia-sip-devel] question on lifetime of msg_t, sip_t objects after stateless callback

2010-01-04 Thread Aleksander Morgado
Hi Dave, Thanks Aleksander, I had actually seen your thread from some time ago and it was what inspired me to take this general approach. So thanks twice! :-) I have figured out some of my problem, and also have a few questions about some of the suggestions below. First, after fiddling

Re: [Sofia-sip-devel] question on lifetime of msg_t, sip_t objects after stateless callback

2010-01-04 Thread Aleksander Morgado
Hi Dave, 1) Sending the provisional response definitely seems to mark the message for deletion, reclamation, whatever. I did a simple test of trying to send a final response from the main loop right after sending a 100 Trying and got the same message could not be completed message. So it

Re: [Sofia-sip-devel] libsofia-sip-ua-glib question (GSource handling)

2010-01-07 Thread Aleksander Morgado
Hi Kai, a) in step 2, when calling su_glib_root_gsource(), am I getting a NEW reference to the GSource? This is, do I need a g_source_unref() for each su_glib_root_gsource()? it's a new reference, so you need to unref it. Ok, I expected that. b) Is su_root_destroy() calling

Re: [Sofia-sip-devel] libsofia-sip-ua-glib question (GSource handling)

2010-01-07 Thread Aleksander Morgado
Hi again Kai, a) in step 2, when calling su_glib_root_gsource(), am I getting a NEW reference to the GSource? This is, do I need a g_source_unref() for each su_glib_root_gsource()? it's a new reference, so you need to unref it. Ok, I expected that. b) Is su_root_destroy() calling

Re: [Sofia-sip-devel] simple UAS crashing in freeaddrinfo - is this a threading problem of some kind?

2010-01-08 Thread Aleksander Morgado
Hi Dave, Per an earlier thread, I am building a very simple multithreaded UAS redirect server. (Note: in my earlier thread I was running it in stateless mode, but now I am running in stateful mode). :-) The simple scenario is an INVITE that gets handed to a different worker thread, a

Re: [Sofia-sip-devel] libsofia-sip-ua-glib question (GSource handling)

2010-01-08 Thread Aleksander Morgado
If so, then the documentation of su_glib_root_gsource() is pretty confusing, as it says: Note that you need to unref the GSource with g_source_unref() before destroying the root object. Really seems you are getting a new reference with su_glib_root_gsource() which you later need to unref(),

[Sofia-sip-devel] SIP request through TCP if size is longer than threshold

2010-01-22 Thread Aleksander Morgado
When a SIP request long enough is created, like with a large payload, Sofia-SIP automatically tries to send the request through TCP instead of UDP. I understand that if packet size is more than the maximum UDP packet size allowed in the physical network it will not be sent. But can this behavior

Re: [Sofia-sip-devel] SIP request through TCP if size is longer than threshold

2010-01-22 Thread Aleksander Morgado
When a SIP request long enough is created, like with a large payload, Sofia-SIP automatically tries to send the request through TCP instead of UDP. I understand that if packet size is more than the maximum UDP packet size allowed in the physical network it will not be sent. But can this

[Sofia-sip-devel] More than strange invalid read error reported by Valgrind in url_xtra() -- only when compiling with -O2

2010-02-02 Thread Aleksander Morgado
Hi all, This is more just for info than for anything else. I spend several hours trying to understand why I was getting an invalid read in the Valgrind report in calls to url_xtra(). The invalid read was always of size 4, and was always happening always in the call to strlen() inside the

Re: [Sofia-sip-devel] SIP request through TCP if size is longer than threshold

2010-02-03 Thread Aleksander Morgado
” in the tag NUTAG_M_PARAMS. Hope this helps, Mikhail *From:* ext Aleksander Morgado [mailto:sofia-sip-de...@aleksander.es] *Sent:* Friday, January 22, 2010 5:26 PM *To:* sofia-sip-devel *Subject:* Re: [Sofia-sip-devel] SIP request through TCP if size is longer than threshold When

Re: [Sofia-sip-devel] An API to save and restore a current stack state

2010-02-10 Thread Aleksander Morgado
Hi Inca, Developing SIP stack for over 10 years now I came across the need to be able to save and restore a SIP stack state. The scenarios are multiple but the most important one was to be able to do fail over of a call to a different server while serializing the stack state to a different

Re: [Sofia-sip-devel] SOFIA SIP EXAMPLE

2010-02-10 Thread Aleksander Morgado
I'd like to run an example (sip client) using SOFIA SIP Stack on Windows Vista. I already download the SOFIA SIP. Do I need to compile all the code ? Where can I find some example in order to see SOFIA SIP working? SofSipCli may help: http://wiki.opensource.nokia.com/projects/SofSipCli

Re: [Sofia-sip-devel] An API to save and restore a current stack state

2010-02-10 Thread Aleksander Morgado
NTA may have only one transaction ?? The restore process need to restore the whole user agent, including Dialogs and transactions. No, internally NTA stores all legs for all dialogs. -- SOLARIS 10 is the OS for Data

Re: [Sofia-sip-devel] Using Codecs with Sophia Sip

2010-02-23 Thread Aleksander Morgado
Hi Thiago, I'm studying the Sophia Sip library and I have a doubt. How does the Sophia Sip Stack handles the codecs and the video streams. Sofia SIP doesn't really handle any 'data stream' like video or voice. It will just handle the required SIP communication, and may also work at

Re: [Sofia-sip-devel] newbie need help with compiling hello sample

2010-02-26 Thread Aleksander Morgado
Hi Pete, I tried configuring PKG but it does not work: PKG_CONFIG_PATH=/usr/local/include/sofia-sip-1.12/sofia-sip/ The PKG_CONFIG_PATH you need to configure is the place where the .pc file of sofia-sip is available. In your case, you didn't specify a explicit prefix when running

Re: [Sofia-sip-devel] Please, make the sigcomp plugin for sofia-sip free software

2010-03-15 Thread Aleksander Morgado
Hi Pekka, My humble request is then, please make the sigcomp plugin for sofia-sip free software, publicly available for everyone, so that we can keep on developing applications using the sofia-sip stack also including SigComp support. I'll have a peek on the libraries and see if one of

Re: [Sofia-sip-devel] Question aboiut NTA and sip_t

2010-06-10 Thread Aleksander Morgado
Hi Pete, I have read through all your posts on the mailing list and I would like to implement the same 1 listener , multiple worker model that you are mentioning here. I have question about how to use the SU api to sprawn thread for each incoming INVITE. Can you please share with me the

Re: [Sofia-sip-devel] FS HA-cluster

2010-07-13 Thread Aleksander Morgado
I have 2 servers freeswitch with sofia mod. Database both FS is shared. By means of installation Pacemaker, resource Cluster-IP is realised. At failure of primary FS, reserve FS receives Cluster-IP. The subsequent calls successfully pass through reserve freeswitch. Problem - current calls