Error while sending bulk smses in loop

Hello,
I am sending bulk smses in loop one after the other in loop. It takes about 40 secs for a sms
to be sent out of the mobigator. But when there is queue the celliax generates a message
saying "no space to write messages in the device"

please give me the solution to solve this problem.
Thanks!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Sending SMSs in a tight loop

Please, follow the guidelines at:
http://www.gsmopen.org/howtobug
and report with full debug informations.
Also, please include exact description of what you are doing, how, how is the script generating sms, how long it take for one single SMS to be sent through the command line, etc.

As a hint, you have to wait for an SMS to be sent, before sending another (eg: you must buffer them, the channel driver do not buffers them). Eg: if you send them all in a tight loop, they obviously accumulate in the memory. The AMI interface provide you with feedback on when the SMS has been sent, or you can put sleep()s in your script.

But please, follow the guidelines for bug reporting, and include all relevant information, and let's see if there is a problem that can be solved.

Error while sending bulk smses in loop

Hi,
Actually, I am sending the SMSs in loop using the php script. In what time interval we have to send SMSs(means sleep time)? or Is there any way to expand the buffer memory of device? when there is queue the celliax throws error as follows.

[Feb 2 14:44:26] ERROR[7136] celliax_additional.c: rev exported[(nil)|b75dfb90][ERROR 3347 ][line0 ][-1, 4,102] Error writing SMS text to the cellphone memory
[Feb 2 14:44:43] ERROR[7142] celliax_additional.c: rev exported[(nil)|b7290b90][ERROR 3347 ][line0 ][-1, 4,102] Error writing SMS text to the cellphone memory
[Feb 2 14:44:51] ERROR[7146] celliax_additional.c: rev exported[(nil)|b7560b90][ERROR 3347 ][line0 ][-1, 4,102] Error writing SMS text to the cellphone memory
[root@localhost ~]# tail /var/log/asterisk/messages
[Feb 2 14:54:36] ERROR[3068] chan_celliax.c: rev exported[(nil)|b76cfb90][ERROR 1155 ][line0 ][-1, 4,102] Failed initializing sound device
[Feb 2 14:54:36] ERROR[3068] chan_celliax.c: rev exported[(nil)|b76cfb90][ERROR 2196 ][line0 ][-1, 4,102] celliax_new failed! BAD BAD BAD
[Feb 2 14:54:36] ERROR[3068] celliax_additional.c: rev exported[(nil)|b76cfb90][ERROR 147 ][line0 ][-1, 4,102] snd_pcm_open failed with error 'Device or resource busy' on device 'plughw:0', if you are using a plughw:n device please change it to be a default:n device (so to allow it to be shared with other concurrent programs), or maybe you are using an ALSA voicemodem and slmodemd is running?
[Feb 2 14:54:36] ERROR[3068] celliax_additional.c: rev exported[(nil)|b76cfb90][ERROR 46 ][line0 ][-1, 4,102] Failed opening ALSA playback device: plughw:0
[Feb 2 14:54:36] ERROR[3068] chan_celliax.c: rev exported[(nil)|b76cfb90][ERROR 1155 ][line0 ][-1, 4,102] Failed initializing sound device
[Feb 2 14:54:36] ERROR[3068] chan_celliax.c: rev exported[(nil)|b76cfb90][ERROR 2196 ][line0 ][-1, 4,102] celliax_new failed! BAD BAD BAD

Thanks,

bulk SMS in loop

You can use the AMI interface, I believe there are php binding for it, or you can test how long it takes for an SMS to be sent and put sleep()s where appropriate in your php script.

No way to enlarge the memory, SMS have to be sent one by one.

Do something like this:

send_sms1 ;
sleep 10seconds ;
send_sms2 ;
sleep 10seconds ;
and so on and so on

BTW: you have provided none of the info I asked for ;)

Error while sending bulk smses in loop

We are using the command "/usr/sbin/asterisk -rx "celliax_sendsms line0/'.$mobile." in php file.
Here the command will take the mobile numbers which are in the database queue. sends SMS, where the php file is set to run in cron job for every 2mins time interval.

same issue same answer: please more info

You send one single SMS each two minutes?

If it is so, please post all the information I asked for, because is a bug.

If you send many SMS in a tight loop, let's say, with pauses less than 30 seconds, you need to put sleeps in your script.

