[Freeswitch-users] Spandsp mulated modems inbound/no /dev/FS* device?

Anita Hall anita.hall at simmortel.com
Thu May 24 12:07:10 MSD 2012


Many thanks to everybody!

I will put this on wiki but I am stuck at the very beginning. I am sorry
for being such a noob but this is my first tryst with modems.

I have modems appearing as /dev/FS[0-4] which link to /dev/pts/[4-7]

# ls -l /dev/FS?
lrwxrwxrwx 1 root root 10 2012-05-17 17:49 /dev/FS0 -> /dev/pts/4
lrwxrwxrwx 1 root root 10 2012-05-17 17:49 /dev/FS1 -> /dev/pts/5
lrwxrwxrwx 1 root root 10 2012-05-17 17:49 /dev/FS2 -> /dev/pts/6
lrwxrwxrwx 1 root root 10 2012-05-17 17:49 /dev/FS3 -> /dev/pts/7
lrwxrwxrwx 1 root root 10 2012-05-17 17:49 /dev/FS4 -> /dev/pts/8

But,
# cu -l /dev/FS0
cu: open (/dev/FS0): Permission denied
cu: /dev/FS0: Line in use

I think this is because FreeSWITCH is using this device, but then how does
HylaFax or any other program like cu talk to it ?

This page says that I should be able to check my modem before I configure
it with Hylafax.
http://www.hylafax.org/content/Handbook:Basic_Server_Configuration:Checking_your_Modem


regards,
Anita



On Tue, May 22, 2012 at 6:41 AM, Steve Underwood <steveu at coppice.org> wrote:

> What all this should tell us is a wiki page is badly needed on this
> topic. Specifically, people need clear information about:
>     - How the modems appear to the user inside FS
>     - How the modems appear to the user in /dev
>     - How the permissions of the modems in /dev can be controlled, so
> non-root users are OK
> I still haven't seen anyone give information on the last point. Its easy
> to set up udev rules to control the generation of the pts devices in
> /dev, but I am not clear how to control the permissions during the
> creation of the links in /dev which give these devices meaningful names.
>
> Steve
>
>
> On 05/22/2012 07:28 AM, Michael Collins wrote:
> > I looked at the source, just to confirm and I believe Anthony is correct.
> >
> > Line 871 of mod_spandsp_modem.c:
> > switch_snprintf(name, sizeof(name), "modem/%d/%s", modem->slot, number);
> >
> > That would suggest a syntax just like FreeTDM, where the dialstring is
> > "modem/x/y" where x is the "slot" and y is the dialed number. Also, I
> > suspect this block starting at line 856 means you can use a literal
> > "a" for the slot and it will hunt for the next available modem:
> >
> >         if (!strcasecmp(modem_id_string, "a")) {
> >             modem_id = -1;
> >         } else {
> >             modem_id = atoi(modem_id_string);
> >         }
> >
> > Please try this out and confirm. If possible, add the information to
> > the wiki. If you can't update the wiki then please report back and let
> > us know whether the dialstring format worked or not.
> >
> > Thanks,
> > MC
> >
> > On Mon, May 21, 2012 at 2:23 PM, Anthony Minessale
> > <anthony.minessale at gmail.com <mailto:anthony.minessale at gmail.com>>
> wrote:
> >
> >     IIRC its modem/1 or 2 3 4 etc.  Probably a for auto like tdm.
> >     Check the code to be sure....
> >
> >     On May 21, 2012 3:13 PM, "Alex Crow" <acrow at integrafin.co.uk
> >     <mailto:acrow at integrafin.co.uk>> wrote:
> >
> >         On 21/05/12 20:28, Ken Rice wrote:
> >         >
> >         >
> >         > On 5/21/12 2:15 PM, "Alex Crow"<acrow at integrafin.co.uk
> >         <mailto:acrow at integrafin.co.uk>>  wrote:
> >         >> Also I have the problem that unless FreeSWITCH is run as
> >         root, the
> >         >> device nodes are not created.
> >         >>
> >         >> Unless in the last few weeks some docs have been updated on
> >         this, I'm
> >         >> still stuck with T38modem.
> >         >>
> >         > If freeswitch running as root and not running as root
> >         doesn't work, this
> >         > should tell you that you have a permissions issue... The
> >         FreeSWITCH
> >         > developers fixing your systems perms issues is beyond the
> >         scope of the
> >         > FreeSWITCH project...
> >         >
> >         > Otherwise, the FreeSWITCH modems basically work just like
> >         t38modem... The
> >         > only setting is how many of them to create then the only
> >         other settings is
> >         > configuring your platform to properly allow freeswitch (or
> >         the user that
> >         > freeswitch is running as) create those devices then
> >         configure hylafax to use
> >         > them as normal.
> >         >
> >         > The steps to do this can vary from platform to platform (or
> >         even versions of
> >         > the platform. For example how you do this on centos5 is not
> >         how you do this
> >         > on centos6 due to changes in the platform.)
> >         >
> >         > K
> >         >
> >         >
> >
> >         Ken,
> >
> >         I respectfully disagree with the "like t38modem" bit of this.
> With
> >         t38modem, you create a set of t38modem devices which actually
> >         register
> >         against FreeSWITCH and therefore appear as registered
> >         endpoints, so it's
> >         easy to route calls to them (ie transfer to "t38modem0 default
> >         XML").
> >         When I did run FS as root, despite the device nodes being
> >         created, I saw
> >         no endpoint registrations for the softmodems, nor did I find any
> >         documentation saying that these endpoints may be addressed as,
> for
> >         instance "spandsp/FSx".
> >
> >         I am also used to writing udev rules, but I can't find
> >         anything that
> >         allows a non-root uid/gid user to create device nodes for a
> device
> >         provided by a userspace program.
> >
> >         It'd be great to avoid T38modem, and I've asked these
> >         questions before,
> >         namely:
> >
> >         1) Does anyone have any examples on any platform of tweaking
> >         udev to
> >         allow FreeSWITCH to create device nodes at startup when
> >         running as, say,
> >         user freeswitch or user www-data (without making the primary
> >         group of
> >         said users "root" or setting setuid root on the executable). I
> >         am not
> >         prepared to take the risk of running as either effective uid
> >         or gid 0.
> >         Please share if so. I'm running on debian stable.
> >
> >         2) How does one direct an incoming call, say, from FreeTDM or
> >         a SIP/ISDN
> >         gateway to one of the softmodems. I cannot find this in the docs.
> >
> >         If we can divorce these questions from any association with
> >         another
> >         user's questions on this list that's fine. I've tried to help
> that
> >         person as much as I can out of my own good nature.
> >
> >         Cheers
> >
> >         Alex
> >
> >
> _________________________________________________________________________
> >         Professional FreeSWITCH Consulting Services:
> >         consulting at freeswitch.org <mailto:consulting at freeswitch.org>
> >         http://www.freeswitchsolutions.com
> >
> >         
> >         
> >
> >         Official FreeSWITCH Sites
> >         http://www.freeswitch.org
> >         http://wiki.freeswitch.org
> >         http://www.cluecon.com
> >
> >         Join Us At ClueCon - Aug 7-9, 2012
> >
> >         FreeSWITCH-users mailing list
> >         FreeSWITCH-users at lists.freeswitch.org
> >         <mailto:FreeSWITCH-users at lists.freeswitch.org>
> >         http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> >         UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> >         http://www.freeswitch.org
> >
> >
> >
> _________________________________________________________________________
> >     Professional FreeSWITCH Consulting Services:
> >     consulting at freeswitch.org <mailto:consulting at freeswitch.org>
> >     http://www.freeswitchsolutions.com
> >
> >     
> >     
> >
> >     Official FreeSWITCH Sites
> >     http://www.freeswitch.org
> >     http://wiki.freeswitch.org
> >     http://www.cluecon.com
> >
> >     Join Us At ClueCon - Aug 7-9, 2012
> >
> >     FreeSWITCH-users mailing list
> >     FreeSWITCH-users at lists.freeswitch.org
> >     <mailto:FreeSWITCH-users at lists.freeswitch.org>
> >     http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> >     UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> >     http://www.freeswitch.org
> >
> >
> >
> > _________________________________________________________________________
> > Professional FreeSWITCH Consulting Services:
> > consulting at freeswitch.org
> > http://www.freeswitchsolutions.com
> >
> > 
> > 
> >
> > Official FreeSWITCH Sites
> > http://www.freeswitch.org
> > http://wiki.freeswitch.org
> > http://www.cluecon.com
> >
> > Join Us At ClueCon - Aug 7-9, 2012
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> Join Us At ClueCon - Aug 7-9, 2012
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120524/744d4ad4/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list