Playback IP address via PSTN

Hi everyone,

The Asterisk server (pre-configured with two FXO channels) is configured to get dynamic IP address.

Once I install the PBX I don’t want the customer to log in to check the IP address (which is necessary to know to the configure IP phones). Instead I want him to be able to get IP address by calling the pbx via PSTN. If someone calls the PBX via PSTN and enters certain key combination, the PBX should play back the IP address.

Please let know how this can be done. It will be great if someone can point to something similar if previously done.

Thanks,
Harish

Why not install a dyn client, and then use it - that is what I do here - except I do it via the router/firewall the box sits behind…


You can then use something like festival or some other feature of asterisk to read this file and do a text-to-speech action to your users. I'd have to read up more on the text-to-speech features of asterisk but I'm told asterisk is capable of reading a text file and then speaking it into the call.

You could also fine tune the code above to get rid of the periods in the IP address if you just wanted to read the quads to them.

You can then use something like festival or some other feature of asterisk to read this file and do a text-to-speech action to your users. I’d have to read up more on the text-to-speech features of asterisk but I’m told asterisk is capable of reading a text file and then speaking it into the call.

You could also fine tune the code above to get rid of the periods in the IP address if you just wanted to read the quads to them.

Use a System call to a small script in the above example that will write the ip address to a file, then read the file in the dialplan and use saydigits to read it out.

voip-info.org/wiki/index.php … +SayDigits

I don’t know that much about system calls from within Asterisk. But if you set up a cron job to run the ifconfig command above every hour or so, it should keep a file somewhere that always has your current IP address. Then you could do the saydigits procedure in your dialplan like chris.mylonas described.

That should do the trick.

This way is probably better.

forums.digium.com/viewtopic.php? … dcc012f24e