[OpenSIPS-Users] B2B + top hiding + origination media IP

Kamen Petrov kamen.petrov at gmail.com
Wed Feb 2 19:12:46 CET 2011


Ok, that brings some clarification. Thanks.

So the correct scenario is:
1) softphone --registered to--> opensips A (pure)
2) call is relayed from opensips A to opensips B (the B2B one)
3) the opensips B connects to the termination
4) the RTP goes between the softphone -> opensips A -> rtpproxy

Would that work ? :)





On 2 February 2011 20:04, Ovidiu Sas <osas at voipembedded.com> wrote:

> The nathelper module is performing changes on the received INVITE
> (changing the SDP).
> Those changes are not visible by the b2b module and therefor discarded.
> As a result, the nathelper module (and any module that is changing the
> initial INVITE) doesn't work with the b2b module.
> The only change visible to the b2b module is the RURI.
>
> Regards,
> Ovidiu Sas
>
> On Wed, Feb 2, 2011 at 12:52 PM, Kamen Petrov <kamen.petrov at gmail.com>
> wrote:
> > Hi Ovidu,
> >
> > I do not perform any changes on the received invite.
> >
> > The "top hiding" does it and the problem is.. it does not change only the
> > media IP. Everything else goes OK.
> >
> > Are you saying the "top hiding" does not work properly with the nathelper
> ?
> >
> > Thanks
> > -- Kamen
> >
> >
> >
> >
> > On 2 February 2011 19:41, Ovidiu Sas <osas at voipembedded.com> wrote:
> >>
> >> The B2B module is operating on the received INVITE.  Any changes that
> >> you make to the received INVITE are not visible by the B2B module.
> >> Use a proxy to perform whatever you want to do (rtpproxy, accounting,
> >> etc.) and a separate server only for b2b (top hiding).
> >>
> >> Regards,
> >> Ovidiu Sas
> >>
> >> On Wed, Feb 2, 2011 at 12:11 PM, Kamen Petrov <kamen.petrov at gmail.com>
> >> wrote:
> >> > Hi Guys,
> >> >
> >> > I am testing the following call flow:
> >> > Soft Phone => opensips (configured for B2B) => third party termination
> >> > SIP
> >> > proxy
> >> >
> >> > Here is my config:
> >> >
> >> > modparam("b2b_entities", "script_req_route", "b2b_request")
> >> > modparam("b2b_entities", "script_reply_route", "b2b_reply")
> >> >
> >> >
> >> >
> >> > local_route {
> >> >         xlog("================LOCAL_ROUTE ($rm - $rr)============\n");
> >> >         setflag(22);
> >> >         if (is_method("INVITE")) {
> >> >                 engage_rtp_proxy("e","<OPENSIPS_IP>");
> >> >                 exit;
> >> >         }
> >> >         else if (is_method("BYE") ) {
> >> >                 xlog("================BYE============\n");
> >> >         }
> >> > }
> >> >
> >> >
> >> > route[b2b_request] {
> >> >         $avp(s:source_ip_address) := $si;
> >> >         perl_exec("messagedump_route", "messages");
> >> >         xlog("b2b_request ($ci) ($rm - $rr)\n");
> >> > }
> >> >
> >> >
> >> > route[b2b_reply] {
> >> >         $avp(s:source_ip_address) := $si;
> >> >         perl_exec("messagedump_reply", "messages");
> >> >         xlog("b2b_reply ($ci) - $rm - $rr\n");
> >> > }
> >> >
> >> >
> >> > route{
> >> > ...
> >> >         if (is_method("INVITE") &&
> >> > perl_exec("check_for_forwarding_number"))
> >> > {
> >> >                 engage_rtp_proxy("e","<OPENSIPS_IP>");
> >> >                 xlog("LOG: INVITE AUTHENTICATED TO: $avp(s:uid) ; FWD
> >> > TO:
> >> > $avp(s:fwd_ip)\n");
> >> >                 setflag(1); # do accounting
> >> >                 xlog("L_ERR", "LOG: to uri=[$tu]
> >> > [$avp(s:sip_proxy_ip)]\n");
> >> >
> >> >                 b2b_init_request("top hiding");
> >> >                 exit;
> >> >         };
> >> >
> >> > ...
> >> > }
> >> >
> >> >
> >> > What happens is:
> >> > - INVITE from the soft phone to the opensips
> >> > - catched by the B2B and relayed to the third party SIP proxy + trying
> >> > returned to the soft phone
> >> > - "Session Progress" received from the third party SIP proxy ->
> opensips
> >> > ->
> >> > my soft phone
> >> >
> >> > At that stage, here is what I have on the soft phone log:
> >> > 18:56:50 UDP Packet Received from <OPENSIPS_IP>:5060
> >> > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> >> > SIP/2.0 183 Session Progress
> >> > Via: SIP/2.0/UDP 192.168.1.2:5070;rport=5070;branch=z9hG4bK673604
> >> > To: <sip:359883409291@<OPENSIPS_DOMAIN>:5060>;tag=B2B.113.667
> >> > From: "359883327749" <sip:359883327749@
> <OPENSIPS_DOMAIN>:5060>;tag=1040
> >> > Call-ID: 1296636915-3604-SALASWORK at 192.168.1.2
> >> > CSeq: 361 INVITE
> >> > Content-Type: application/sdp
> >> > Contact: <sip:<OPENSIPS_IP>:5060;transport=udp>
> >> > Server: OpenSIPS (1.6.3-notls (x86_64/linux))
> >> > Content-Length: 184
> >> >
> >> > v=0
> >> > o=SBCSIPUAS 900116523 1 IN IP4 <THIRD_PARTY_SIP_PROXY_IP>
> >> > s=SBCSIPUAS SIP STACK v1.0
> >> > c=IN IP4 <THIRD_PARTY_SIP_PROXY_IP>
> >> > t=0 0
> >> > m=audio 17900 RTP/AVP 0
> >> > a=rtpmap:0 PCMU/8000
> >> > a=sendrecv
> >> > a=maxptime:30
> >> >
> >> >
> >> > As can be seen, the media IP is not rewritten by the opensips and the
> IP
> >> > passed to my soft phone is the IP of the termination IP for the
> opensips
> >> > (i.e. the third party SIP proxy IP). Because of that, my soft phone
> >> > starts
> >> > the RTP directly to my provider instead trough the RTP proxy that is
> >> > attached to the opensips.
> >> > Just to clarify, the media IP of my soft phone is not passed to my
> >> > provider
> >> > - that case is handled good.
> >> >
> >> >
> >> > Any idea what is missing ?
> >> >
> >> > Thanks in advance.
> >> > -- Kamen
> >> >
> >> > _______________________________________________
> >> > Users mailing list
> >> > Users at lists.opensips.org
> >> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >> >
> >> >
> >>
> >> _______________________________________________
> >> Users mailing list
> >> Users at lists.opensips.org
> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> >
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110202/2818d93e/attachment.htm>


More information about the Users mailing list