Hi Ovidiu,

indeed there was a bogus ERROR message in extract_mediaip() - I removed it.

regarding the fix_nated_sdp("1", "10.111.5.15 <http://10.111.5.15>"); call, the problem is that you do not set the flag for replacing the IP in c= or o= line (02 or 08 flags). The flag presence is mandatory since the IP can be pushed in different locations into the SDP - and via flags you control where to be pushed. I made a note in the docs in order to avoid this kind of misunderstanding for the feature.

regards,
bogdan


Ovidiu Sas wrote:

Hi Bogdan,

Here's the setup:
- openser is running on a multihomed box: 10.110.1.174/10.111.5.15 <http://10.110.1.174/10.111.5.15>
 - the mhomed is set to 1
- an INVITE is received on 10.110.1.174 <http://10.110.1.174> interface and sent out on the 10.111.5.15 <http://10.111.5.15> one

I will provide two scenarios: working and non-working:

Here's a working example:
pls note the ERROR probe inside the logs:

<openser.cfg>
                                if (!search("^Content-Length:[ ]*0")) {
xlog("L_INFO", "S fix_nated_sdp(3)\n");
                                        fix_nated_sdp("3");
xlog("L_INFO", "E fix_nated_sdp()\n");
                                };

openser.log:
 S fix_nated_sdp(3)
 parse_headers: flags=ffffffffffffffff
 DEBUG:check_content_type: type <application/sdp> found valid
 ERROR: extract_mediaip: no `c=' in SDP
 xl_printf: final buffer length 18
 E fix_nated_sdp()


incoming INVITE:
INVITE sip:[EMAIL PROTECTED] :5060;transport=udp SIP/2.0.
Record-Route: <sip:10.110.48.7 <http://10.110.48.7>;ftag=6cf2bcbc-soma;lr>. Record-Route: <sip:10.110.49.7 <http://10.110.49.7>;r2=on;ftag=6cf2bcbc-soma;lr=on>. Record-Route: <sip:10.110.50.1 <http://10.110.50.1>;r2=on;ftag=6cf2bcbc-soma;lr=on>. Via: SIP/2.0/UDP 10.110.48.7 <http://10.110.48.7>;branch=z9hG4bK225e.8aade426.0. Via: SIP/2.0/UDP 10.110.49.7 <http://10.110.49.7>;branch=z9hG4bK225e.14b9ec51.0. Via: SIP/2.0/UDP 10.110.50.4:5060 <http://10.110.50.4:5060>;branch=z9hG54b5de05. From: line0 < sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]>>;tag=6cf2bcbc-soma.
To: <sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]>>.
Call-ID: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>.
CSeq: 69 INVITE.
Contact: line0 <sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]>;transport=udp>.
Max-Forwards: 68.
User-Agent: ssua-v6.1.6.
Organization: .
Priority: normal.
Supported: 100rel.
P-Preferred-Identity: line0 <sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]>>. Remote-Party-ID: line0 <sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]>>;party=calling;screen=yes;privacy=off.
SOMA-Extension: testcall.
Supported: timer.
Min-SE: 600.
Allow: ACK, BYE, CANCEL, INFO, INVITE, PRACK, NOTIFY, OPTIONS, SUBSCRIBE.
Accept: application/sdp, application/simple-message-summary.
Content-Type: application/sdp.
Content-Length:   210.
.
v=0.
o=ssua-v6.1.6 34 1 IN IP4 10.110.50.4 <http://10.110.50.4>.
s=Session SDP.
c=IN IP4 10.110.50.4 <http://10.110.50.4> .
t=0 0.
m=audio 10038 RTP/AVP 18 101.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=yes.
a=ptime:10.
a=rtpmap:101 telephone-event/8000.

outgoing INVITE:
INVITE sip:[EMAIL PROTECTED]:5060;transport=udp SIP/2.0
Record-Route: <sip:10.111.5.15 <http://10.111.5.15>;r2=on;lr;ftag=6cf2bcbc-soma> Record-Route: <sip:10.110.1.174 <http://10.110.1.174>;r2=on;lr;ftag=6cf2bcbc-soma> Record-Route: <sip: 10.110.48.7 <http://10.110.48.7>;ftag=6cf2bcbc-soma;lr> Record-Route: <sip:10.110.49.7 <http://10.110.49.7>;r2=on;ftag=6cf2bcbc-soma;lr=on> Record-Route: <sip: 10.110.50.1 <http://10.110.50.1>;r2=on;ftag=6cf2bcbc-soma;lr=on> Via: SIP/2.0/UDP 10.111.5.15 <http://10.111.5.15>;branch=z9hG4bK225e.5f208097.0 Via: SIP/2.0/UDP 10.110.48.7 <http://10.110.48.7>;branch=z9hG4bK225e.8aade426.0 Via: SIP/2.0/UDP 10.110.49.7 <http://10.110.49.7>;branch=z9hG4bK225e.14b9ec51.0 Via: SIP/2.0/UDP 10.110.50.4:5060 <http://10.110.50.4:5060>;branch=z9hG54b5de05 From: line0 < sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]>>;tag=6cf2bcbc-soma
To: <sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]>>
Call-ID: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
CSeq: 69 INVITE
Contact: line0 <sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]>;transport=udp>
Max-Forwards: 67
User-Agent: ssua-v6.1.6
Organization:
Priority: normal
Supported: 100rel
P-Preferred-Identity: line0 <sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]>> Remote-Party-ID: line0 <sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]>>;party=calling;screen=yes;privacy=off
SOMA-Extension: testcall
Supported: timer
Min-SE: 600
Allow: ACK, BYE, CANCEL, INFO, INVITE, PRACK, NOTIFY, OPTIONS, SUBSCRIBE
Accept: application/sdp, application/simple-message-summary
Content-Type: application/sdp
Content-Length: 256

v=0
o=ssua-v6.1.6 34 1 IN IP4 10.110.50.4 <http://10.110.50.4>
s=Session SDP
c=IN IP4 10.110.48.7 <http://10.110.48.7>
t=0 0
m=audio 10038 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=yes
a=ptime:10
a=rtpmap:101 telephone-event/8000
a=direction:active
a=oldmediaip:10.110.50.4 <http://10.110.50.4>


Note: the outgoing INVITE is big and it was fragmented!!!



The non-working scenario:

<openser.cfg>
                                if (!search("^Content-Length:[ ]*0")) {
xlog("L_INFO", "S fix_nated_sdp(1, 10.111.5.15 <http://10.111.5.15>)\n"); fix_nated_sdp("1", "10.111.5.15 <http://10.111.5.15>"); xlog("L_INFO", "E fix_nated_sdp()\n");
                                };


openser.log:
 S fix_nated_sdp(1, 10.111.5.15 <http://10.111.5.15>)
 parse_headers: flags=ffffffffffffffff
 DEBUG:check_content_type: type <application/sdp> found valid
 xl_printf: final buffer length 18
 E fix_nated_sdp()


Incoming INVITE:
INVITE sip:[EMAIL PROTECTED]:5060;transport=udp SIP/2.0.
Record-Route: <sip:10.110.48.7 <http://10.110.48.7>;ftag=755cbe38-soma;lr>. Record-Route: <sip:10.110.49.7 <http://10.110.49.7>;r2=on;ftag=755cbe38-soma;lr=on>. Record-Route: <sip:10.110.50.1 <http://10.110.50.1>;r2=on;ftag=755cbe38-soma;lr=on>. Via: SIP/2.0/UDP 10.110.48.7 <http://10.110.48.7>;branch=z9hG4bK0e74.76905b42.0. Via: SIP/2.0/UDP 10.110.49.7 <http://10.110.49.7>;branch=z9hG4bK0e74.8a13c771.0. Via: SIP/2.0/UDP 10.110.50.4:5060 <http://10.110.50.4:5060>;branch=z9hG25465b05. From: line0 <sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]>>;tag=755cbe38-soma.
To: <sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]>>.
Call-ID: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>.
CSeq: 73 INVITE.
Contact: line0 <sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]>;transport=udp>.
Max-Forwards: 68.
User-Agent: ssua-v6.1.6.
Organization: .
Priority: normal.
Supported: 100rel.
P-Preferred-Identity: line0 <sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]> >. Remote-Party-ID: line0 <sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]>>;party=calling;screen=yes;privacy=off.
SOMA-Extension: testcall.
Supported: timer.
Min-SE: 600.
Allow: ACK, BYE, CANCEL, INFO, INVITE, PRACK, NOTIFY, OPTIONS, SUBSCRIBE.
Accept: application/sdp, application/simple-message-summary.
Content-Type: application/sdp.
Content-Length:   210.
.
v=0.o=ssua-v6.1.6 36 1 IN IP4 10.110.50.4 <http://10.110.50.4>.
s=Session SDP.
c=IN IP4 10.110.50.4 <http://10.110.50.4>.
t=0 0.
m=audio 10094 RTP/AVP 18 101.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=yes.
a=ptime:10.
a=rtpmap:101 telephone-event/8000.


Outgoing INVITE:
INVITE sip:[EMAIL PROTECTED]:5060;transport=udp SIP/2.0
Record-Route: <sip:10.111.5.15 <http://10.111.5.15>;r2=on;lr;ftag=755cbe38-soma> Record-Route: <sip:10.110.1.174 <http://10.110.1.174>;r2=on;lr;ftag=755cbe38-soma>
Record-Route: <sip:10.110.48.7 <http://10.110.48.7>;ftag=755cbe38-soma;lr>
Record-Route: <sip: 10.110.49.7 <http://10.110.49.7>;r2=on;ftag=755cbe38-soma;lr=on> Record-Route: <sip:10.110.50.1 <http://10.110.50.1>;r2=on;ftag=755cbe38-soma;lr=on> Via: SIP/2.0/UDP 10.111.5.15 <http://10.111.5.15>;branch=z9hG4bK0e74.66d85c63.0 Via: SIP/2.0/UDP 10.110.48.7 <http://10.110.48.7>;branch=z9hG4bK0e74.76905b42.0 Via: SIP/2.0/UDP 10.110.49.7 <http://10.110.49.7>;branch=z9hG4bK0e74.8a13c771.0 Via: SIP/2.0/UDP 10.110.50.4:5060 <http://10.110.50.4:5060>;branch=z9hG25465b05 From: line0 <sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]>>;tag=755cbe38-soma
To: < sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]>>
Call-ID: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
CSeq: 73 INVITE
Contact: line0 < sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]>;transport=udp>
Max-Forwards: 67
User-Agent: ssua-v6.1.6
Organization:
Priority: normal
Supported: 100rel
P-Preferred-Identity: line0 < sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]>> Remote-Party-ID: line0 <sip:[EMAIL PROTECTED] <mailto:sip:[EMAIL PROTECTED]>>;party=calling;screen=yes;privacy=off
SOMA-Extension: testcall
Supported: timer
Min-SE: 600
Allow: ACK, BYE, CANCEL, INFO, INVITE, PRACK, NOTIFY, OPTIONS, SUBSCRIBE
Accept: application/sdp, application/simple-message-summary
Content-Type: application/sdp
Content-Length: 230

v=0
o=ssua-v6.1.6 36 1 IN IP4 10.110.50.4 <http://10.110.50.4>
s=Session SDP
c=IN IP4 10.110.50.4 <http://10.110.50.4>
t=0 0
m=audio 10094 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=yes
a=ptime:10
a=rtpmap:101 telephone-event/8000
a=direction:active


Note: there are no ERROR probes like in the previous scenario, but the IP is untouched.



Regards,
-ovi



_______________________________________________
Devel mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to