Andreas Granig writes:
Let me know if this is stupid and/or a complete
overkill, but what about
introducing some kind of dummy mode, where you'd pipe a message into
kamailio via stdin, and get the resulting message out on stdout (e.g. in
ngrep style with ip information as first line, plus the content
following), plus a dump of internals (e.g. vars, avps) on stderr as
they're being assigned, and once the message is processed, kamailio
would just shut down again?
in addition to the message, you would need to be able
to tell which
ip addr it is coming from and which ip/port in kamailio it is going to.
also, on the output side, kamailio would need to tell which
proto/ip/port it would use to send the message out.
Details about going out can be
printed on onsend_route. In this route
block, one can execute drop and nothing is sent to the wire. It can be a
config started with a special define specified with -A parameter.
Enabling debugger module with cfg trace should give valuable information
about what has been executed from config.
From what Andreas suggesting, printing the value of variables as they
are assigned is missing, probably can be added by hooking in the
interpreter when doing the assignment operation.
Grouping all above under some global/command line parameter can be
useful to make it easier to do a dry run.
Cheers,
Daniel
--
Daniel-Constantin Mierla -