[OpenSER-Users] [OT] Annoying empty lines when using "M4 Macro Processor"
Daniel-Constantin Mierla
daniel at voice-system.ro
Sun Jan 20 23:27:42 CET 2008
Hello,
you can write your defines in between:
divert(-1)
divert
Cheers,
Daniel
On 01/21/08 00:18, Iñaki Baz Castillo wrote:
> Hi, as suggested here:
> http://www.openser.org/docs/scripting
> I'm using M4 to declare "define" in my OpenSer script.
>
> I've an annoying issue since M4 adds some empty lines at the top of the
> script. If my script has any error, the logs will show me "ERROR in line 235
> in openser.cfg" but that line correspondes to line 187 in my openser.cfg.m4
> file, so makes it very difficult to debug.
>
> I've read the entire doc and have no idea of how to fix it. For example,
> consider this simple case:
>
>
> ---- local.m4 ----
> define(`IP',`127.0.0.1')
> define(`PORT' ,`5061')
> -----------------------
>
>
> ---- file.txt.m4 ----
> My ip is IP and my port is PORT.
> --------------------------
>
>
> ~# m4 local.m4 file.txt.m4 > file.txt
>
> ---- file.txt ----
> <-- Empty line
> <-- Empty line
> <-- Empty line
> <-- Empty line
> My ip is 127.0.0.1 and my port is 5061.
> ---------------------
>
>
> Does someone know how to solve it? Thanks a lot.
>
>
>
>
More information about the Users
mailing list