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@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@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to