Hello to all!
I’m new with FreePBX but need to configure trunk between my FreePBX and GSM GW.
It works fine with old asterisk but this PJSIP driving me crazy.
This GSM GW trying to send register messages to FreePBX but What I see is only this warning:
[2022-03-07 11:42:15] WARNING[8694]: res_pjsip_registrar.c:1116 registrar_on_rx_request: AOR ‘gsmgw’ has no configured max_contacts. Endpoint ‘gsmgw’ (192.168.5.35:5060) unable to register
In FreePBX I have set allow only PJSIP and give it port 5060 in Settings - Asterisk SIP Settings - SIP Settings [chan_pjsip] - udp - 0.0.0.0 - All set to yes, Ports to Listen On set to 5060
And in Settings - Advanced Settings I have SIP channel Driver set to chan_pjsip.
My trunk settings:
General:
Trunk Name: gsmgw
pjsip Settings:
General:
Secret: secret
Authentication: Both
Registration: None
SIP Server: "192.168.5.35"
SIP Server Port: 5060
Context: from-pstn
Why it has no configured max_contacts? Everywhere else it is automaticly configured to 1 why not there?
Or maybe more generel question:
What should I change in settings to make it work? In my desperate mood I tried mostly every possible variation of trunk setting
But always the result was somekind of error or warning
Hello Stewart,
thanks for reply.
I changed the setting of Registration parameter to Receive.
Now I don’t getting any error.
But Incoming call had been presented as anonymous and not as gsmrgw. Why?
Executing [8101@from-sip-external:1] NoOp("PJSIP/anonymous-00000027", "Received incoming SIP connection from unknown peer to 8101") in new stack
-- Executing [8101@from-sip-external:2] Set("PJSIP/anonymous-00000027", "DID=8101") in new stack
-- Executing [8101@from-sip-external:3] Goto("PJSIP/anonymous-00000027", "s,1") in new stack
-- Goto (from-sip-external,s,1)
-- Executing [s@from-sip-external:1] GotoIf("PJSIP/anonymous-00000027", "1?setlanguage:checkanon") in new stack
-- Goto (from-sip-external,s,2)
-- Executing [s@from-sip-external:2] Set("PJSIP/anonymous-00000027", "CHANNEL(language)=en") in new stack
-- Executing [s@from-sip-external:3] GotoIf("PJSIP/anonymous-00000027", "1?noanonymous") in new stack
-- Goto (from-sip-external,s,5)
-- Executing [s@from-sip-external:5] Set("PJSIP/anonymous-00000027", "TIMEOUT(absolute)=15") in new stack
-- Channel will hangup at 2022-03-07 15:36:18.954 UTC.
-- Executing [s@from-sip-external:6] Set("PJSIP/anonymous-00000027", "receveip=pjsip,remote_addr") in new stack
-- Executing [s@from-sip-external:7] Log("PJSIP/anonymous-00000027", "WARNING,"Rejecting unknown SIP connection from 192.168.5.35:5060"") in new stack
[2022-03-07 15:36:03] WARNING[29794][C-0000001c]: Ext. s:7 @ from-sip-external: "Rejecting unknown SIP connection from 192.168.5.35:5060"
-- Executing [s@from-sip-external:8] Answer("PJSIP/anonymous-00000027", "") in new stack
> 0x7f76fc125280 -- Strict RTP learning after remote address set to: 192.168.5.35:8042
and everything works just fine. But only for a while. After that this WARNING appears:
WARNING[8451]: res_pjsip_registrar.c:1116 registrar_on_rx_request: AOR 'gsmgw' has no configured max_contacts. Endpoint 'gsmgw' (192.168.5.35:5060) unable to register
-- Removed contact 'sip:[email protected]:5060;user=phone;phone-context=gsmgw' from AOR 'gsmgw' due to expiration
== Contact gsmgw/sip:[email protected]:5060;user=phone;phone-context=gsmgw has been deleted
Why is this happen and how to prevent to this happen?
FreePBX is an implementation of a ‘Public Branch eXchange’, as such it is well setup to handle Phone numbers limited to [0-9] (but not letters), best that you have your gateway provide a numerical identification of your destination because ‘gsmgw’ is not numeric.
You could however write a custom context to re-write ‘gsmgw’ to an identifiable endpoint within FreePBX though. which apparently you have done, so show us your
This is not true at all. I have used endpoints with non-numeric names and had no problems.
The error explained the issue clearly. The endpoint is set for inbound registrations and needs the max_contacts set for the AOR. That is missing. Set it to 1 and error goes away.
Because an extension has the expectation of inbound registers while trunks have expectations of outbound. You are using a trunk for inbound, you need to set it.