Inbound calls not working on Grandstream GXW4108

Hi

I’m trying to configure a grandstream gxw4108 version 1.4.1.5 with Freepbx version I’m settting FXO port 1 in gxw4108, I followed these guides for doing the configuration:

http://wiki.freepbx.org/display/FOP/Configuring+a+Grandstream+GXW-410X+Device+to+act+as+an+FXO+Gateway

But I just can make outbound calls, When I try with inbound calls freepbx reports an error.

This is my Freepbx configuration:
I created a SIP trunk (I remove the line secret=password, because the sip trunk didn’t register):

Trunk Name: 6000
PEER Details:
context=from-trunk
host=192.168.1.141
type=peer
dtmfmode=rfc2833
qualify=yes
insecure=port
port=5060

I Created an Inbound route.
Set the DID to 6000 that has “Set Destination” Extension: 1000

I Created an outbound route.

This is the gxw4108 configuration:
TAB Accounts
Account 1
General Setting
Account Name: General
SIP Server: 192.168.1.142
Outbound Proxy: 192.168.1.142

SIP User Accounts:
Channels: 1
SIP User ID: 6000
Authenticate ID: 6000
Authen Password: the password used
SIP Account: Account 1

Network Settings:
NAT Traversal (STUN): NO

SIP Settings:
SIP Registration: No
Force Invite: No

TAB Settings:
Chanels Settings:
Channel Specific Setting:
DTMF Methods: ch1-8:2;

Calling to VoIP:
Channel Dialing to VOIP
Unconditional Call Forward:
User ID: ch1:6000;2-8;
SIP Server:ch1-8:p1;
Sip Destination Port: ch1-8:5060;

TAB FXO Lines
Dialing:
Wait for Dial-Tone (Y/N): ch1-8:N;
Stage Method(1/2): ch1-8:1;
Min Delay Before Dialing Out: ch1-8:300;
Dial Plan (1 Stage Dialing Only) and Dial Settings

Outgoing Call Dial Plan: {[x*]+}

This is the error that reports Freepbx when I call to line that is connected to FXO port 1:

[2017-03-02 18:05:36] NOTICE[16669]: res_pjsip/pjsip_distributor.c:525 log_failed_request: Request ‘INVITE’ from ‘sip:[email protected]’ failed for ‘192.168.1.141:5060’ (callid: [email protected]) - No matching endpoint found
[2017-03-02 18:05:36] NOTICE[16669]: res_pjsip/pjsip_distributor.c:525 log_failed_request: Request ‘INVITE’ from ‘sip:[email protected]’ failed for ‘192.168.1.141:5060’ (callid: [email protected]) - No matching endpoint found
[2017-03-02 18:05:36] NOTICE[16669]: res_pjsip/pjsip_distributor.c:525 log_failed_request: Request ‘INVITE’ from ‘sip:[email protected]’ failed for ‘192.168.1.141:5060’ (callid: [email protected]) - Failed to authenticate
[2017-03-02 18:05:36] NOTICE[16669]: res_pjsip/pjsip_distributor.c:525 log_failed_request: Request ‘INVITE’ from ‘sip:[email protected]’ failed for ‘192.168.1.141:5060’ (callid: [email protected]) - No matching endpoint found
[2017-03-02 18:05:36] NOTICE[16669]: res_pjsip/pjsip_distributor.c:525 log_failed_request: Request ‘INVITE’ from ‘sip:[email protected]’ failed for ‘192.168.1.141:5060’ (callid: [email protected]) - Failed to authenticate

This is output for: sip show peers:
dhcppc3*CLI> sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
6000 192.168.1.141 Yes Yes 5060 OK (2 ms)
1 sip peers [Monitored: 1 online, 0 offline Unmonitored: 0 online, 0 offline]

Please, any ideas?

Hi, I’ve tried setting up FreePbx (I forgot to mention I’ve got a Freepbx version FreePBX 13.0.190.12) as this guide:

http://wiki.freepbx.org/display/FOP/Configuring+a+Grandstream+GXW-410X+Device+to+act+as+an+FXO+Gateway

But I’ve got the same result, I can do outbound calls but Inbound calls don’t work:

This FreePbx sip trunk:
Sip Setting – Outgoing:

Trunk Name :6000
type=friend
qualify=yes
secret=password
host=192.168.1.141
context=from-trunk
port=5060
dtmfmode=rfc2833
canreinvite=no
disallow=all
allow=ulaw

This is Freepbx console output error:

