> -----Ursprüngliche Nachricht----- > Von: "Stefano Sabatini" <[EMAIL PROTECTED]> > Gesendet: 05.06.08 18:13:48 > An: sofia-sip-devel Mailing List <sofia-sip-devel@lists.sourceforge.net> > Betreff: [Sofia-sip-devel] [NEWBIE] Can't send an invite
> Hi all, > > this is my first post here, I have a very newbie usage question and I > don't know if this is the right place wether to ask, so please tell me > if this is the case. > > I'm writing a little application in my sandbox to understand the basic > mechanisms of sofia-sip, here it is the code: > > /** > * Creates a communication handle, sends an INVITE request and destroys it. > */ > int send_invite (nua_t *nua, const char* callee) > { > nua_handle_t *handle; > > /* create an handle */ > handle = nua_handle(nua, NULL, > SIPTAG_TO_STR(callee), > TAG_END()); > > if (!handle) { > fprintf(stderr, "Failed to instantiate an handle for the invite\n"); > return -1; > } > > fprintf(stderr, "Sending the invite...\n"); > nua_invite(handle, > TAG_END()); > > nua_handle_destroy(handle); > return 0; > } > > What am I missing? > Hi Stefano, maybe this helps you: nua_invite(handle, NUTAG_MEDIA_ENABLE(0), TAG_END()); As far as i know this deactivates the SDP offer/answer engine for the call, which would wait for user sdp and won't send the invite if none is provided. You can activate the engine later in the call with: nua_set_hparams(handle, NUTAG_MEDIA_ENABLE(1), TAG_END()); By the way: if you destroy the handle directly after calling nua_invite(), sofia will end the call. Maybe this causes some trouble, two. Perhaps it would be better to destroy the handle in the event callback. Timo ______________________________________________________________ Jeden Monat 1 hochkarätiger maxdome-Blockbuster GRATIS! Exklusiv für alle WEB.DE Nutzer. http://www.blockbuster.web.de ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel