Help setting up new PBX SIP extensions with Grandstream/OBihai

My old PBXinaFlash died so I am setting up a new FreePBX box from scratch. I’m having issues getting the phone to work. I have a Grandstream ATA (192.168.3.16) with two FXS ports, and an OBihai device (192.168.3.13) with one. Extension 100 is connected to Grandstream FX2. Extension 204 is connected to Grandstream FX1, and extension 400 is connected to the OBihai.

I created extension in FreePBX using legacy Chan_SIP. The Secret (password) for each extension is a long alphanumeric string generated by FreePBX, and it has been copied and saved in the correct respective FXS port. All of these have the extension number as the username and the Secret as the password.

On the phones, I get a dial tone when I pick up, but “This number cannot be dialed” when I try to dial out. Incoming calls are hitting the IVR, but go straight to VM when I select the extension.

This is what I see in my logs:
14356[2023-07-19 21:59:18] NOTICE[3366] chan_sip.c: Registration from ‘sip:[email protected]’ failed for ‘192.168.3.13:5060’ - Wrong password
14357[2023-07-19 21:59:46] NOTICE[3366] chan_sip.c: Registration from ‘sip:[email protected]’ failed for ‘192.168.3.16:5062’ - Wrong password
14358[2023-07-19 22:00:07] NOTICE[3366] chan_sip.c: Registration from ‘sip:[email protected]’ failed for ‘192.168.3.16:5060’ - Wrong password

Is this supposed to be configured differently?

Thanks!

Many of these older devices have limitations on password length and character set.
For each extension, set Secret to a string consisting of no more than 12 letters and digits. Save and Apply Config. Copy/paste the secret values into the password fields of the corresponding devices and reboot them after saving.

If no luck, temporarily shut down your devices and configure a softphone as one of the extensions. Report whether this is successful.

Why? pjsip is easier and you will have fewer problems down the road, when chan_sip becomes extinct.

It also appears that you changed the port assignments to make chan_sip Bind Port 5060. Why?

FreePBX does not have such an announcement; closest is “your call cannot be completed as dialed”. If you are not running the Distro, describe how you got/built the system. AFAIK, Grandstream devices do not have any voice announcements for errors. Obihai devices do, but it’s strange for it to report a failed registration with that message. Perhaps this is an issue with a digit map or outbound call route.

Stewart,
Thank you for those suggestions. I had used Chan_SIP based someone in a forum post said “Always use Chan_SIP to create extensions” and because the original pjsip extensions I created didn’t work. :slight_smile: I did not do anything to bind to port 5060; it seems to have defaulted there. Is that part of the issue?

Today I tried changing all the passwords to a short password. It didn’t help. I deleted extension 204 and recreated it as pjsip. When I created it, FreePBX reported “This device uses PJSIP technology listening on Port 5061 (UDP).” I’ve tried the extension with both a long and short password. It didn’t work. Here are the logs:

