How To Read Sip Debug

Home » Asterisk Users » How To Read Sip Debug
Asterisk Users 4 Comments

Generally, what am I looking for when turning SIP debug on? More specifically, the provider says that I’m returning a 404 when they try to call me. Now, I had inbound working, literally, the other day. Outbound works fine. I “may” have broken it either through Asterisk config or the providers portal with settings. Ok, I broke it — not sure how.

comments interspersed:

mordor*CLI>
Reliably Transmitting (NAT) to 192.76.120.10:5060:

I think/infer/assume that this is the IP address for telnyx SIP servers

OPTIONS sip:sip.telnyx.com SIP/2.0

What does OPTIONS mean?

Via: SIP/2.0/UDP :5060;branch=z9hG4bK28142189;rport

rport relates to NAT? The message is via SIP UPD from my externip …. what is branch?

Max-Forwards: 70

70 hops max?

From: “asterisk” >;tag=as1a7aca46

from my externip, with a hash to keep the calls straight?

To:

easy, to telnyx

Contact: :5060>

from me

Call-ID: 6fce72627f253b7f2e15dac713b52392@:5060

another hashcode, Call-ID ?

CSeq: 102 OPTIONS

?

User-Agent: Asterisk PBX 13.1.0~dfsg-1.1ubuntu3

easy enough, my system

Date: Wed, 06 Jul 2016 02:17:12 GMT

easy, date

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE

enumerating accepted replies?

Supported: replaces

?

Content-Length: 0

no data, just “hi”

4 thoughts on - How To Read Sip Debug

  • This is interesting:

    “Note that the To and From header fields are not reversed in the response message as one might expect them to be. This is because the To and From header fields in SIP are defined to indicate the direction of the request, not the direction of the message. ” -Cisco

    so, when I’m receiving an inbound call, the direction would be telnyx first, then me. Regardless of whether the ?message? is from me or the provider.

    -Thufir

  • Hi Thufir,

    The analysis of a SIP Debug depends on what the problem to be solved.

    If you experience problems with inbound calls from a SIP trunk or provider, you can type in Asterisk cli ‘core set debug 3’ and then
    ‘sip set debug ip xxx.xxx.xxx.xxx’ where xxx is the IP of your SIP
    provider or from where it is supposed to come call.

    Then you make a test call, and look in full log an INVITE message
    (note that you analize an OPTION message in your mail, but I think that this not help in this case).

    After the incoming INVITE message from your SIP provider, you can follow the rest of the Asterisk logic and look for the reason why Asterisk is denying that call.

    Hope this help you.

  • Another path to enlightenment is to use tcpdump to capture the packets to a file and then use wireshark.

    Wireshark has a ‘Telephony’ menu and a ‘SIP Flows’ menu item where it will list all of the SIP packets. You can sort by column to help locate the packet of interest.

    Once found, you can click on ‘Flow Sequence’ and it will pop up a window showing the ‘dialog ladder’ that includes that packet. As you click on each packet in the flow, the main wireshark window will re-position to that packet so you can examine it in detail.

    Also on the ‘SIP Flows’ window is a ‘Play Streams’ button. Kind of scary how easy this is…

  • Another nice sip packet is sngrep Shows realtime the sip flows But i think you have to chk the asterisk answer in the dialplan logic to chk what context its hitting etc.
    בתאריך 6 ביולי 2016 10:05 PM,‏ “Steve Edwards”
    כתב: