| 
 
 
 |  | 
                
                | 
                
                  | 
                    
                      
                        | SMS Server Tools 3 Community |  
                        | 
	
	
	
		
			| Welcome, Guest. The forum is currently read-only, but will open soon. | Fri Oct 31, 2025 23:30 |     This topic is locked Page:  1 
		
			| Author | Post |  
			|  | #1 Fri Dec 04, 2009 08:06, 193 months ago. |  
			| Member Registered:Dec 2009
 Location: Switzerland | OpenSuSE 11.1: Smsd v3.1.6 : Siemens TC35i Terminal :  Hi  I would like to send voicecall trough or with nagios. Sending sms works fine.  If I try to send voicecalls, the cellphone receive only sms. Here is my config-file : So, what did I miss, or what did I wrong ? Kind regards azubi |  
			|  | #2 Fri Dec 04, 2009 08:39, 193 months ago. |  
			| Administrator Registered:May 2009
 Location: Jyväskylä, Finland | Please check the syntax of a message file. There should be Voicecall: yes  header included, for example: To: 358401234567Voicecall: yes
 
 TONE: 5 #,#,#
 
 Note that there must not be empty line before a line containing Voicecall header. « Last edit by keke  on Fri Dec 04, 2009 08:42, 193 months ago. » |  
			|  | #3 Fri Dec 04, 2009 08:45, 193 months ago. |  
			| Member Registered:Dec 2009
 Location: Switzerland Topic owner | Hi keke I tried as you suggested. here is the code which I'm using for sending : and here is the output from the logfile : unfortunally, I recive only a sms. kind regards azubi « Last edit by azubi  on Fri Dec 04, 2009 08:46, 193 months ago. » |  
			|  | #4 Fri Dec 04, 2009 08:57, 193 months ago. |  
			| Administrator Registered:May 2009
 Location: Jyväskylä, Finland | You should create outgoing file with some editor, or modify sendsms to add Voicecall: yes header. It does not work in the begin of a text, unless checkhandler with necessary code is defined.
 Note that headers are all lines until an empty line exists in the message file. After that empty line, the remaining is a text.
 
 Do you know if Nagios can be defined to add header?
 
 
 |  
			|  | #5 Fri Dec 04, 2009 09:12, 193 months ago. |  
			| Member Registered:Dec 2009
 Location: Switzerland Topic owner | Hi keke thank you for your hint. Now I understand how it works. This was the solution: |  
			|  | #6 Fri Dec 04, 2009 11:44, 193 months ago. |  
			| Administrator Registered:May 2009
 Location: Jyväskylä, Finland | The checkhandler I mentioned, could be the following: In the global part of smsd.conf, define:checkhandler = /usr/local/bin/smsd_checkhandler Create this file and make it executable for smsd. Content: #!/bin/bash
 # Sample checkhandler.
 
 # If message body starts with a "key", remove key from message body
 # and store it as a header line.
 
 TEXT=`sed -e '1,/^$/ d' < $1`
 key='Voicecall: yes '
 if [[ "$TEXT" == $key* ]]; then
 TEXT=${TEXT:${#key}}
 HEADERS=`formail -fX "" < $1`
 echo "$HEADERS" > $1
 echo "$key" >> $1
 echo "" >> $1
 echo -n "$TEXT" >> $1
 fi
 
 'bash' Syntax Highlight powered by GeSHiThis might be useful if the application which creates an SMS file cannot create additional headers. Smsd must be restarted after smsd.conf is changed. |  
			|  | #7 Tue Dec 08, 2009 15:05, 193 months ago. |  
			| Member Registered:Dec 2009
 Location: Switzerland Topic owner | I would like to add my script for nagios monitoring. this script is used as an escalationhanlder and create a call to the standby-guy's to wake them up if they didn't hear the last few SMS.     Here we go (quick and dirty as usual): |     This topic is locked Page:  1 
	 
		   Time in this board is UTC.   
 |  |  |  |  
                |  |  |  |