On Thu, May 15, 2008 at 8:36 PM, Damien Herraud <d.herraud at gmail.com> wrote: > Ok sorry I got confused ! > > For creating the socket, I reused the code from simpleua.c : > > pj_sockaddr_in addr; > > addr.sin_family = pj_AF_INET(); > addr.sin_addr.s_addr = 0; > addr.sin_port = pj_htons(5060); > > status = pjsip_udp_transport_start( g_endpt, &addr, NULL, 1, NULL); > if (status != PJ_SUCCESS) { > app_perror(THIS_FILE, "Unable to start UDP transport", status); > return 1; > } > So I can't directly use getsockname(). Can I still get my listening address > this way ? > If you have the SIP transport instance, you could use "local_name" field to get the listening address. Cheers Benny