Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sip-dig(1) [debian man page]

sip-dig(1)							  sofia-sip-utils							sip-dig(1)

NAME
sip-dig - Resolve SIP URIs. This is an example program for sresolv library in synchronous mode. Author: Pekka Pessi <Pekka.Pessi@nokia.com> Date: Original Created: Tue Jul 16 18:50:14 2002 ppessi Synopsis sip-dig [OPTIONS] uri... Description The sip-dig utility resolves SIP URIs as described in RFC 3263. It queries NAPTR, SRV and A/AAAA records and prints out the resulting transport addresses. The default transports are: UDP, TCP, SCTP, TLS and TLS-SCTP. The SIPS URIs are resolved using only TLS transports, TLS and TLS-SCTP. If not otherwise indicated by NAPTR or SRV records, the sip-dig uses UDP and TCP as transports for SIP and TLS for SIPS URIs. The results are printed intended, with a preference followed by weight, then protocol name, port number and IP address in numeric format. Command Line Options The sip-dig utility accepts following command line options: -p protoname Use named transport protocol. The protoname can be either well-known, e.g., 'udp', or it can specify NAPTR service and SRV identifier, e.g., 'tls-udp/SIPS+D2U/_sips._udp.'. --udp Use UDP transport protocol. --tcp Use TCP transport protocol. --tls Use TLS over TCP transport protocol. --sctp Use SCTP transport protocol. --tls-sctp Use TLS over SCTP transport protocol. --no-sctp Ignore SCTP or TLS-SCTP records in the list of default transports. This option has no effect if transport protocols has been explicitly listed. -4 Query IP4 addresses (A records) -6 Query IP6 addresses (AAAA records). -v Be verbatim. Return Codes 0when successful (a 2XX-series response is received) 1when unsuccessful (a 3XX..6XX-series response is received) 2initialization failure Examples Resolve sip:openlaboratory.net, prefer TLS over TCP, TCP over UDP: $ sip-dig --tls --tcp --udp sip:openlaboratory.net 1 0.333 tls 5061 212.213.221.127 2 0.333 tcp 5060 212.213.221.127 3 0.333 udp 5060 212.213.221.127 Resolve sips:example.net with TLS over SCTP (TLS-SCTP) and TLS: $ sip-dig -p tls-sctp --tls sips:example.net 1 0.500 tls-udp 5061 172.21.55.26 2 0.500 tls 5061 172.21.55.26 Environment #SRESOLV_DEBUG, SRESOLV_CONF Reporting Bugs Report bugs to <sofia-sip-devel@lists.sourceforge.net>. Author Written by Pekka Pessi <pekka -dot pessi -at- nokia -dot- com> Copyright Copyright (C) 2006 Nokia Corporation. This program is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Version 1.12.11devel Sat May 7 2011 sip-dig(1)

Check Out this Related Man Page

sip_enable_trans_logging(3SIP)			   Session Initiation Protocol Library Functions		    sip_enable_trans_logging(3SIP)

NAME
sip_enable_trans_logging, sip_enable_dialog_logging, sip_disable_dialog_logging, sip_disable_trans_logging - transaction and dialog logging operations SYNOPSIS
cc [ flag... ] file... -lsip [ library... ] #include <sip.h> int sip_enable_trans_logging(FILE *logfile, int flags); int sip_enable_dialog_logging(FILE *logfile, int flags); void sip_disable_dialog_logging(); void sip_disable_trans_logging(); DESCRIPTION
The sip_enable_trans_logging() and sip_enable_dialog_logging() functions enable transaction and dialog logging respectively. The logfile argument points to a file to which the SIP messages are logged. The flags argument controls the amount of logging. The only flag defined in <sip.h> is SIP_DETAIL_LOGGING. Either transaction or dialog logging, or both, can be enabled at any time. For dialog logging to work, the SIP stack must be enabled to manage dialogs (using SIP_STACK_DIALOGS, see sip_stack_init(3SIP)) when the stack is initialized. All the messages exchanged within a transaction/dialog is captured and later dumped to a log file when the transaction or dialog is deleted or terminated. Upon termination, each dialog writes to the file the messages that were processed in its context. Similarly, upon termina- tion each transaction writes to the file the messages that were processed in its context. The sip_disable_trans_logging() and sip_disable_dialog_logging() functions disable the transaction or dialog logging. These functions do not close the files. It is the responsibility of the application to close them. The log contains the state of the transaction or dialog at the time the message was processed. RETURN VALUES
Upon successful completion, sip_enable_trans_logging() and sip_enable_dialog_logging() return 0. They return EINVAL if logfile is NULL or flags is unrecognized. EXAMPLES
Example 1 Dialog logging The following is an example of dialog logging. FILE *logfile; logfile = fopen("/tmp/ApplicationA", "a+"); sip_enable_dialog_logging(logfile, SIP_DETAIL_LOGGING); /* Application sends INVITE, recieves 180 and 200 response and dialog is created. */ /* Application sends ACK request */ /* Application sends BYE and recieves 200 response */ /* Application disables logging */ sip_disable_dialog_logging(); The log file will be of the following format. ************* Begin Dialog ************* Digest : 43854 43825 26120 9475 5415 21595 25658 18538 ----------------------------- Dialog State : SIP_DLG_NEW Tue Nov 27 15:53:34 2007| Message - 1 INVITE sip:user@example.com SIP/2.0 From: "Me" < sip:me@mydomain.com > ; TAG=tag-from-01 To: "You" < sip:you@yourdomain.com > Contact: < sip:myhome.host.com > MAX-FORWARDS: 70 Call-ID: 1261K6A6492KF33549XM CSeq: 111 INVITE CONTENT-TYPE: application/sdp Via: SIP/2.0/UDP 192.0.0.1 : 5060 ;branch=z9hG4bK-via-EVERYTHINGIDO-05 Record-Route: <sip:server1.com;lr> Record-Route: <sip:server2.com;lr> CONTENT-LENGTH : 0 Tue Nov 27 15:53:34 2007| Message - 2 SIP/2.0 180 Ringing Via: SIP/2.0/UDP 192.0.0.1 : 5060 ;branch=z9hG4bK-via-EVERYTHINGIDO-05 From: "Me" < sip:me@mydomain.com > ; TAG=tag-from-01 To: "You" < sip:you@yourdomain.com >;tag=1 Call-ID: 1261K6A6492KF33549XM CSeq: 111 INVITE Contact: <sip:whitestar2-0.East.Sun.COM:5060;transport=UDP> Record-Route: <sip:server1.com;lr> Record-Route: <sip:server2.com;lr> Content-Length: 0 ----------------------------- Dialog State : SIP_DLG_EARLY /* Entire 200 OK SIP Response */ ----------------------------- Dialog State : SIP_DLG_CONFIRMED /* Entire ACK Request */ /* Entire BYE Request */ /* Entire 200 OK Response */ ----------------------------- ************* End Dialog ************* ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
sip_stack_init(3SIP), attributes(5) SunOS 5.11 11 Jan 2008 sip_enable_trans_logging(3SIP)
Man Page