Asterisk 18 PJSIP does not accpet hotline number from third party GSM Gateway

Hi,

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.

Please help me out to solve this problem.

Thank you,
Anand

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).

Hi,

Attached is the console output and the diaplan configuration for
the hotline which is configured in the GSM Gateway.

Looking forward for your repsponse.

Best Regards,
Anand

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.

Hi,

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.

Awaiting your response.

Thank you,
Anand

I don’t know what “forwarded to dialplan directly” means. Was anonymous calling enabled in chan_sip, and so it just went into the dialplan?

I’m not clear what “hotline number” means here.

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.

Hi,

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.

Thank you,
Anand
Conosle_Log.txt (5.4 KB)
pjsip.txt (2.2 KB)
voip.txt (490 Bytes)


Hi David,

Thank you so much for the response. I am hereby attaching the required files for your
information. Let me know if you need any further information.

Best Regards,
Anand
Conosle_Log.txt (5.4 KB)
pjsip.txt (2.2 KB)
voip.txt (490 Bytes)


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:

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Configuration_res_pjsip#Asterisk13Configuration_res_pjsip-endpoint_identify_by

Hi David,

Thank you so much for the detailed reposne.

The GSM(LTE) Gateway is from the following vendor they just have the datasheet. No further detailed information.

About the hotline number they have som information as attached in the picture.

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 will look forward for your reponse.

Thanks & Regards,
Anand

Use type=identify section with a match for the IP address, and don’t use auth=. Use contact=, rather than max_contacts.

Hi David,

Thank you so much for the detailed configuration.

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,

[my_endpoint]
type = endpoint
context = from-sip
allow = !all,g722,ulaw
aors = my_aor
from_user = 09XXXXXXXX
direct_media = no
from_domain = X.X.X.X

[my_identify]
type = identify
endpoint = my_endpoint
match = X.X.X.X

[my_aor]
type = aor
contact = sip:09XXXXXXXX@X.X.X.X

09XXXXXXXX
aors = my_aor
callerid = GSM-Anand <09XXXXXXXX>

So, for each distinct caller every time i have to add his number as an endpoint to be recognized
by Asterisk.

Is it right what i am doing here ? Is there any better way ?

Thanks & Regards,
Anand

If you have the type=identify right, this should not be necessary.

The contact should probably be sip:X.X.X.X

from_user probably doesn’t do anything useful. Similarly for from_domain.

Hi David,

Thank you so much. Finally, i am able to solve my problem with your input and suggestions.

Best Regards,
Anand

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.