[Serusers] CPL: serctl fifo LOAD_CPL problem

Aisling O'Driscoll ashling.odriscoll at cit.ie
Wed Jun 15 16:20:52 CEST 2005


Hello,

I am trying to upload a script onto SER using the "serctl fifo
UPLOAD_CPL user at xxx.xxx.xxx.xxx /path/to/file.xml" command.It is very
simple script to reject a call from caller 2093. Unfortunately I have
the errors seen below. I have included my simple cpl script, the
errors and the relevant part of the ser.cfg. Any help would be
greatly appreciated.

Many Thanks,
Aisling.

CPL SCRIPT [saved in /opt/ser/etc/ser]:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cpl PUBLIC '-//IETF//DTD RFCxxxx CPL 1.0//EN'"cpl-06.dtd">
	<cpl>
	  <string-switch field="from">
	    <string matches="2093 at 157.190.74.152">
		<response status="reject" reason="I dont want to"/>
	    </string>
	  </string-switch>
	</cpl> 

SER.CFG:

if (method == "INVITE"){
  if(!cpl_run_script("incoming", "is_stateless"))
  {
     # script execution failed
	t_reply("500", "CPL script execution failed");
  };
	route(3);
	break;
  } else if (method == "REGISTER"){
	#handle REGISTER messages with CPL script
	cpl_process_register();
	route(2);
	break;
  };
}

ERRORS:

localhost:/opt/ser/etc/ser # :0: Element cpl content does not follow
the DTD
Expecting (ancillary? , subaction* , outgoing? , incoming?), got
(string-switch )
:0: Element string content does not follow the DTD
Expecting (location | lookup | remove-location | address-switch |
string-switch | language-switch | time-switch | priority-switch |
proxy | redirect | reject | mail | log | sub)?, got (response )
:0: No declaration for attribute matches of element string
:0: No declaration for element response
:0: No declaration for attribute status of element response
:0: No declaration for attribute reason of element response
 1(20171) ERROR:cpl-c:encodeCPL: CPL script doesn't respect CPL
grammar
 1(20171) ERROR: fifo_server: command (LOAD_CPL) processing failed



-------------------Legal  Disclaimer---------------------------------------

The above electronic mail transmission is confidential and intended only for the person to whom it is addressed. Its contents may be protected by legal and/or professional privilege. Should it be received by you in error please contact the sender at the above quoted email address. Any unauthorised form of reproduction of this message is strictly prohibited. The Institute does not guarantee the security of any information electronically transmitted and is not liable if the information contained in this communication is not a proper and complete record of the message as transmitted by the sender nor for any delay in its receipt.




More information about the sr-users mailing list