2023-07-20 10:01:47] VERBOSE[568388][C-0000002d] pbx.c: Executing [3032048513@from-sip-external:1] NoOp(“SIP/192.168.3.108-0000002c”, “Received incoming SIP connection from unknown peer to 3032048513”) in new stack
3666[2023-07-20 10:01:47] VERBOSE[568388][C-0000002d] pbx.c: Executing [3032048513@from-sip-external:2] Set(“SIP/192.168.3.108-0000002c”, “DID=3032048513”) in new stack
3667[2023-07-20 10:01:47] VERBOSE[568388][C-0000002d] pbx.c: Executing [3032048513@from-sip-external:3] Goto(“SIP/192.168.3.108-0000002c”, “s,1”) in new stack
3668[2023-07-20 10:01:47] VERBOSE[568388][C-0000002d] pbx_builtins.c: Goto (from-sip-external,s,1)
3669[2023-07-20 10:01:47] VERBOSE[568388][C-0000002d] pbx.c: Executing [s@from-sip-external:1] GotoIf(“SIP/192.168.3.108-0000002c”, “1?setlanguage:checkanon”) in new stack
3670[2023-07-20 10:01:47] VERBOSE[568388][C-0000002d] pbx_builtins.c: Goto (from-sip-external,s,2)
3671[2023-07-20 10:01:47] VERBOSE[568388][C-0000002d] pbx.c: Executing [s@from-sip-external:2] Set(“SIP/192.168.3.108-0000002c”, “CHANNEL(language)=en”) in new stack
3672[2023-07-20 10:01:47] VERBOSE[568388][C-0000002d] pbx.c: Executing [s@from-sip-external:3] GotoIf(“SIP/192.168.3.108-0000002c”, “1?noanonymous”) in new stack
3673[2023-07-20 10:01:47] VERBOSE[568388][C-0000002d] pbx_builtins.c: Goto (from-sip-external,s,5)
3674[2023-07-20 10:01:47] VERBOSE[568388][C-0000002d] pbx.c: Executing [s@from-sip-external:5] Set(“SIP/192.168.3.108-0000002c”, “TIMEOUT(absolute)=15”) in new stack
3675[2023-07-20 10:01:47] VERBOSE[568388][C-0000002d] func_timeout.c: Channel will hangup at 2023-07-20 10:02:02.543 MDT.
3676[2023-07-20 10:01:47] VERBOSE[568388][C-0000002d] pbx.c: Executing [s@from-sip-external:6] Set(“SIP/192.168.3.108-0000002c”, “receveip=recvip”) in new stack
3677[2023-07-20 10:01:47] VERBOSE[568388][C-0000002d] pbx.c: Executing [s@from-sip-external:7] Log(“SIP/192.168.3.108-0000002c”, "WARNING,“Rejecting unknown SIP connection from 192.168.3.16"”) in new stack
3678[2023-07-20 10:01:47] WARNING[568388][C-0000002d] Ext. s: “Rejecting unknown SIP connection from 192.168.3.16”
3679[2023-07-20 10:01:47] VERBOSE[568388][C-0000002d] pbx.c: Executing [s@from-sip-external:8] Answer(“SIP/192.168.3.108-0000002c”, “”) in new stack
3680[2023-07-20 10:01:47] VERBOSE[568388][C-0000002d] pbx.c: Executing [s@from-sip-external:9] Wait(“SIP/192.168.3.108-0000002c”, “2”) in new stack
3681[2023-07-20 10:01:49] VERBOSE[568388][C-0000002d] pbx.c: Executing [s@from-sip-external:10] Playback(“SIP/192.168.3.108-0000002c”, “ss-noservice”) in new stack
3682[2023-07-20 10:01:49] VERBOSE[568388][C-0000002d] file.c: <SIP/192.168.3.108-0000002c> Playing ‘ss-noservice.gsm’ (language ‘en’)
3683[2023-07-20 10:01:54] VERBOSE[568388][C-0000002d] pbx.c: Executing [s@from-sip-external:11] PlayTones(“SIP/192.168.3.108-0000002c”, “congestion”) in new stack
3684[2023-07-20 10:01:54] VERBOSE[568388][C-0000002d] pbx.c: Executing [s@from-sip-external:12] Congestion(“SIP/192.168.3.108-0000002c”, “5”) in new stack
3685[2023-07-20 10:01:56] NOTICE[3366] chan_sip.c: Registration from ‘sip:[email protected]’ failed for ‘192.168.3.16:5060’ - Wrong password
3686[2023-07-20 10:01:56] VERBOSE[568388][C-0000002d] pbx.c: Spawn extension (from-sip-external, s, 12) exited non-zero on ‘SIP/192.168.3.108-0000002c’
3687[2023-07-20 10:01:56] VERBOSE[568388][C-0000002d] pbx.c: Executing [h@from-sip-external:1] Hangup(“SIP/192.168.3.108-0000002c”, “”) in new stack
3688[2023-07-20 10:01:56] VERBOSE[568388][C-0000002d] pbx.c: Spawn extension (from-sip-external, h, 1) exited non-zero on ‘SIP/192.168.3.108-0000002c’

The error message is coming from Asterisk rather than Grandstream. The precise message is “The number you have dialed is not in service. Please check the number and try again.”

Then I created an IAX extension and was able to dial using a softphone. Any idea what else I could try to get those SIP extensions to work?

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