Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
Intercept Session Progress, OK
Author Message
anand
Brekeke Member


Joined: 07 Mar 2014
Posts: 14

PostPosted: Sat Mar 08, 2014 12:15 am    Post subject: Intercept Session Progress, OK Reply with quote

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
Back to top
View user's profile
Harold
Brekeke Master Guru


Joined: 21 Sep 2008
Posts: 289
Location: Japan

PostPosted: Sat Mar 08, 2014 10:50 am    Post subject: Reply with quote

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/bss_accountplugin_en.txt


Why do you want to so?
Back to top
View user's profile
anand
Brekeke Member


Joined: 07 Mar 2014
Posts: 14

PostPosted: Sat Mar 08, 2014 11:25 am    Post subject: Reply with quote

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.
Back to top
View user's profile
Harold
Brekeke Master Guru


Joined: 21 Sep 2008
Posts: 289
Location: Japan

PostPosted: Sat Mar 08, 2014 11:49 am    Post subject: Reply with quote

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.
----------
Back to top
View user's profile
anand
Brekeke Member


Joined: 07 Mar 2014
Posts: 14

PostPosted: Sat Mar 08, 2014 1:36 pm    Post subject: Reply with quote

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?
Back to top
View user's profile
taitan
Brekeke Master Guru


Joined: 15 Mar 2008
Posts: 237

PostPosted: Sat Mar 08, 2014 10:30 pm    Post subject: Reply with quote

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
Back to top
View user's profile
taitan
Brekeke Master Guru


Joined: 15 Mar 2008
Posts: 237

PostPosted: Sat Mar 08, 2014 10:59 pm    Post subject: Reply with quote

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
Back to top
View user's profile
anand
Brekeke Member


Joined: 07 Mar 2014
Posts: 14

PostPosted: Sun Mar 09, 2014 1:35 pm    Post subject: Reply with quote

Thanks for the reply.

Deploy Patterns
$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 Patterns
$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
Back to top
View user's profile
taitan
Brekeke Master Guru


Joined: 15 Mar 2008
Posts: 237

PostPosted: Sun Mar 09, 2014 7:21 pm    Post subject: Reply with quote

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.
Back to top
View user's profile
anand
Brekeke Member


Joined: 07 Mar 2014
Posts: 14

PostPosted: Sun Mar 09, 2014 7:25 pm    Post subject: Reply with quote

See the setup here.
http://postimg.org/image/s5dbmx16h/
Back to top
View user's profile
taitan
Brekeke Master Guru


Joined: 15 Mar 2008
Posts: 237

PostPosted: Mon Mar 10, 2014 10:41 am    Post subject: Reply with quote

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.
Back to top
View user's profile
anand
Brekeke Member


Joined: 07 Mar 2014
Posts: 14

PostPosted: Mon Mar 10, 2014 11:10 am    Post subject: Reply with quote

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
Back to top
View user's profile
taitan
Brekeke Master Guru


Joined: 15 Mar 2008
Posts: 237

PostPosted: Mon Mar 10, 2014 11:34 am    Post subject: Reply with quote

> 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
Back to top
View user's profile
anand
Brekeke Member


Joined: 07 Mar 2014
Posts: 14

PostPosted: Mon Mar 10, 2014 11:39 am    Post subject: Reply with quote

Thanks. I will give it a try.
Back to top
View user's profile
anand
Brekeke Member


Joined: 07 Mar 2014
Posts: 14

PostPosted: Mon Mar 10, 2014 2:48 pm    Post subject: Reply with quote

That resulted in no audio end to end. So back to my original pattern.
Back to top
View user's profile
taitan
Brekeke Master Guru


Joined: 15 Mar 2008
Posts: 237

PostPosted: Mon Mar 10, 2014 5:44 pm    Post subject: Reply with quote

Got it Smile
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1