Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
DialPlan Plugin
Author Message
richtolley
Brekeke Junior Member


Joined: 26 Feb 2015
Posts: 5
Location: UK

PostPosted: Fri Apr 01, 2016 7:17 am    Post subject: DialPlan Plugin Reply with quote

1. Brekeke Product Name and Version: SIP Server (latest)

2. Java version: 8

3. OS type and the version: Windows Server 2012r2

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

5. Your problem:

I have written a dialplan plugin and am having a slight problem.

I have a SIP Server on the internet with a public IP address.

I am not using registration, instead, I am checking the IP Address of a client to determine whether it is valid.

If the client has a public IP Address, all is well with the world.

If the client is behind NAT, I receive the private IP address of the client, i.e. 192.168.x.x

I have tried taking the IP Address from the Contact, I have used WireShark to look at a protocol trace.

How can I pick up the External Address of the client. I can see the external address later, i.e. Accounting Plugin SessionStart sees the correct public address in eventStat.apCaller.

Most other SIP Servers I have tested only require an external IP address to be registered.

I tried using a STUN server with the client but this doesn't seem to help either.

I would be grateful for any suggestions or pointers.

Best Regards

Rich
Back to top
View user's profile
james
Brekeke Master Guru


Joined: 10 Dec 2007
Posts: 501

PostPosted: Fri Apr 01, 2016 10:27 am    Post subject: Reply with quote

Use $addr's variable as the parameter
http://wiki.brekeke.com/wiki/DialPlan-Matching-addr

For example
$yourplugin.function( $addr )
Back to top
View user's profile
richtolley
Brekeke Junior Member


Joined: 26 Feb 2015
Posts: 5
Location: UK

PostPosted: Fri Apr 01, 2016 10:37 am    Post subject: Reply with quote

I will give this a try.

Thank you 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