[2017-03-03 09:03:39] NOTICE[2151]: res_pjsip/pjsip_distributor.c:525 log_failed_request: Request 'INVITE' from '<sip:[email protected]>' failed for '192.168.1.141:5060' (callid: [email protected]) - No matching endpoint found
[2017-03-03 09:03:40] NOTICE[2151]: res_pjsip/pjsip_distributor.c:525 log_failed_request: Request 'INVITE' from '<sip:[email protected]>' failed for '192.168.1.141:5060' (callid: [email protected]) - No matching endpoint found
[2017-03-03 09:03:43] NOTICE[2151]: res_pjsip/pjsip_distributor.c:525 log_failed_request: Request 'INVITE' from '<sip:[email protected]>' failed for '192.168.1.141:5060' (callid: [email protected]) - No matching endpoint found
[2017-03-03 09:03:49] NOTICE[2151]: res_pjsip/pjsip_distributor.c:525 log_failed_request: Request 'INVITE' from '<sip:[email protected]>' failed for '192.168.1.141:5060' (callid: [email protected]) - No matching endpoint found
[2017-03-03 09:03:56] NOTICE[2188]: chan_sip.c:29963 sip_poke_noanswer: Peer '6000' is now UNREACHABLE!  Last qualify: 2
[2017-03-03 09:04:06] NOTICE[2188]: chan_sip.c:24444 handle_response_peerpoke: Peer '6000' is now Reachable. (4ms / 2000ms)

Hi, I tried with this guide:

But I just can make outbound calls, Inbound calls not working:

This FreePbx sip trunk configuration:
Sip Setting – Outgoing:

Trunk Name :6000
context=from-trunk
host=192.168.1.141
insecure=port
type=peer
dtmfmode=rfc2833

This is gxw4108 changes:

TAB Accounts
Account 1
General Setting
Account Name: General
SIP Server: 192.168.1.142
Outbound Proxy: “Blank”

SIP User Accounts:
Channels: "Blank"
SIP User ID: "Blank"
Authenticate ID: "Blank"
Authen Password: "Blank"
SIP Account: Account 1

SIP Settings:
SIP Registration: No
Force Invite: No

Calling to VoIP:
Channel Dialing to VOIP
Unconditional Call Forward:
User ID: ch1:6000;2-8;
SIP Server:ch1-8:p1;
Sip Destination Port: ch1-8:5060;

TAB FXO Lines
Dialing:
Wait for Dial-Tone (Y/N): ch1-8:N;
Stage Method(1/2): ch1-8:1;
Min Delay Before Dialing Out: ch1-8:300;
Dial Plan (1 Stage Dialing Only) and Dial Settings

Outgoing Call Dial Plan: {[x*]+}

Now When I call to GXW4108 FXO 1 (FXO 1 is set for Inbound route to ring on Extension 1001 in FreePBX), FreePbx show me the following:

[2017-03-03 12:35:28] NOTICE[16888]: res_pjsip/pjsip_distributor.c:525 log_failed_request: Request 'INVITE' from '<sip:[email protected]>' failed for '192.168.1.141:5060' (callid: [email protected]) - No matching endpoint found
[2017-03-03 12:35:28] ERROR[2150]: pjproject:0 <?>:     sip_transport. Error processing 1171 bytes packet from UDP 192.168.1.141:5060 : PJSIP syntax error exception when parsing '' header on line 7 col 34:
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.1.141:5060;branch=z9hG4bK56e1e6c5768217e1
From: ""<sip:[email protected]>;tag=f99710904f601a27
To: <sip:[email protected]>
Contact: <sip:192.168.1.141:5060>
Supported: replaces, timer, path
Authorization: Digest username=""Anonymous"", realm="asterisk", algorithm=MD5, uri="sip:[email protected]", qop=auth, nc=00000001, cnonce="7a07ca709fd04dc7", opaque="4c39781d597161b6", nonce="1488560728/93960fd648afc2d08f863716ad1aa5d9", response="03315e741842e41d8b282a2d9c178893"
Call-ID: [email protected]
CSeq: 22978 INVITE
User-Agent: Grandstream GXW4108 (HW 2.3, Ch:2) 1.4.1.5
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK
Content-Type: application/sdp
Content-Length: 339

v=0
o=system 8002 8001 IN IP4 192.168.1.141
s=SIP Call
c=IN IP4 192.168.1.141
t=0 0
m=audio 5012 RTP/AVP 0 8 4 18 3 2 101
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=rtpmap:3 GSM/8000
a=rtpmap:2 G726-32/8000
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11

-- end of packet.
[2017-03-03 12:35:29] ERROR[2150]: pjproject:0 <?>:     sip_transport. Error processing 1171 bytes packet from UDP 192.168.1.141:5060 : PJSIP syntax error exception when parsing '' header on line 7 col 34:
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.1.141:5060;branch=z9hG4bK56e1e6c5768217e1
From: ""<sip:[email protected]>;tag=f99710904f601a27
To: <sip:[email protected]>
Contact: <sip:192.168.1.141:5060>
Supported: replaces, timer, path
Authorization: Digest username=""Anonymous"", realm="asterisk", algorithm=MD5, uri="sip:[email protected]", qop=auth, nc=00000002, cnonce="a7975de29d34a680", opaque="4c39781d597161b6", nonce="1488560728/93960fd648afc2d08f863716ad1aa5d9", response="bd695ee46faaef7f94c26ce240f3524c"
Call-ID: [email protected]
CSeq: 22978 INVITE
User-Agent: Grandstream GXW4108 (HW 2.3, Ch:2) 1.4.1.5
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK
Content-Type: application/sdp
Content-Length: 339

