Recenlty my company had to upgrade the Asterisk from version 11 to 18. We have a third party
GSM Gateway for GSM and PSTN Call handling and dialplan for the same.
On Astersik 11 we use SIP Dialpan which accept the hotline number configured in the GSM Gateway and forward the call to voice prompt for inbound calls.
However, after migrating to Asterisk 18 (PJSIP)the hotline number is no more forwarded to voice prompt.
Instead, i got to see an invite with the caller mobile number (INVITE 09xxxxxxxx@192.168.11.15)
which in this case fail to authenticate the user(We use PJSIP Dialplan here).
How to make the Asterisk 18 PJSIP understand the hotline number and forward to dialpan so that we can play the voiceprompt for second dial.
You haven’t provided console output or configuration, you’d also need to state how you expect PJSIP to recognize the incoming call (such as by IP address).
The dialplan is unrelated to those messages. The PJSIP configuration is what controls how incoming requests (such as the INVITE) are matched, authenticated (if configured to do so), and directed to the appropriate place in the dialplan.
Thank you so much for the response. In Asterisk 11 the hotline number was forwarded to dialplan directly. But, in Asterisk 18 the INVITE request received is with a caller number instead of the Hotline number configured in GSM Gateway.
Could you please elaborate more about the PJSIP configuration which are to be added to Asterisk.
An example configaration would be helpful.
I think you need to provide: protocol traces (pjsip set logger on), with the problem field(s) highlighted, and the “hotline number” also highlighted, if present; the contents of your pjsip.conf, the content of the old sip.conf, and the configuration screens for the gateway (highlighting where the “hotline number” is entered. If you still have the old system, also the protocol traces from that (sip set debug on).
Protocol traces should include both the INVITE and the REGISTER.
The make and model of the gateway would also be useful.
I have not enabled anonymous dialing. I am hereby attaching the configuration and log files with this message. Hope it would help in tracing the problem. If you need any further information please let me know.
Gateway is not a useful brand name for gateways, as I can’t create an easy Google search string to find the documentation. Please provide a link to a document that explains the “hotline” field. On the other hand, it is fairly clearly being used as the user part of the request URI sent on the SIP side, so it just a dedicated calling number.
Your logging does not include any REGISTER transactions.
(Also it is always better to take logs from the log files not the console.)
My guess as to the reason for the authentication failure is that the user for authentication purposes only appears in the From header on registrations. chan_sip set up a match rule for the IP address, after a registration, but that goes beyond the official semantics of registration, and chan_pjsip does not do it. I don’t think there is any problem with the “hotline” number.
The easiest solution is probably, to identify and authenticate by IP address, only. Identify by auth_username may also work, although I can’t guarantee it, as the initial challenge will be sent without having identified the endpoint, so you will be relying on nonces, etc. sent on the basis of an unidentified UAC. See the boxed note under the auth_username option:
About authenticating the incoming call by IP Address, if you could give an example configuration
that would be great.
Right now my configurrations are not working i just see “Failed to Authenticate” message as
seen in the Console Log which i have attached in my last log file.
I am now able to hear the voice prompt from Asterisk for second dial. The hotline number
1000 configured for voice prompt is now recognised by Asterisk and it plays the IVR.
However, I have to add the caller GSM Number as an endpoint in PJSIP.conf. Like below,