Re: [pjsip] PJSUA-LIB - cannot get remote sdp

JL
JOHAN LANTZ
Fri, Feb 17, 2017 7:04 AM

void (*on_call_sdp_created)(pjsua_call_id call_id,

    pjmedia_sdp_session *sdp,

    pj_pool_t *pool,

    const pjmedia_sdp_session *rem_sdp);

/Johan

From: pjsip on behalf of Nenad Milidrag
Reply-To: pjsip list
Date: Thursday, 16 February 2017 at 22:03
To: "pjsip@lists.pjsip.orgmailto:pjsip@lists.pjsip.org"
Subject: [pjsip] PJSUA-LIB - cannot get remote sdp

Hi all,

If I am using PJSUA-LIB API is there an easy way to get local and remote SDP.  I really need media address and port from it.  From what I see I have to move do different interface which is one level below (PJSIP, PJMEDIA, and PJNATH) and lose all benefits provided by PJSUA-LIB.  Trying to avoid moving one level lower since just managing registrations seems to be much harder.

Thanks,

Nenad

void (*on_call_sdp_created)(pjsua_call_id call_id, pjmedia_sdp_session *sdp, pj_pool_t *pool, const pjmedia_sdp_session *rem_sdp); /Johan From: pjsip on behalf of Nenad Milidrag Reply-To: pjsip list Date: Thursday, 16 February 2017 at 22:03 To: "pjsip@lists.pjsip.org<mailto:pjsip@lists.pjsip.org>" Subject: [pjsip] PJSUA-LIB - cannot get remote sdp Hi all, If I am using PJSUA-LIB API is there an easy way to get local and remote SDP. I really need media address and port from it. From what I see I have to move do different interface which is one level below (PJSIP, PJMEDIA, and PJNATH) and lose all benefits provided by PJSUA-LIB. Trying to avoid moving one level lower since just managing registrations seems to be much harder. Thanks, Nenad
NM
Nenad Milidrag
Tue, Feb 21, 2017 7:57 PM

Hi Johan,

Thanks for the message.

I didn’t formulated my questions well, I need IP:port that is in SDP answer.  Callback you mentioned works well if you need to modify SDP before it is send, offer or answer, but if you need to check received SDP answer then there is no callback for that at least I don’t see anything.  Perhaps there is still a way to get it?

Thanks,

Nenad

From: pjsip [mailto:pjsip-bounces@lists.pjsip.org] On Behalf Of JOHAN LANTZ
Sent: Friday, February 17, 2017 2:04 AM
To: pjsip list
Subject: Re: [pjsip] PJSUA-LIB - cannot get remote sdp

void (*on_call_sdp_created)(pjsua_call_id call_id,

    pjmedia_sdp_session *sdp,

    pj_pool_t *pool,

    const pjmedia_sdp_session *rem_sdp);

/Johan

From: pjsip on behalf of Nenad Milidrag
Reply-To: pjsip list
Date: Thursday, 16 February 2017 at 22:03
To: "pjsip@lists.pjsip.orgmailto:pjsip@lists.pjsip.org"
Subject: [pjsip] PJSUA-LIB - cannot get remote sdp

Hi all,

If I am using PJSUA-LIB API is there an easy way to get local and remote SDP.  I really need media address and port from it.  From what I see I have to move do different interface which is one level below (PJSIP, PJMEDIA, and PJNATH) and lose all benefits provided by PJSUA-LIB.  Trying to avoid moving one level lower since just managing registrations seems to be much harder.

Thanks,

Nenad

Hi Johan, Thanks for the message. I didn’t formulated my questions well, I need IP:port that is in SDP answer. Callback you mentioned works well if you need to modify SDP before it is send, offer or answer, but if you need to check received SDP answer then there is no callback for that at least I don’t see anything. Perhaps there is still a way to get it? Thanks, Nenad From: pjsip [mailto:pjsip-bounces@lists.pjsip.org] On Behalf Of JOHAN LANTZ Sent: Friday, February 17, 2017 2:04 AM To: pjsip list Subject: Re: [pjsip] PJSUA-LIB - cannot get remote sdp void (*on_call_sdp_created)(pjsua_call_id call_id, pjmedia_sdp_session *sdp, pj_pool_t *pool, const pjmedia_sdp_session *rem_sdp); /Johan From: pjsip on behalf of Nenad Milidrag Reply-To: pjsip list Date: Thursday, 16 February 2017 at 22:03 To: "pjsip@lists.pjsip.org<mailto:pjsip@lists.pjsip.org>" Subject: [pjsip] PJSUA-LIB - cannot get remote sdp Hi all, If I am using PJSUA-LIB API is there an easy way to get local and remote SDP. I really need media address and port from it. From what I see I have to move do different interface which is one level below (PJSIP, PJMEDIA, and PJNATH) and lose all benefits provided by PJSUA-LIB. Trying to avoid moving one level lower since just managing registrations seems to be much harder. Thanks, Nenad
JL
JOHAN LANTZ
Wed, Feb 22, 2017 6:49 AM

Maybe you can use on_call_state or on_call_tsx_state then check the content of the pjsip_event. Something like:

if (call_info.state == PJSIP_INV_STATE_CONNECTING && call_info.role == PJSIP_ROLE_UAC) {

char* sdp_body_as_string = e->body.rx_msg.rdata->msg_info.msg_buf; //now just parse the text string for your port or build a proper sdp using the pjsip tools and work with that one

}

I do some manual processing of a sdp here:
https://github.com/johanlantz/pj-nat64/blob/master/pj-nat64.c#L316

Maybe it can help you get started.

Johan

From: pjsip on behalf of Nenad Milidrag
Reply-To: pjsip list
Date: Tuesday, 21 February 2017 at 20:57
To: pjsip list
Subject: Re: [pjsip] PJSUA-LIB - cannot get remote sdp

Hi Johan,

Thanks for the message.

I didn’t formulated my questions well, I need IP:port that is in SDP answer.  Callback you mentioned works well if you need to modify SDP before it is send, offer or answer, but if you need to check received SDP answer then there is no callback for that at least I don’t see anything.  Perhaps there is still a way to get it?

Thanks,

Nenad

From: pjsip [mailto:pjsip-bounces@lists.pjsip.org] On Behalf Of JOHAN LANTZ
Sent: Friday, February 17, 2017 2:04 AM
To: pjsip list
Subject: Re: [pjsip] PJSUA-LIB - cannot get remote sdp

void (*on_call_sdp_created)(pjsua_call_id call_id,

    pjmedia_sdp_session *sdp,

    pj_pool_t *pool,

    const pjmedia_sdp_session *rem_sdp);

/Johan

From: pjsip on behalf of Nenad Milidrag
Reply-To: pjsip list
Date: Thursday, 16 February 2017 at 22:03
To: "pjsip@lists.pjsip.orgmailto:pjsip@lists.pjsip.org"
Subject: [pjsip] PJSUA-LIB - cannot get remote sdp

Hi all,

If I am using PJSUA-LIB API is there an easy way to get local and remote SDP.  I really need media address and port from it.  From what I see I have to move do different interface which is one level below (PJSIP, PJMEDIA, and PJNATH) and lose all benefits provided by PJSUA-LIB.  Trying to avoid moving one level lower since just managing registrations seems to be much harder.

Thanks,

Nenad

