[OpenSIPS-Users] Trying to learn how to use siptrace
opensipslist at encambio.com
opensipslist at encambio.com
Tue Dec 22 12:08:57 CET 2009
Hello Bogdan,
An mar., déc 22, 2009, Bogdan-Andrei Iancu schrieb:
>opensipslist at encambio.com wrote:
>> An jeu., déc 17, 2009, Bogdan-Andrei Iancu schrieb:
>> 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.
>>
>The siptrace module require you to set a message/transaction
>flag (for forcing the siptracing for a transaction) (see
>http://www.opensips.org/Resources/DocsCoreFlags16)
>
Okay the setflag(trace) is required for transactions. I understand
that it is not required to trace a single message, where sip_trace()
will do the job just fine on its own.
>In the route{} which is a request route, you get only requests,
>so you cannot trace replies there - the simple solution is to do
>sip_trace + setflag(trace) and (using t_relay()) you should get
>traced all traffic.
>
In comparison with sip_trace + setflag(trace), what would be missing
for the trace log if only setflag(trace) is used? I'm using t_relay.
And if both sip_trace + setflag(trace) are used, will some messages
appear twice in the trace log?
Sadly, right now I can't test these things because my db_text is not
working correctly (it only writes on UDP connections.)
Regards,
Brian
More information about the Users
mailing list