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
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel