Hi, I'm new to use the nua. Two questions:
1) How do I access the SDP string returned by the server?
My codes basically send an INVITE to the server and try to get the SDP
string returned by the server in the n_r_invite event handler:
nua_invite((nua_handle_t *)channel->sip,
/* other tags as needed ... */
SOATAG_USER_SDP_STR(sdp),
TAG_END());
event_callback()
{
...
switch (event) {
/*
case nua_i_invite:
app_i_invite(status, phrase, nua, magic, nh, hmagic, sip, tags);
break;
*/
case nua_r_invite:
tl_gets(tags, SOATAG_USER_SDP_STR_REF(sdp), TAG_END());
....
}
However the
tl_gets(tags, SOATAG_USER_SDP_STR_REF(sdp), TAG_END());
doesn't give me anything back.
2) I trace the network messages:
nua: nh_create_handle: entering
nua: nua_invite: entering
nua(0x805aef0): signal r_invite
nua: nua_stack_set_params: entering
nua(0x805aef0): adding session usage
nua(): refresh session after 79 seconds (in [60..90])
send 855 bytes to udp/[10.27.194.49]:5060 at 19:43:04.375224:
------------------------------------------------------------------------
INVITE sip:10.27.194.49 SIP/2.0
Via: SIP/2.0/UDP 10.27.193.169;rport;branch=z9hG4bK7cSF8y8Utj8QN
Max-Forwards: 70
From: <sip:10.27.193.169>;tag=78Xt4mrmc99eF
To: <sip:10.27.194.49>
Call-ID: 99694a72-3318-122a-4890-bfa8abb329ff
CSeq: 79406756 INVITE
Contact: <sip:10.27.193.169>
User-Agent: sofia-sip/1.12.4
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE,
NOTIFY,
REFER, UPDATE
Supported: timer, 100rel
Session-Expires: 1800
Min-SE: 120
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 301
v=0
o=mrcp-0 4808738806949304415 9197155108052096321 IN IP4 10.27.193.169
s=-
t=0 0
m=application 9 TCP/MRCPv2 9
c=IN IP4 10.27.193.169
a=setup:active
a=connection:new
a=resource:speechrecog
a=cmid:1
m=audio 4000 RTP/AVP 0
c=IN IP4 10.27.193.169
a=rtpmap:0 pcmu/8000
a=sendonly
a=mid:1
------------------------------------------------------------------------
nua(0x805aef0): call state changed: init -> calling, sent offer
nua: nua_stack_event: entering
nua(0x805aef0): i_state INVITE sent
nua: nua_event: entering
(process:16688): MRCPv2-DEBUG: mrcpsip_callback(): chan=0
(process:16688): MRCPv2-DEBUG: nua=0x80551f8 magic=(nil) nh=0x805aef0
hmagic=0x8
05ac80: event=nua_i_state status=0 phrase=INVITE sent
(process:16688): MRCPv2-DEBUG: mrcpsip_callback(): event nua_i_state
ignored!
recv 996 bytes from udp/[10.27.194.49]:5060 at 19:43:04.383671:
------------------------------------------------------------------------
SIP/2.0 200 OK
To: <sip:10.27.194.49>;tag=7858404b
From: <sip:10.27.193.169>;tag=78Xt4mrmc99eF
Via: SIP/2.0/UDP
10.27.193.169;rport=5060;branch=z9hG4bK7cSF8y8Utj8QN;receive
d=10.27.193.169
Call-ID: 99694a72-3318-122a-4890-bfa8abb329ff
CSeq: 79406756 INVITE
Contact:
<sip:[EMAIL PROTECTED];transport=UDP>
Content-Type: application/sdp
Content-Length: 605
v=0
o=- 1171046679 1171046679 IN IP4 10.27.194.49
s=MRCP session
c=IN IP4 10.27.194.49
t=0 0
m=application 6075 TCP/MRCPv2
a=channel:[EMAIL PROTECTED]
a=cmid:1
a=connection:new
a=setup:passive
m=audio 7774 RTP/AVP 0 8 122 123 100 105 106 107 102 103 104
a=mid:1
a=recvonly
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:122 l16/8000
a=rtpmap:123 l16/11000
a=rtpmap:100 telephone-event/8000
a=rtpmap:105 dsr-es201108/8000
a=rtpmap:106 dsr-es201108/11000
a=rtpmap:107 dsr-es201108/16000
a=rtpmap:102 dsr-es202050/8000
a=rtpmap:103 dsr-es202050/11000
a=rtpmap:104 dsr-es202050/16000
------------------------------------------------------------------------
nua(): refresh session after 596 seconds (in [450..1350])
nua(0x805aef0): INVITE: processed SDP answer in 200 OK
nua: nua_stack_event: entering
nua(0x805aef0): r_invite 200 OK
nua(0x805aef0): call state changed: calling -> ready, received answer
nua: nua_stack_event: entering
nua(0x805aef0): i_state 200 OK
nua: nua_stack_event: entering
nua(0x805aef0): i_active 200 Call active
send 330 bytes to udp/[172.30.114.79]:5060 at 19:43:04.386752:
------------------------------------------------------------------------
ACK sip:[EMAIL PROTECTED];transport=UDP
SIP/2.0
Via: SIP/2.0/UDP 10.27.193.169;rport;branch=z9hG4bK8Nj89SSZQUyaH
Max-Forwards: 70
From: <sip:10.27.193.169>;tag=78Xt4mrmc99eF
To: <sip:10.27.194.49>;tag=7858404b
Call-ID: 99694a72-3318-122a-4890-bfa8abb329ff
CSeq: 79406756 ACK
Content-Length: 0
------------------------------------------------------------------------
>From the above log messages I see that the original INVITE was sent to
10.27.194.49 and received the 200 OK back from the same IP. However, the
following ACK was sent to 172.30.114.79. I don't know where the
172.30.114.79 address came from.
Thanks for your help.
Charles
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sofia-sip-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel