Hello!

Sorry, that already was mentioned here, but...

1) I have study ssc_sip.c in sofsip_cli, but still have some questions
regarding common codec selection:

void ssc_i_state(int status, char const *phrase,
       nua_t *nua, ssc_t *ssc,
       nua_handle_t *nh, ssc_oper_t *op, sip_t const *sip,
       tagi_t tags[])
{
.....
  if (l_sdp) {
    g_return_if_fail(answer_sent || offer_sent);
    g_object_set(G_OBJECT(ssc->ssc_media), "localsdp", l_sdp, NULL);
    /* printf("%s: local SDP updated:\n%s\n\n", ssc->ssc_name, l_sdp); */
  }

  if (r_sdp) {
    g_return_if_fail(answer_recv || offer_recv);
    g_object_set(G_OBJECT(ssc->ssc_media), "remotesdp", r_sdp, NULL);
    /* printf("%s: remote SDP updated:\n%s\n\n", ssc->ssc_name, r_sdp); */
  }
....
}

In that example we don't have one single finall point at which we have
common negotiated codecs, especially if offer contain more than one codec.

How should it look if we have only one codec per call, that should be
started in one of mode (PCMU, PCMA, G.723, etc...) only after we have got a
finally negotiated SDP?

I suppose that it should be done in such way:

if ( answer_sent ) /* we should use result in l_sdp */;
if ( answer_recv ) /*we should use result in r_sdp */;

Is it right??

2) Some another question. Is SOATAG_RTP_SELECT(x) functional in current
Sofia-SIP version?  In my application i am trying to use
SOATAG_USER_SDP_STR("v=0\nm=audio 5004 RTP/AVP 8 0\na=rtpmap:8
PCMA/8000\na=rtpmap:0 PCMU/8000") with nua_create and SOATAG_RTP_SELECT(1)
with nua_set_params. But when answer is sent to another endpoint (which have
offered both PCMA and PCMU in INVITE), it contain only one common codec
(PCMA). (Same results with SOATAG_RTP_SELECT(2)).

3) What purpose of SOATAG_CAPS_SDP? How it relate with SOATAG_USER_SDP,
SOATAG_REMOTE_SDP and SOATAG_LOCAL_SDP?

Thanks.

Reply via email to