El Thursday 22 May 2008 09:38:40 Saúl Ibarra escribió:
Egunon a tod@s!
Ando tratando de migrar mi openser.cfg al super M4 style, que mirando un poco por recomendación de Iñaki :) tiene muy buena pinta. Cuando ya lo tenía todo listo, tengo un par de problemillas con m4, pero buscando en google solo encuentro kosas de sendmail :-/
El primer tema son los comentarios y líneas nuevas, si en el m4 pongo algo así:
# Hooooola define(`KK', `lolailooooooooooo')
# dededede define(`TIRORIII', `TIRORAAA')
Al crear el nuevo fichero me mete las líneas de comentario y los saltos de línea tb! Mirando el man y demás, probé con dnl pero o no lo hago bien o pasa de mi...
El 2º temilla es que el fichero generado tiene al final de cada línea el jodido ^M, y aunque quitarlo me lleve 2 segundos no quiero que salga...
En fín, sorry por el offtopic... :)
PD: Back in black!
Prueba así:
-------------------------- divert(-1)
### IP's: define(`MY_IP', `80.94.3.10') define(`MEDIA_SERVER_IP', `80.94.0.112') define(`MEDIA_SERVER_PORT', `5070')
### Flags: define(`FLAG_NAT_CALLER', `5') define(`BFLAG_NAT_CALLED', `6') define(`BFLAG_NAT_PING', `7') define(`FLAG_ACC', `16') define(`FLAG_ACC_MISSED', `17') define(`FLAG_ACC_FAILED', `18')
### AVP's: define(`AVP_RECEIVED', `i:18')
### Routes: define(`ROUTE_IN_DIALOG', `2') define(`ON_REPLY_IN_DIALOG', `2') define(`ON_FAILURE_IN_DIALOG', `2') define(`ROUTE_TO_PSTN', `3') define(`ON_REPLY_TO_PSTN', `3') define(`ON_FAILURE_TO_PSTN', `3') define(`ROUTE_TO_USER', `4') define(`ON_BRANCH_TO_USER', `4') define(`ON_REPLY_TO_USER', `4') define(`ON_FAILURE_TO_USER', `4') define(`ROUTE_TO_MEDIA_SERVER', `5') define(`ON_REPLY_TO_MEDIA_SERVER', `5') define(`ON_FAILURE_TO_MEDIA_SERVER',`5') define(`ROUTE_TEST_E164', `10') define(`ROUTE_IS_MAX_CALLS', `12') define(`ROUTE_OPTIONS', `14') define(`ROUTE_IS_CALLEE_LOCAL', `16') define(`ROUTE_IS_PREFIX_ALLOWED', `18')
divert(0)dnl --------------------------