Forums Read-only archive

DialPlan Plugin

3 posts · Brekeke SIP Server Forum

richtolley Original post
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
james
Use $addr's variable as the parameter
http://wiki.brekeke.com/wiki/DialPlan-Matching-addr

For example
$yourplugin.function( $addr )
richtolley
I will give this a try.

Thank you :)