I have a USB to serial converter attached to my box. pl2303: Prolific PL2303 USB to serial adaptor driver if I login to the box and send/receive serial commands over this unit it works without error EVERY time. however, if I run the same command set from with-in the extensions.conf with System() I get errors in dmesg like "pl2303 ttyUSB0: pl2303_open - failed submitting read urb, error -22" and then obviusly my command does not work. however, again - If I go back to the command line and my command it runs just fine. Any ideas on what might be happening here? Jerry extensions.conf exten => s,1,ChanIsAvail(Console/Dsp) exten => s,n,GotoIf($["${AVAILCHAN}" = ""]?smvoice-busy,s,1) exten => s,n,System(/home/silentm/bin/usbserial -start) exten => s,n,Playback(beep) exten => s,n,Dial(Console/dsp) exten => s,n,Hangup exten => h,1,System(/home/silentm/bin/usbserial -stop)
Does the user Asterisk is running as have access to this device? Thanks!! ----- Original message -----> I have a USB to serial converter attached to my box.? pl2303: Prolific > PL2303 USB to serial adaptor driver > if I login to the box and send/receive serial commands over this unit it > works without error EVERY time. > > however, if I run the same command set from with-in the extensions.conf > with System() > I get errors in dmesg like "pl2303 ttyUSB0: pl2303_open - failed > submitting read urb, error -22" > and then obviusly my command does not work. > > however, again - If I go back to the command line and my command it runs > just fine. > > Any ideas on what might be happening here? > > Jerry > > extensions.conf > exten => s,1,ChanIsAvail(Console/Dsp) > exten => s,n,GotoIf($["${AVAILCHAN}" = ""]?smvoice-busy,s,1) > exten => s,n,System(/home/silentm/bin/usbserial -start) > exten => s,n,Playback(beep) > exten => s,n,Dial(Console/dsp) > exten => s,n,Hangup > exten => h,1,System(/home/silentm/bin/usbserial -stop) > > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: >? ? ? ? ? ? ? ? ? ? ? ? ? ? ? http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: >? ? ? http://lists.digium.com/mailman/listinfo/asterisk-users-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120103/98356077/attachment.htm>
Jerry Geis wrote:> Any ideas on what might be happening here?If Asterisk isn't running as root, my guess would be a permissions issue. By the way, out of curiosity, what does "usbserial -start" do? I'm guessing, some type of paging busy notification? Doug -- Ben Franklin quote: "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."
On 01/03/2012 08:48 AM, Jerry Geis wrote:> I have a USB to serial converter attached to my box. pl2303: Prolific > PL2303 USB to serial adaptor driver > if I login to the box and send/receive serial commands over this unit > it works without error EVERY time. > > however, if I run the same command set from with-in the > extensions.conf with System() > I get errors in dmesg like "pl2303 ttyUSB0: pl2303_open - failed > submitting read urb, error -22" > and then obviusly my command does not work. > > however, again - If I go back to the command line and my command it > runs just fine. > > Any ideas on what might be happening here? > > Jerry > > extensions.conf > exten => s,1,ChanIsAvail(Console/Dsp) > exten => s,n,GotoIf($["${AVAILCHAN}" = ""]?smvoice-busy,s,1) > exten => s,n,System(/home/silentm/bin/usbserial -start) > exten => s,n,Playback(beep) > exten => s,n,Dial(Console/dsp) > exten => s,n,Hangup > exten => h,1,System(/home/silentm/bin/usbserial -stop) > >Jim and Doug Yes the process is running as root. I should have mentioned that. Also - yes the usbserial is a paging notification program. So if its not permissions (since its running as root) what else might it be? Thanks, Jerry
You should confirm with "ps -aux | grep asterisk" -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Jerry Geis Sent: Tuesday, January 03, 2012 1:14 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Question on system command 1.4.43 On 01/03/2012 08:48 AM, Jerry Geis wrote:> I have a USB to serial converter attached to my box. pl2303: Prolific > PL2303 USB to serial adaptor driver > if I login to the box and send/receive serial commands over this unit > it works without error EVERY time. > > however, if I run the same command set from with-in the > extensions.conf with System() I get errors in dmesg like "pl2303 > ttyUSB0: pl2303_open - failed submitting read urb, error -22" > and then obviusly my command does not work. > > however, again - If I go back to the command line and my command it > runs just fine. > > Any ideas on what might be happening here? > > Jerry > > extensions.conf > exten => s,1,ChanIsAvail(Console/Dsp) > exten => s,n,GotoIf($["${AVAILCHAN}" = ""]?smvoice-busy,s,1) exten => > s,n,System(/home/silentm/bin/usbserial -start) exten => > s,n,Playback(beep) exten => s,n,Dial(Console/dsp) exten => s,n,Hangup > exten => h,1,System(/home/silentm/bin/usbserial -stop) > >Jim and Doug Yes the process is running as root. I should have mentioned that. Also - yes the usbserial is a paging notification program. So if its not permissions (since its running as root) what else might it be? Thanks, Jerry -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users