[Users] openser and rtpproxy on multihomed host

Alexander 'Leo' Bergolth leo at strike.wu-wien.ac.at
Tue Jun 5 22:14:37 CEST 2007


On 06/05/2007 05:17 PM, raviprakash sunkara wrote:
> Hi Alexander
> Can use fix_nated_sdp("flag"); and also  force_rtp_proxy("flags");

I'm already using force_rtp_proxy() (without arguments) and it already
rewrites the "c=" address in the sdp information but it uses the wrong
interface address. (The openser-server/rtpproxy has two IP adresses in
the same subnet.)

Since I know the address which is used by the clients or contacting the
server, I could hardcode the address as the second parameter to
force_rtp_proxy to force the use of this address but I was looking for a
cleaner solution.

I'd like to use the address where the SIP request came in for both RTP
streams. Maybe I can use the pseudo-variable $Ri (Received IP address)
as the second parameter to force_rtp_proxy? This should force the use of
 the correct IP address in the "c=" field and will hopefully persuade
the client to use this IP address as the destination address for its RTP
data. But how do I tell rtpproxy to send its RTP data from this address?

Thanks,
--leo

> On 6/5/07, Alexander Bergolth <leo at strike.wu-wien.ac.at> wrote:
>>
>> Hi!
>>
>> I'm experiencing problems using openser and rtpproxy on a multihomed box
>> (IP addresses are 137.208.89.45 and 137.208.89.65).
>>
>> The client (firewalled) contacts the server via the first IP address
>> (137.208.89.45) but rtpproxy sometimes uses it's second IP
>> (137.208.89.65) in the "c=" SDP-information. (See below.)
>> However it _sends_ RTP packets from the _first_ IP address. Those
>> packets will never pass through the firewall, of course, since the
>> clients outgoing RTP traffic is sent to another IP address than the
>> incoming traffic is hitting the firewall from.
>>
>> Is there a way to tell rtpproxy to use the same IP-address both for the
>> c= SDP header and as source address?
>>
>> -------------------- 8< --------------------
>> ##
>> T 2007/06/05 15:57:36.041537 137.208.89.45:5060 ->
>> 137.208.90.164:3099[AP]
>> SIP/2.0 183 Session Progress.
>> Via: SIP/2.0/TCP
>> 137.208.90.164:56136
>> ;branch=z9hG4bK-d87543-a107a77a6311422d-1--d87543-;rport=3099.
>> From: "Alexander Bergolth"<sip:30001 at wu-wien.ac.at>;tag=5b6d7b31.
>> To: "996050"<sip:996050 at wu-wien.ac.at>;tag=as2e40807f.
>> Call-ID: MTVjYzlhMDdjMjAwODExZDEyNzk5M2IwN2UxNjhlYTc..
>> CSeq: 2 INVITE.
>> User-Agent: Asterisk PBX.
>> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY.
>> Supported: replaces.
>> Contact: <sip:996050 at 137.208.89.135>.
>> Content-Type: application/sdp.
>> Content-Length: 283.
>> .
>> v=0.
>> o=root 6978 6978 IN IP4 137.208.89.135.
>> s=session.
>> c=IN IP4 137.208.89.65.
>> t=0 0.
>> m=audio 35064 RTP/AVP 0 8 101.
>> a=rtpmap:0 PCMU/8000.
>> a=rtpmap:8 PCMA/8000.
>> a=rtpmap:101 telephone-event/8000.
>> a=fmtp:101 0-16.
>> a=silenceSupp:off - - - -.
>> a=ptime:20.
>> a=sendrecv.
>> a=nortpproxy:yes.
>> -------------------- 8< --------------------
>>
>> -------------------- 8< --------------------
>> 15:57:35.814136 IP 137.208.90.164.3099 > 137.208.89.45.5060: P
>> 4236850032:4236851080(1048) ack 224540451 win 64256
>> 15:57:35.814147 IP 137.208.89.45.5060 > 137.208.90.164.3099: . ack 1048
>> win 2003
>> 15:57:35.814351 IP 137.208.89.45.5060 > 137.208.90.164.3099: P
>> 1:550(549) ack 1048 win 2003
>> 15:57:35.814430 IP 137.208.89.45.5060 > 137.208.90.164.3099: P
>> 550:1264(714) ack 1048 win 2003
>> 15:57:35.814850 IP 137.208.90.164.3099 > 137.208.89.45.5060: . ack 1264
>> win 64177
>> 15:57:35.915829 IP 137.208.90.164.3099 > 137.208.89.45.5060: P
>> 1048:1418(370) ack 1264 win 64177
>> 15:57:35.955948 IP 137.208.89.45.5060 > 137.208.90.164.3099: . ack 1418
>> win 2003
>> 15:57:36.017309 IP 137.208.90.164.3099 > 137.208.89.45.5060: P
>> 1418:2672(1254) ack 1264 win 64177
>> 15:57:36.017320 IP 137.208.89.45.5060 > 137.208.90.164.3099: . ack 2672
>> win 2003
>> 15:57:36.017397 IP 137.208.89.45.5060 > 137.208.90.164.3099: P
>> 1264:1813(549) ack 2672 win 2003
>> 15:57:36.018604 IP 137.208.89.45.5060 > 137.208.90.164.3099: P
>> 1813:2388(575) ack 2672 win 2003
>> 15:57:36.019170 IP 137.208.90.164.3099 > 137.208.89.45.5060: . ack 2388
>> win 64256
>> 15:57:36.041454 IP 137.208.89.45.35064 > 137.208.90.164.10676: UDP,
>> length 172
>> 15:57:36.041537 IP 137.208.89.45.5060 > 137.208.90.164.3099: P
>> 2388:3200(812) ack 2672 win 2003
>> 15:57:36.046899 IP 137.208.90.164.10677 > 137.208.89.65.35065: UDP,
>> length 132
>> 15:57:36.061155 IP 137.208.89.45.35064 > 137.208.90.164.10676: UDP,
>> length 172
>> 15:57:36.080128 IP 137.208.90.164.10676 > 137.208.89.65.35064: UDP,
>> length 172
>> 15:57:36.081157 IP 137.208.89.45.35064 > 137.208.90.164.10676: UDP,
>> length 172
>> [...]
>> -------------------- 8< --------------------
>>
>> Thanks in advance,
>> --leo
>>
>> P.S.: I'm using openser-1.2 and rtpproxy-cvs20070222.
>>
>> -- 
>> e-mail   ::: Alexander.Bergolth (at) wu-wien.ac.at
>> fax      ::: +43-1-31336-906050
>> location ::: Computer Center | Vienna University of Economics | Austria
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at openser.org
>> http://openser.org/cgi-bin/mailman/listinfo/users
>>
> 
> 
> 


-- 
e-mail   ::: Alexander.Bergolth (at) wu-wien.ac.at
fax      ::: +43-1-31336-906050
location ::: Computer Center | Vienna University of Economics | Austria





More information about the Users mailing list