I found a work around after looking at the NUA code. For the INVITE:
char empty = '\0'; nua_invite(tech_pvt->nh, NUTAG_AUTOANSWER(0), NUTAG_SESSION_TIMER(session_timeout), TAG_IF(tech_pvt->redirected, NUTAG_URL(tech_pvt->redirected)), TAG_IF(!zstr(tech_pvt->user_via), SIPTAG_VIA_STR(tech_pvt->user_via)), TAG_IF(!zstr(tech_pvt->rpid), SIPTAG_REMOTE_PARTY_ID_STR(tech_pvt->rpid)), TAG_IF(!zstr(tech_pvt->preferred_id), SIPTAG_P_PREFERRED_IDENTITY_STR(tech_pvt->preferred_id)), TAG_IF(!zstr(tech_pvt->asserted_id), SIPTAG_P_ASSERTED_IDENTITY_STR(tech_pvt->asserted_id)), TAG_IF(!zstr(tech_pvt->privacy), SIPTAG_PRIVACY_STR(tech_pvt->privacy)), TAG_IF(!zstr(alert_info), SIPTAG_HEADER_STR(alert_info)), TAG_IF(!zstr(extra_headers), SIPTAG_HEADER_STR(extra_headers)), TAG_IF(sofia_test_pflag(tech_pvt->profile, PFLAG_PASS_CALLEE_ID), SIPTAG_HEADER_STR("X-FS-Support: "FREESWITCH_SUPPORT)), TAG_IF(!zstr(max_forwards), SIPTAG_MAX_FORWARDS_STR(max_forwards)), TAG_IF(!zstr(route_uri), NUTAG_PROXY(route_uri)), TAG_IF(!zstr(route), SIPTAG_ROUTE_STR(route)), TAG_IF(tech_pvt->profile->minimum_session_expires, NUTAG_MIN_SE(tech_pvt->profile->minimum_session_expires)), SIPTAG_PAYLOAD_STR(&empty), // see nua_session.c:803 TAG_END()); There is a line in nua_session.c, in the nua_invite_client_request function: if (sip->sip_payload) offer_sent = 0; /* XXX - kludge */ That allows you to set the payload in the INVITE instead of an offer, I just passed a NIL string in as the payload. In the sofia_handle_sip_i_state function you can get the remote SDP from the OK by doing the following: tl_gets(tags, NUTAG_CALLSTATE_REF(ss_state), NUTAG_OFFER_RECV_REF(offer_recv), NUTAG_ANSWER_RECV_REF(answer_recv), NUTAG_OFFER_SENT_REF(offer_sent), NUTAG_ANSWER_SENT_REF(answer_sent), SIPTAG_REPLACES_STR_REF(replaces_str), SOATAG_LOCAL_SDP_STR_REF(l_sdp), SOATAG_REMOTE_SDP_STR_REF(r_sdp), TAG_END()); When I got the nua_callstate_completing event/state, I sent the ACK using this: nua_ack(nh, SIPTAG_CONTACT_STR(tech_pvt->reply_contact), SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), SOATAG_REUSE_REJECTED(1), SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"), TAG_IF(sofia_test_pflag(profile, PFLAG_DISABLE_100REL), NUTAG_INCLUDE_EXTRA_SDP(1)), TAG_END()); It is an ugly work around, but it works for me. Hope this helps. Sandeep On 2010-04-09, at 8:46 AM, Daniel Eli wrote: > >>> I was able to generate an INVITE without an SDP by using the >>> NUTAG_MEDIA_ENABLE(0) tag when I call nua_invite. The downside >>> of doing that is the soa is disabled. > >>> Does anyone know of a better way to start a call with no SDP? > > I have the same problem. Following the NUA call mode > [http://sofia-sip.sourceforge.net/refdocs/nua/nua_call_model.html], I've also > used the tag NUTAG_MEDIA_ENABLE(0) in nua_invite() to disable sdp, but I > can't include SDP in the ACK. When I try to do that, an internal error occurs. > > My attempt is something like this: > ... > nua_ack(nh, > TAG_IF(tpcc, NUTAG_MEDIA_ENABLE(1)), > TAG_IF(tpcc,SOATAG_USER_SDP_STR(loc_sdp)), > TAG_END()); > ... > > So, is there any way to perform the Third Party Call Control mode ? > > Thanks, > Daniel. > > > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Sofia-sip-devel mailing list > Sofia-sip-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel