[asterisk-dev] chan_mobile: port auto-detection

Stefan Schmidt ihacworx at gmx.net
Wed Jun 6 12:21:48 CDT 2012


Hello,
first of all I am new to this list, so I'd like to say thank you to everyone for creating, maintaining and updating asterisk with all sorts of features.

Now, my main topic is chan_mobile, which requires the user to enter a port number in the config file. At the same time, the module provides a run-time command to find out the right port. As my mobile (Nokia N8, Symbian Belle) seems to change the port number after every reboot, I considered that it would be nice if chan_mobile would try and detect the right setting on its own.
With the attached patch (written and tested with Debian version 1.8.11.1~dfsg-1 but also applies against trunk), the code uses the auto-detect feature if you leave the "port" setting out of the config file. I am looking forward to hearing your feedback.

While I was at it, I noticed the member "rport" in the hfp_pvt struct. However, it is only assigned a value in mbl_load_device, but I couldn't see it being used throughout the code. Therefore, I didn't bother updating it to the right value in my patch. Does anyone know its purpose?

Best regards,
Stefan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: chan_mobile-port-autodetect.diff
Type: application/octet-stream
Size: 2515 bytes
Desc: not available
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120606/a994b4f5/attachment.obj>


More information about the asterisk-dev mailing list