v=0
o=system 8002 8002 IN IP4 192.168.1.141
s=SIP Call
c=IN IP4 192.168.1.141
t=0 0
m=audio 5012 RTP/AVP 0 8 4 18 3 2 101
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=rtpmap:3 GSM/8000
a=rtpmap:2 G726-32/8000
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11

-- end of packet.
[2017-03-03 12:35:32] ERROR[2150]: pjproject:0 <?>:     sip_transport. Error processing 1171 bytes packet from UDP 192.168.1.141:5060 : PJSIP syntax error exception when parsing '' header on line 7 col 34:
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.1.141:5060;branch=z9hG4bK56e1e6c5768217e1
From: ""<sip:[email protected]>;tag=f99710904f601a27
To: <sip:[email protected]>
Contact: <sip:192.168.1.141:5060>
Supported: replaces, timer, path
Authorization: Digest username=""Anonymous"", realm="asterisk", algorithm=MD5, uri="sip:[email protected]", qop=auth, nc=00000003, cnonce="9426e79524f464c5", opaque="4c39781d597161b6", nonce="1488560728/93960fd648afc2d08f863716ad1aa5d9", response="84470bec5ef5ba304ee3c036b3ccfc43"
Call-ID: [email protected]
CSeq: 22978 INVITE
User-Agent: Grandstream GXW4108 (HW 2.3, Ch:2) 1.4.1.5
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK
Content-Type: application/sdp
Content-Length: 339

v=0
o=system 8002 8003 IN IP4 192.168.1.141
s=SIP Call
c=IN IP4 192.168.1.141
t=0 0
m=audio 5012 RTP/AVP 0 8 4 18 3 2 101
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=rtpmap:3 GSM/8000
a=rtpmap:2 G726-32/8000
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11

-- end of packet.
[2017-03-03 12:35:38] ERROR[2150]: pjproject:0 <?>:     sip_transport. Error processing 1171 bytes packet from UDP 192.168.1.141:5060 : PJSIP syntax error exception when parsing '' header on line 7 col 34:
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.1.141:5060;branch=z9hG4bK56e1e6c5768217e1
From: ""<sip:[email protected]>;tag=f99710904f601a27
To: <sip:[email protected]>
Contact: <sip:192.168.1.141:5060>
Supported: replaces, timer, path
Authorization: Digest username=""Anonymous"", realm="asterisk", algorithm=MD5, uri="sip:[email protected]", qop=auth, nc=00000004, cnonce="bfa7b1077a748162", opaque="4c39781d597161b6", nonce="1488560728/93960fd648afc2d08f863716ad1aa5d9", response="1d71bf1ea7b0e16b12f2b1309a2cbefa"
Call-ID: [email protected]
CSeq: 22978 INVITE
User-Agent: Grandstream GXW4108 (HW 2.3, Ch:2) 1.4.1.5
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK
Content-Type: application/sdp
Content-Length: 339

v=0
o=system 8002 8004 IN IP4 192.168.1.141
s=SIP Call
c=IN IP4 192.168.1.141
t=0 0
m=audio 5012 RTP/AVP 0 8 4 18 3 2 101
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=rtpmap:18 G729/8000
a=rtpmap:3 GSM/8000
a=rtpmap:2 G726-32/8000
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11

-- end of packet.
1 Like

Hi, Finally I found the solution, The FreePbx console show a Pjsip error:

   [2017-03-03 12:35:28] NOTICE[16888]: res_pjsip/pjsip_distributor.c:525 log_failed_request: Request 'INVITE' from '<sip:[email protected]>' failed for '192.168.1.141:5060' (callid: [email protected]) - No matching endpoint found
[2017-03-03 12:35:28] ERROR[2150]: pjproject:0 <?>:     sip_transport. Error processing 1171 bytes packet from UDP 192.168.1.141:5060 : PJSIP syntax error exception when parsing '' header on line 7 col 34:
INVITE sip:[email protected] SIP/2.0

So I created a Pjsip trunk on FreePbx, and in the trunk “pjsip Setting” I put the following:

General:
Username: 6000
secret: password
Authentication: Outbound
Registration: Send
SIP Server: gxw4108_IpAddress
SIP Server Port: 5060

Advanced:
Contact User: 6000
From User: 6000

In the gxw4108 I put:
SIP Settings:
SIP Registration: Yes
Accept Proxy INVITE Only: Yes

1 Like

THANK YOU!!! I have also been working on this and getting the same error. Of course, it needed a pjSIP trunk.

Did I say THANK YOU???

Try changing your insecure=port TO
insecure=port,invite