[OpenSIPS-Users] Trying to learn how to use siptrace
opensipslist at encambio.com
opensipslist at encambio.com
Thu Dec 17 18:23:07 CET 2009
Hello Bogdan,
An jeu., déc 17, 2009, Bogdan-Andrei Iancu schrieb:
>sip_trace() function will siptrace the current SIP message
>
> + setting the trace flag (like setflag(22) ) will trace all the
>messages related to the transaction created by the current request you
>process
>
>trace_dialog() works only for call - use it for initials INVITEs and it
>will trace the whole dialog.
>
Then if I have one UAC (PhoneA) and the proxy (OsipsA) and want
to trace all messages between them, it seems that the best way is:
# Example 1
route{
sip_trace();
[...]
}
But to to avoid REGISTER, SUBSCRIBE, and ACK messages, then it seems
best to set the trace flag. How do you do this appropriately, and
how to avoid calling setflag more than once per transaction? Maybe
something like:
# Example 2
route{
[...]
if (loose_route()) # Not sure here ?!?
setflag(22);
[...]
}
It seems in the context described above it makes no difference
if I use setflag, setbflag, or setsflag, right?
Lastly, it seems that one can get a similar result as example 2
above by doing:
# Example 3
route{
[...]
if (is_method("INVITE") && !has_totag())
trace_dialog();
[...]
}
...just that in this case I will see the ACK messages as well.
Did I get that right? I'll be tracing all messages now, because
of needing to debug until OpenSIPS is running well. Later I'll
probably reduce the traces to just the dialogs.
By the way these diagrams helped me understand the difference
between transactions (setflag(22)) and dialogs (trace_dialog()):
http://www.iptel.org/sip_dialog
http://www.iptel.org/sip_transaction
Regards,
Brian
More information about the Users
mailing list