GWX4104 FXO Inbound problem


(Alexander Castañeda) #1

Hi Guys, I have a problem with my GrandStream 4104, I already set it but the calls come in only get in if i set ALLOW Anonymous

fsdpbx*CLI> sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
4101/4101 192.168.1.150 Yes Yes 5060 OK (2 ms)

When I call i get this:

  • Executing [5001@from-sip-external:1] NoOp(“PJSIP/anonymous-00001a07”, “Received incoming SIP connection from unknown peer to 5001”) in new stack
    – Executing [5001@from-sip-external:2] Set(“PJSIP/anonymous-00001a07”, “DID=5001”) in new stack
    – Executing [5001@from-sip-external:3] Goto(“PJSIP/anonymous-00001a07”, “s,1”) in new stack
    – Goto (from-sip-external,s,1)
    – Executing [s@from-sip-external:1] GotoIf(“PJSIP/anonymous-00001a07”, “1?setlanguage:checkanon”) in new stack
    – Goto (from-sip-external,s,2)
    – Executing [s@from-sip-external:2] Set(“PJSIP/anonymous-00001a07”, “CHANNEL(language)=en”) in new stack
    – Executing [s@from-sip-external:3] GotoIf(“PJSIP/anonymous-00001a07”, “1?noanonymous”) in new stack
    – Goto (from-sip-external,s,5)
    – Executing [s@from-sip-external:5] Set(“PJSIP/anonymous-00001a07”, “TIMEOUT(absolute)=15”) in new stack

Can someone tell me what should I change in order to allow inbound calls
[peer]
host=192.168.1.150
username=4101
secret=4101
type=friend
insecure=very
nat=no
keepalive=yes
canreinvite=no
qualify=yes
context=from-trunk
dtmfmode=rfc2833
disallow=all
allow=alaw&ulaw

sip set debug peer 4101
SIP Debugging Enabled for IP: 192.168.1.150
Reliably Transmitting (NAT) to 192.168.1.150:5060:
OPTIONS sip:192.168.1.150 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.144:5160;branch=z9hG4bK68083704;rport
Max-Forwards: 70
From: “Unknown” sip:Unknown@192.168.1.144:5160;tag=as09900702
To: sip:192.168.1.150
Contact: sip:Unknown@192.168.1.144:5160
Call-ID: 66b37e0335fae7fa403a3c5c4c770eb7@192.168.1.144:5160
CSeq: 102 OPTIONS
User-Agent: FPBX-15.0.17.37(16.18.0)
Date: Fri, 09 Jul 2021 19:32:17 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<— SIP read from UDP:192.168.1.150:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.144:5160;branch=z9hG4bK68083704;rport
From: “Unknown” sip:Unknown@192.168.1.144:5160;tag=as09900702
To: sip:192.168.1.150;tag=z9hG4bKe4046f74bd171df5
Call-ID: 66b37e0335fae7fa403a3c5c4c770eb7@192.168.1.144:5160
CSeq: 102 OPTIONS
User-Agent: Grandstream GXW4104 (HW 2.3, Ch:8) 1.4.1.5
Contact: sip:4101@192.168.1.150:5060;transport=udp
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK
Supported: replaces, timer, 100rel, path
Content-Length: 0

<------------->
— (11 headers 0 lines) —
Really destroying SIP dialog ‘66b37e0335fae7fa403a3c5c4c770eb7@192.168.1.144:5160’ Method: OPTIONS

