Andrew Hancock - VMware vExpert. See if this solution works for you by signing up for a 7 day free trial. What do I get with a subscription? With your subscription - you'll gain access to our exclusive IT community of thousands of IT pros. We can't always guarantee that the perfect solution to your specific problem will be waiting for you.
If you ask your own question - our Certified Experts will team up with you to help you get the answers you need. Who are the certified experts?
To look at a particular SIP message, we can tell Asterisk to display a specific entry:. Note that the entry numbers are displayed in the left hand column, and are simply a monotonically increasing value for each SIP message received or transmitted.
There are a number of fields currently supported by the pjsip show history command, including:. This provides quite a bit of flexibility when searching through a large SIP history. Of course, there are a lot of fields in a SIP message that are not currently supported by the pjsip show history command. If, however, there is a field that you think would be useful to have, the module is relatively easy to extend!
The parser in the history module is sensitive to proper spacing. The time is formatted as epoch timestamps. With these options enabled, this will allow you to more easily see what is going on behind the scenes in your failing scenario. It also can help you to cross-reference entries on this page since several debug, warning, and error messages will be quoted here. All inbound SIP traffic to Asterisk must be matched to a configured endpoint. If Asterisk is unable to determine which endpoint the SIP request is coming from, then the incoming request will be rejected.
If you are seeing messages like:. How does Asterisk determine which endpoint a request is coming from? Asterisk uses something called "endpoint identifiers" to determine this. There are three endpoint identifiers bundled with Asterisk: user, ip, and anonymous. If nothing has been explicitly configured with regards to endpoint identification, this endpoint identifier is the one being used. The way it works is to use the user portion of the From header from the incoming SIP request to determine which endpoint the request comes from.
In this example, the URI in the From header is "sip:eggowaffles The user portion is "eggowaffles", so Asterisk attempts to look up an endpoint called "eggowaffles" in its configuration. The most common cause of the problem is that the user name referenced in the From header is not the name of a configured endpoint in Asterisk.
But what if you have configured an endpoint called "eggowaffles"? It is possible that there was an error in your configuration, such as an option name that Asterisk does not recognize. If this is the case, then the endpoint may not have been loaded at all. Here are some troubleshooting steps to see if this might be the case:. Go through the logs from Asterisk startup.
You may find that there was an error reported that got lost in the rest of the startup messages. For instance, be on the lookout for messages like:. The result was that the endpoint was not loaded. Here are some troubleshooting steps:. The output should look like the following:. Below the headers at the top of the output, you should see something like the following:. Notice the bottom line. This states that the endpoint is matched based on the IP address If you do not see such a line for the endpoint that you expect to be matched, then there is likely a configuration error.
If the line does appear, then ensure that the IP address listed matches what you expect for the endpoint. If you are noticing that Asterisk is matching the incorrect endpoint by IP address, ensure that there are no conflicts in your configuration. Run the pjsip show endpoints command and look for issues such as the following:. Notice that if a SIP request arrives from Here are some common pitfalls.
If you are using a configuration method other than a config file, ensure that sorcery. For example, if you are using dynamic realtime, you might have the following configuration:. Anonymous endpoint identification allows for a specially-named endpoint called "anonymous" to be matched if other endpoint identifiers are not able to determine which endpoint a request originates from.
If SIP traffic that you expect to be matched to the anonymous endpoint is being rejected, try the following troubleshooting steps:.
The first thing you should check if you believe that authentication is failing is to ensure that this is the actual problem. Consider the following SIP call from endpoint to Asterisk:. At first glance, it would appear that the incoming call was challenged for authentication, and that then failed to authenticate on the second INVITE sent. The actual problem here is that the endpoint does not exist within Asterisk.
Whenever a SIP request arrives and Asterisk cannot match the request to a configured endpoint, Asterisk will respond to the request with a Unauthorized response.
Edit the logger. In Asterisk 13 and later, you can dynamically create log channels from the CLI using the logger add channel command. For example, to create the log file above, you would enter:. The new log channel persists until Asterisk is restarted, the logger module is reloaded, or the log files are rotated. From the Asterisk CLI, set the verbose and debug levels for logging this affects CLI and log output and then restart the logger module:.
0コメント