How many times you want to tell me the same things and have the same answer? ;)

Or you provide all the debug information, or I cannot know what's happens.

For sure, if you send a single SMS each two minutes, and gives you problems, it's a bug. If so, please, post all the relevant info as asked in the FIRST reply to your post.

Sending SMSs in a tight loop

My sysem information is as follows:
OS: CentOS release 5.4 (Final), kernal-2.6.18-164.10.1.el5, Asterisk Version-1.4.27, Device - mobigater,
celliax version - downloaded chan_celliax.tar.gz from the site.

aplay -l | grep card:
card 0: default [C-Media USB Headphone Set ], device 0: USB Audio [USB Audio]
card 1: Intel [HDA Intel], device 0: VT1708S Analog [VT1708S Analog]

lsmod|grep snd:
snd_hda_intel 427153 1
snd_seq_dummy 7877 0
snd_usb_audio 77633 3
snd_seq_oss 32577 0
snd_seq_midi_event 11073 1 snd_seq_oss
snd_seq 49585 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_pcm_oss 42817 0
snd_mixer_oss 19009 1 snd_pcm_oss
snd_pcm 72133 4 snd_hda_intel,snd_usb_audio,snd_pcm_oss
snd_usb_lib 19137 1 snd_usb_audio
snd_rawmidi 26561 1 snd_usb_lib
snd_seq_device 11725 4 snd_seq_dummy,snd_seq_oss,snd_seq,snd_rawmidi
snd_timer 24517 3 snd_seq,snd_pcm
snd_page_alloc 14281 2 snd_hda_intel,snd_pcm
snd_hwdep 12869 2 snd_hda_intel,snd_usb_audio
snd 55749 17 snd_hda_intel,snd_usb_audio,snd_seq_oss,snd_seq,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_rawmidi,snd_seq_device,snd_timer,snd_hwdep
soundcore 11553 1 snd

ls -l /dev/ttyA*:
crw-rw---- 1 root uucp 166, 0 Feb 2 17:03 /dev/ttyACM0

ls -l /dev/ttyU*:
ls: /dev/ttyU*: No such file or directory

ls -l /dev/snd*:
total 0
crw-rw---- 1 root root 116, 6 Feb 2 10:29 controlC0
crw-rw---- 1 root root 116, 10 Feb 2 10:29 controlC1
crw-rw---- 1 root root 116, 9 Feb 2 10:29 hwC1D0
crw-rw---- 1 root root 116, 5 Feb 2 10:29 pcmC0D0c
crw-rw---- 1 root root 116, 4 Feb 2 10:29 pcmC0D0p
crw-rw---- 1 root root 116, 8 Feb 2 10:29 pcmC1D0c
crw-rw---- 1 root root 116, 7 Feb 2 10:29 pcmC1D0p
crw-rw---- 1 root root 116, 3 Feb 2 10:29 seq
crw-rw---- 1 root root 116, 2 Feb 2 10:29 timer

celliax.conf:
link- http://www.pagebin.com/347b2

dialplan: extention.conf
[agioutdemo654]
;include => phpagi
exten => s,1,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds
exten => s,2,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds
exten => s,3,Answer
exten => s,4,Set(CLID=${CALLERID(num)})
exten => s,6,AGI(testagi.php)
exten => s,5,Playback(song1)
exten => t,1,Hangup

My php script file:
link- http://www.pagebin.com/347f9

I want to send sms to 500 numbers one by one. php file is set to run in cron job for every 2mins time interval. So, it is throwing the above error.

Sorry for incomplete message.
Thanks,

bulk sms, sleep longer

in the php script, put a

sleep(20) instead of a sleep(2)

that probably will work

If it gives errors, please post here (or pastebin) all the debug output, since beginning, not only the error.

Let me know

sending bulk SMSs working!

Hi, sending bulk SMSs is working fine.

Thanks a lot...:)

How to enable DTMF in celliax

Hi,
The above is my celliax setup information.
Please help me to enable dtmf in my celliax configuration.

Thanks,

DTMF is not working

dtmf is enabled it seems, but not working properly.
some times it will work but some time not!

my testagi.php for dtmf:
link- http://www.pagebin.com/34f83

please help me out.
Thanks,

Please, do not change the

Please, do not change the issue on a topic, create a new topic

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.