Maybe you can use on_call_state or on_call_tsx_state then check the content of the pjsip_event. Something like: if (call_info.state == PJSIP_INV_STATE_CONNECTING && call_info.role == PJSIP_ROLE_UAC) { char* sdp_body_as_string = e->body.rx_msg.rdata->msg_info.msg_buf; //now just parse the text string for your port or build a proper sdp using the pjsip tools and work with that one } I do some manual processing of a sdp here: https://github.com/johanlantz/pj-nat64/blob/master/pj-nat64.c#L316 Maybe it can help you get started. Johan From: pjsip on behalf of Nenad Milidrag Reply-To: pjsip list Date: Tuesday, 21 February 2017 at 20:57 To: pjsip list Subject: Re: [pjsip] PJSUA-LIB - cannot get remote sdp Hi Johan, Thanks for the message. I didn’t formulated my questions well, I need IP:port that is in SDP answer. Callback you mentioned works well if you need to modify SDP before it is send, offer or answer, but if you need to check received SDP answer then there is no callback for that at least I don’t see anything. Perhaps there is still a way to get it? Thanks, Nenad From: pjsip [mailto:pjsip-bounces@lists.pjsip.org] On Behalf Of JOHAN LANTZ Sent: Friday, February 17, 2017 2:04 AM To: pjsip list Subject: Re: [pjsip] PJSUA-LIB - cannot get remote sdp void (*on_call_sdp_created)(pjsua_call_id call_id, pjmedia_sdp_session *sdp, pj_pool_t *pool, const pjmedia_sdp_session *rem_sdp); /Johan From: pjsip on behalf of Nenad Milidrag Reply-To: pjsip list Date: Thursday, 16 February 2017 at 22:03 To: "pjsip@lists.pjsip.org<mailto:pjsip@lists.pjsip.org>" Subject: [pjsip] PJSUA-LIB - cannot get remote sdp Hi all, If I am using PJSUA-LIB API is there an easy way to get local and remote SDP. I really need media address and port from it. From what I see I have to move do different interface which is one level below (PJSIP, PJMEDIA, and PJNATH) and lose all benefits provided by PJSUA-LIB. Trying to avoid moving one level lower since just managing registrations seems to be much harder. Thanks, Nenad
NM
Nenad Milidrag
Wed, Feb 22, 2017 2:17 PM

Hi Johan,

OK, that will do.

Thanks,

Nenad

From: pjsip [mailto:pjsip-bounces@lists.pjsip.org] On Behalf Of JOHAN LANTZ
Sent: Wednesday, February 22, 2017 1:50 AM
To: pjsip list
Subject: Re: [pjsip] PJSUA-LIB - cannot get remote sdp

Maybe you can use on_call_state or on_call_tsx_state then check the content of the pjsip_event. Something like:

if (call_info.state == PJSIP_INV_STATE_CONNECTING && call_info.role == PJSIP_ROLE_UAC) {

char* sdp_body_as_string = e->body.rx_msg.rdata->msg_info.msg_buf; //now just parse the text string for your port or build a proper sdp using the pjsip tools and work with that one

}

I do some manual processing of a sdp here:
https://github.com/johanlantz/pj-nat64/blob/master/pj-nat64.c#L316

Maybe it can help you get started.

Johan

From: pjsip on behalf of Nenad Milidrag
Reply-To: pjsip list
Date: Tuesday, 21 February 2017 at 20:57
To: pjsip list
Subject: Re: [pjsip] PJSUA-LIB - cannot get remote sdp

Hi Johan,

Thanks for the message.

I didn’t formulated my questions well, I need IP:port that is in SDP answer.  Callback you mentioned works well if you need to modify SDP before it is send, offer or answer, but if you need to check received SDP answer then there is no callback for that at least I don’t see anything.  Perhaps there is still a way to get it?

Thanks,

Nenad

From: pjsip [mailto:pjsip-bounces@lists.pjsip.org] On Behalf Of JOHAN LANTZ
Sent: Friday, February 17, 2017 2:04 AM
To: pjsip list
Subject: Re: [pjsip] PJSUA-LIB - cannot get remote sdp

void (*on_call_sdp_created)(pjsua_call_id call_id,

    pjmedia_sdp_session *sdp,

    pj_pool_t *pool,

    const pjmedia_sdp_session *rem_sdp);

/Johan

From: pjsip on behalf of Nenad Milidrag
Reply-To: pjsip list
Date: Thursday, 16 February 2017 at 22:03
To: "pjsip@lists.pjsip.orgmailto:pjsip@lists.pjsip.org"
Subject: [pjsip] PJSUA-LIB - cannot get remote sdp

Hi all,

If I am using PJSUA-LIB API is there an easy way to get local and remote SDP.  I really need media address and port from it.  From what I see I have to move do different interface which is one level below (PJSIP, PJMEDIA, and PJNATH) and lose all benefits provided by PJSUA-LIB.  Trying to avoid moving one level lower since just managing registrations seems to be much harder.

Thanks,

Nenad

Hi Johan, OK, that will do. Thanks, Nenad From: pjsip [mailto:pjsip-bounces@lists.pjsip.org] On Behalf Of JOHAN LANTZ Sent: Wednesday, February 22, 2017 1:50 AM To: pjsip list Subject: Re: [pjsip] PJSUA-LIB - cannot get remote sdp Maybe you can use on_call_state or on_call_tsx_state then check the content of the pjsip_event. Something like: if (call_info.state == PJSIP_INV_STATE_CONNECTING && call_info.role == PJSIP_ROLE_UAC) { char* sdp_body_as_string = e->body.rx_msg.rdata->msg_info.msg_buf; //now just parse the text string for your port or build a proper sdp using the pjsip tools and work with that one } I do some manual processing of a sdp here: https://github.com/johanlantz/pj-nat64/blob/master/pj-nat64.c#L316 Maybe it can help you get started. Johan From: pjsip on behalf of Nenad Milidrag Reply-To: pjsip list Date: Tuesday, 21 February 2017 at 20:57 To: pjsip list Subject: Re: [pjsip] PJSUA-LIB - cannot get remote sdp Hi Johan, Thanks for the message. I didn’t formulated my questions well, I need IP:port that is in SDP answer. Callback you mentioned works well if you need to modify SDP before it is send, offer or answer, but if you need to check received SDP answer then there is no callback for that at least I don’t see anything. Perhaps there is still a way to get it? Thanks, Nenad From: pjsip [mailto:pjsip-bounces@lists.pjsip.org] On Behalf Of JOHAN LANTZ Sent: Friday, February 17, 2017 2:04 AM To: pjsip list Subject: Re: [pjsip] PJSUA-LIB - cannot get remote sdp void (*on_call_sdp_created)(pjsua_call_id call_id, pjmedia_sdp_session *sdp, pj_pool_t *pool, const pjmedia_sdp_session *rem_sdp); /Johan From: pjsip on behalf of Nenad Milidrag Reply-To: pjsip list Date: Thursday, 16 February 2017 at 22:03 To: "pjsip@lists.pjsip.org<mailto:pjsip@lists.pjsip.org>" Subject: [pjsip] PJSUA-LIB - cannot get remote sdp Hi all, If I am using PJSUA-LIB API is there an easy way to get local and remote SDP. I really need media address and port from it. From what I see I have to move do different interface which is one level below (PJSIP, PJMEDIA, and PJNATH) and lose all benefits provided by PJSUA-LIB. Trying to avoid moving one level lower since just managing registrations seems to be much harder. Thanks, Nenad