Forums Read-only archive

Intercept Session Progress, OK

16 posts · Brekeke SIP Server Forum

anand Original post
1. Brekeke Product Name and Version: SIP Server 3.3.4.4

2. Java version:

3. OS type and the version: Windows 2008 R2

4. UA (phone), gateway or other hardware/software involved:

5. Your problem:
Can I intercept SIP session progress, OK based on message type, contact and TO? then can I change ifdst and ifsrc etc.

How can I do these things?

Thanks
Harold
Do you want to catch and modify the "200 OK" response?

It is possible with the session plugin.
http://www.brekeke-sip.com/download/bss ... gin_en.txt


Why do you want to so?
anand
Because I have two scenarios.

Setup:-
I have a SIP device and SIP proxy in public internet. SIP phone is registered with this SIP proxy. There is NO NAT with the device and the proxy.

Then in Amazon Cloud over a NAT I have the following:- (1-4 shows the call flow routing order)
1. RADVision SIP Proxy (SIP in public internet communicates to this Proxy with the elastic Public IP assigned by Amazon, so SIP communication works end to end)
2. Brekeke SIP Server
3. Lync Server with Mediation or a SIP phone registered with Brekeke SIP server
4. Lync Phone
All of these 1,2,3 & 4 machines have internal and external IPs (elastic IP) assigned to them by Amazon. The machines only have one NIC and is internal to amazon cloud.

Scenario 1
SIP device in the public internet has to connect to the SIP phone (3) registered to Brekeke SIP Server. The SIP call gets connected but RTP is not established end to end.

Scenario 2
SIP device in the public internet has to connect to the Lync Phone (4). Lync phone gets the call connected but RTP is not established end to end.

In both the above scenarios, I think the internal IP is passed back and SIP device in public internet is not able to connect the RTP.

Any thoughts how I could achieve this is in the dial plans. I know the internal/external IPs so I could assign the right ones in the dial patterns.

Thanks for the reply. I am not a programmer so plugin might not be the best option for me.
Harold
ok.

Let you try the following.
----------
1. Go to the Brekeke SIP Server's [Configuration]->[RTP] page.
2. Set the [RTP relay] = "on"
3. Set the [Port mapping] = "source port"
4. Set the [Send UA's remote address] = "yes"
5. Push the [Save] button and restart the Brekeke SIP Server.
----------
anand
Tried with no luck. because I don't know how will my local IP go as remote IP to the person out in the public internet?
taitan
Are you using any DialPlan rules for accepting calls from the RADVision?
If so, let you put the following lines in that rule's Deploy Pattern.


&net.rtp.ifsrc = external IP address
$ifsrc = external IP address
taitan
For example...

If RADVision's IP address is 1.1.1.1 and Brekeke SIP Server's external IP address is 2.2.2.2..

Put the following DialPlan rule in the top of the DialPlan page.
[Matching Patterns]
$request = ^INVITE
$addr = 1.1.1.1

[Deploy Patterns]
&net.rtp.ifsrc = 2.2.2.2
$ifsrc = 2.2.2.2
$continue = true
anand
Thanks for the reply.

[Deploy Pattern]
$nat = true
$continue = true
&net.rtp.ifdst.audio = 2.2.2.2

The above pattern works when SIP phone in public internet makes a call to the SIP phone registered to the brekeke SIP server (which is inside the NAT).

But now I have a Lync+mediation server behind Brekeke SIP server and a Lync phone is connected to the Lync server. Now how can I make the SIP phone from the public internet reach the Lync phone. Say Lync+Mediation public IP is 3.3.3.3.

I have the following Deploy Pattern. SIP routing works fine. But the audio (RTP) is not being established end to end.
[Deploy Pattern]
$transport = TCP
To = sip:+%1@[internal IP of Mediation+Lync]:5068
&net.sip.transport.follow.request = true
&net.sip.fixed.addrport.uas = true
$auth = false
$nat = true
$continue = true
taitan
Your explanation is not clear enough..

but.. let you add "&net.rtp.ifsrc.audio" or/and "&net.rtp.ifdst.audio" in the Deploy Patterns.

&net.rtp.ifsrc.audio = Brekeke's internal IP or public IP.
&net.rtp.ifdst.audio = Brekeke's internal IP or public IP.
anand
taitan
Do you want to use an external IP address between Brekeke SIP Server and Lync+mediation server?

Can you paste all of DialPlan rules here?
If you can not, let you ask Brekeke's support to review your settings.
anand
No.
For internal communication it should be internal IPs. But from the SIP phone in the internet to internal devices, it has to be external as it in the public internet.

But I got it working with following Deploy Patterns.
I don't know how it is working.
Let me know if there is a better way.

[Matching Patterns]
$request = ^INVITE
To = sip:(4.+)@
From = sip:6420

[Deploy Patterns]
$transport = TCP
To = sip:+%1@10.x.x.215:5068
&net.sip.transport.follow.request = true
&net.sip.fixed.addrport.uas = true
&net.rtp.ifdst.audio = 54.x.x.3 (external IP of internal Lync phone)
&net.rtp.ifsrc.audio = 65.x.x.49 (external IP of external SIP phone)
$auth = false
$nat = true
$continue = true
$rtp = false
taitan
> For internal communication it should be internal IPs. But from the SIP phone in the internet to internal devices, it has to be external as it in the public internet.

You may need the following in the Deploy Patterns.
--------
&net.rtp.ifsrc.audio = 54.x.x.2 (Brekeke's external IP address)
&net.rtp.ifdst.audio = 10.x.x.208 (Brekeke's internal IP address)
--------


so the rule will be:
Rule: Forward to Lync
[Matching Patterns]
$request = ^INVITE
To = sip:(4.+)@
$addr = 10.x.x.x.232 (RADVision's internal IP)

[Deploy Patterns]
To = sip:+%1@10.x.x.215:5068 (Lync's internal IP)
&net.sip.transport.follow.request = true
&net.sip.fixed.addrport.uas = true
&net.rtp.ifsrc.audio = 54.x.x.2 (Brekeke's external IP)
&net.rtp.ifdst.audio = 10.x.x.208 (Brekeke's internal IP)
$transport = TCP
$auth = false
$nat = true
$rtp = true
$continue = true
anand
Thanks. I will give it a try.
anand
That resulted in no audio end to end. So back to my original pattern.
taitan
Got it :-)