Really destroying SIP dialog ‘6ad81ce320be7d8253affbbb373f0772@192.168.1.144:5160’ Method: OPTIONS
– Executing [5001@from-sip-external:1] NoOp(“PJSIP/anonymous-00001a19”, “Received incoming SIP connection from unknown peer to 5001”) in new stack
– Executing [5001@from-sip-external:2] Set(“PJSIP/anonymous-00001a19”, “DID=5001”) in new stack
– Executing [5001@from-sip-external:3] Goto(“PJSIP/anonymous-00001a19”, “s,1”) in new stack
– Goto (from-sip-external,s,1)
– Executing [s@from-sip-external:1] GotoIf(“PJSIP/anonymous-00001a19”, “1?setlanguage:checkanon”) in new stack
– Goto (from-sip-external,s,2)
– Executing [s@from-sip-external:2] Set(“PJSIP/anonymous-00001a19”, “CHANNEL(language)=en”) in new stack
– Executing [s@from-sip-external:3] GotoIf(“PJSIP/anonymous-00001a19”, “1?noanonymous”) in new stack
– Goto (from-sip-external,s,5)
– Executing [s@from-sip-external:5] Set(“PJSIP/anonymous-00001a19”, “TIMEOUT(absolute)=15”) in new stack
– Channel will hangup at 2021-07-09 15:36:35.240 EDT.
– Executing [s@from-sip-external:6] Set(“PJSIP/anonymous-00001a19”, “receveip=pjsip,remote_addr”) in new stack
– Executing [s@from-sip-external:7] Log(“PJSIP/anonymous-00001a19”, "WARNING,“Rejecting unknown SIP connection from 192.168.1.150:5060"”) in new stack
[2021-07-09 15:36:20] WARNING[1874][C-00001a0c]: Ext. s:7 @ from-sip-external: “Rejecting unknown SIP connection from 192.168.1.150:5060”
– Executing [s@from-sip-external:8] Answer(“PJSIP/anonymous-00001a19”, “”) in new stack
– Executing [s@from-sip-external:9] Wait(“PJSIP/anonymous-00001a19”, “2”) in new stack
– Executing [5001@from-sip-external:1] NoOp(“PJSIP/anonymous-00001a1a”, “Received incoming SIP connection from unknown peer to 5001”) in new stack
– Executing [5001@from-sip-external:2] Set(“PJSIP/anonymous-00001a1a”, “DID=5001”) in new stack
– Executing [5001@from-sip-external:3] Goto(“PJSIP/anonymous-00001a1a”, “s,1”) in new stack
– Goto (from-sip-external,s,1)
– Executing [s@from-sip-external:1] GotoIf(“PJSIP/anonymous-00001a1a”, “1?setlanguage:checkanon”) in new stack
– Goto (from-sip-external,s,2)
– Executing [s@from-sip-external:2] Set(“PJSIP/anonymous-00001a1a”, “CHANNEL(language)=en”) in new stack
– Executing [s@from-sip-external:3] GotoIf(“PJSIP/anonymous-00001a1a”, “1?noanonymous”) in new stack
– Goto (from-sip-external,s,5)
– Executing [s@from-sip-external:5] Set(“PJSIP/anonymous-00001a1a”, “TIMEOUT(absolute)=15”) in new stack
– Channel will hangup at 2021-07-09 15:36:35.340 EDT.
– Executing [s@from-sip-external:6] Set(“PJSIP/anonymous-00001a1a”, “receveip=pjsip,remote_addr”) in new stack
– Executing [s@from-sip-external:7] Log(“PJSIP/anonymous-00001a1a”, "WARNING,“Rejecting unknown SIP connection from 192.168.1.150:5062"”) in new stack
[2021-07-09 15:36:20] WARNING[1875][C-00001a0d]: Ext. s:7 @ from-sip-external: “Rejecting unknown SIP connection from 192.168.1.150:5062”
– Executing [s@from-sip-external:8] Answer(“PJSIP/anonymous-00001a1a”, “”) in new stack
– Executing [s@from-sip-external:9] Wait(“PJSIP/anonymous-00001a1a”, “2”) in new stack
– Executing [s@from-sip-external:10] Playback(“PJSIP/anonymous-00001a19”, “ss-noservice”) in new stack
– <PJSIP/anonymous-00001a19> Playing ‘ss-noservice.ulaw’ (language ‘en’)
– Executing [s@from-sip-external:10] Playback(“PJSIP/anonymous-00001a1a”, “ss-noservice”) in new stack
– <PJSIP/anonymous-00001a1a> Playing ‘ss-noservice.ulaw’ (language ‘en’)
– Executing [s@from-sip-external:11] PlayTones(“PJSIP/anonymous-00001a19”, “congestion”) in new stack
– Executing [s@from-sip-external:12] Congestion(“PJSIP/anonymous-00001a19”, “5”) in new stack
– Executing [s@from-sip-external:11] PlayTones(“PJSIP/anonymous-00001a1a”, “congestion”) in new stack
– Executing [s@from-sip-external:12] Congestion(“PJSIP/anonymous-00001a1a”, “5”) in new stack
== Spawn extension (from-sip-external, s, 12) exited non-zero on ‘PJSIP/anonymous-00001a19’
– Executing [h@from-sip-external:1] Hangup(“PJSIP/anonymous-00001a19”, “”) in new stack
== Spawn extension (from-sip-external, h, 1) exited non-zero on ‘PJSIP/anonymous-00001a19’
== Spawn extension (from-sip-external, s, 12) exited non-zero on ‘PJSIP/anonymous-00001a1a’
– Executing [h@from-sip-external:1] Hangup(“PJSIP/anonymous-00001a1a”, “”) in new stack
== Spawn extension (from-sip-external, h, 1) exited non-zero on ‘PJSIP/anonymous-00001a1a’


#2

You need to expore why

Executing [5001@from-sip-external:1] NoOp(“PJSIP/anonymous-00001a07”, “Received incoming SIP connection from unknown peer to 5001”) in new stack

watch the call come in on sngrep and look at the headers, the to might not be what you thought, some folks bury that in the headers.


(David55) #3

You haven’t logged the incoming INVITE, which suggests it doesn’t have …150 as its source IP. You need to remove the filter from the sip set debug on.


(Alexander Castañeda) #4

I get lose, can you explain to me a little bit more… thanks


(David55) #5

The “peer 4101” means that you will only log traffic that is matched to the sip.conf section named 4101. I’m a little confused there, as your section actually appears to be called “peer”, but, in any case, your problem is that you are not matching it, so nothing will get logged.

You need “sip set debug on”, so that you see everything.


#6

By default, pjsip listens on UDP port 5060 and chan_sip is on port 5160. Assuming you haven’t changed these, it appears that the GXW is sending incoming calls to port 5060 so they are being seen by pjsip, which does not recognize them.

Assuming that you want to keep using chan_sip, in the GXW, change SIP Server for the account from
192.168.1.144
to
192.168.1.144:5160


(David55) #7

Oops. I should have looked more carefully and I would have seen that they were being handled by PJSIP, too, even though you only provided a chan_sip configuratoin. If this is a new system, you should disable chan_sip entirely; your sip.conf settings actually include some obsolete and questionable ones.