Re: [Sofia-sip-devel] Missing NUA callbacks with su_glib

2008-04-29 Thread Alexander Beisig
Alexander Beisig schrieb:
 [EMAIL PROTECTED] schrieb:
 Hi, 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of ext Alexander Beisig
 Sent: Monday, April 21, 2008 8:24 PM
 To: sofia-sip-devel@lists.sourceforge.net
 Subject: [Sofia-sip-devel] Missing NUA callbacks with su_glib

 When I compile this program against sofia-sip 1.12.8, run it and call 
 the machine running it with a SIP phone, I don't get any callback 
 output.  If I uncomment the line that starts the timer, I get both 
 timeout and callback messages when doing the same test.  I 
 think the 
 NUA callback function should be called regardless of the timer.  Am I 
 missing something?
 The code does not create any requests that would produce (non-bogus) NUA 
 events.
 Try nua_register() or something.
 
 Like I said, I used an (external) SIP phone to call the application. 
  From my understanding, the callback function should be called at least 
 with a nua_i_invite event, and possibly some nua_i_state events.
 
 Kind regards,
 Alexander Beisig

Since I didn't hear any news on this issue I did some more researching. 
  There are two ways that I know of that a source can use to interrupt 
the GLib main loop:  Either by specifing a timeout value, or by 
registering a file descriptor to poll for new input.  Since my example 
program works with the timer code uncommented, I assume that su-glib 
doesn't have problems with the timeout method of interrupting the event 
loop.

To test whether su-glib also correctly registers its UDP socket as a FD 
to poll, I ran my example code in gdb with breakpoints set for 
g_main_context_add_poll and g_source_add_poll.  Neither of these 
breakpoints were reached before the program entered the GLib main loop. 
  If the UDP socket is indeed not registered as a FD to poll then I 
think that's a pretty major bug in su-glib. Unfortunately I don't 
understand the sofia-sip code enough to check this throughly and tell 
where or when the registering of the UDP socket should take place.

Kind regards,
Alexander Beisig

-- 
[EMAIL PROTECTED]
Telefon +49 (0) 89 89458-326
--
Speech Design GmbH
Industriestraße 1
82110 Germering
Germany
--
Geschäftsführer: Kasimir Arciszewski, Hans Meiler
Amtsgericht München, HRB 69353 - USt-IdNr./VAT No. DE 128 245 077

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Missing NUA callbacks with su_glib

2008-04-22 Thread mikhail.zabaluev
Hi, 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On 
Behalf Of ext Alexander Beisig
Sent: Monday, April 21, 2008 8:24 PM
To: sofia-sip-devel@lists.sourceforge.net
Subject: [Sofia-sip-devel] Missing NUA callbacks with su_glib

When I compile this program against sofia-sip 1.12.8, run it and call 
the machine running it with a SIP phone, I don't get any callback 
output.  If I uncomment the line that starts the timer, I get both 
timeout and callback messages when doing the same test.  I 
think the 
NUA callback function should be called regardless of the timer.  Am I 
missing something?

The code does not create any requests that would produce (non-bogus) NUA events.
Try nua_register() or something.

Best regards,
  Mikhail

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


Re: [Sofia-sip-devel] Missing NUA callbacks with su_glib

2008-04-22 Thread Alexander Beisig
[EMAIL PROTECTED] schrieb:
 Hi, 
 
 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of ext Alexander Beisig
 Sent: Monday, April 21, 2008 8:24 PM
 To: sofia-sip-devel@lists.sourceforge.net
 Subject: [Sofia-sip-devel] Missing NUA callbacks with su_glib

 When I compile this program against sofia-sip 1.12.8, run it and call 
 the machine running it with a SIP phone, I don't get any callback 
 output.  If I uncomment the line that starts the timer, I get both 
 timeout and callback messages when doing the same test.  I 
 think the 
 NUA callback function should be called regardless of the timer.  Am I 
 missing something?
 
 The code does not create any requests that would produce (non-bogus) NUA 
 events.
 Try nua_register() or something.

Like I said, I used an (external) SIP phone to call the application. 
 From my understanding, the callback function should be called at least 
with a nua_i_invite event, and possibly some nua_i_state events.

Kind regards,
Alexander Beisig

-- 
[EMAIL PROTECTED]
Telefon +49 (0) 89 89458-326
--
Speech Design GmbH
Industriestraße 1
82110 Germering
Germany
--
Geschäftsführer: Kasimir Arciszewski, Hans Meiler
Amtsgericht München, HRB 69353 - USt-IdNr./VAT No. DE 128 245 077

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel


[Sofia-sip-devel] Missing NUA callbacks with su_glib

2008-04-21 Thread Alexander Beisig
Hello,

my callback function for nua_create doesn't seem to be called when I'm 
using the su_glib functions to integrate sofia with GLib.  Minimal and 
ugly example code:

#include glib.h
#include sofia-sip/su_glib.h
#include stdio.h
#include sofia-sip/nua.h

void timerf(su_root_magic_t *magic, su_timer_t *t, su_timer_arg_t *arg)
{
   printf(timeout\n);
}

void nuacf(nua_event_t event, int status, char const *phrase,
   nua_t *nua, nua_magic_t *m, nua_handle_t *handle, nua_hmagic_t *hm,
   sip_t const *sip, tagi_t tags[])
{
   printf(callback\n);
}

int main(int argc, char *argv[])
{
   GMainLoop *ptr = g_main_loop_new(NULL, FALSE);
   su_root_t *sofia_event_loop = su_glib_root_create(NULL);
   GSource *gsource = su_glib_root_gsource(sofia_event_loop);

   g_source_attach(gsource, g_main_loop_get_context(ptr));
   su_timer_t *timer = su_timer_create(su_root_task(sofia_event_loop),
 500);
   /*su_timer_run(timer, timerf, 0);*/
   nua_create(sofia_event_loop, nuacf, 0, TAG_NULL());

   g_main_loop_run(ptr);
   return 0;
}

When I compile this program against sofia-sip 1.12.8, run it and call 
the machine running it with a SIP phone, I don't get any callback 
output.  If I uncomment the line that starts the timer, I get both 
timeout and callback messages when doing the same test.  I think the 
NUA callback function should be called regardless of the timer.  Am I 
missing something?

Best regards,
Alexander Beisig


-- 
[EMAIL PROTECTED]
Telefon +49 (0) 89 89458-326
--
Speech Design GmbH
Industriestraße 1
82110 Germering
Germany
--
Geschäftsführer: Kasimir Arciszewski, Hans Meiler
Amtsgericht München, HRB 69353 - USt-IdNr./VAT No. DE 128 245 077

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel