No incomming calls


#1

Hello,

I’m very new to asterisk, and I do not know what else to try…

The situation:
VIP-Provider(dg.voip.dg-w. de) - PFsense Firewall - asterisk (10.20.30.240)

The problem:
Calls from the provider don`t come in.

Here is the tcpdump output form PFsense LAN interface:
At first you see the attempt of the provider to start the connection establishment.
At the end you see the the successful registration at the provider.


tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
IP 185.22.44.186.5060 > 10.20.30.240.5060: UDP, length 943
E.......|.,N..,.
...........INVITE sip:004998765432100@10.20.30.240:5060 SIP/2.0
Via: SIP/2.0/UDP 185.22.44.186:5060;branch=z9hG4bKekl3un30e8bsgc04f7n0.1
From: <sip:01711234567@bt.com>;tag=sc1dg1-c08f407d1b894f8e
To: <sip:098765432100@10.64.1.1>
Call-ID: 5C27123E-00E30F4B@DDUS0_PCU-255
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS
Max-Forwards: 43
User-Agent: AareSwitch/6.3.11762
Session-Expires: 600;refresher=uas
Min-SE: 90
Supported: timer
Contact: <sip:01711234567@185.22.44.186:5060;transport=udp>
Content-Type: application/sdp
Content-Length: 388

v=0
o=hiQ9200 607920181129072046 1179385965 IN IP4 185.22.44.186
s=Phone Call via hiQ9200 SIPCA
c=IN IP4 185.22.44.186
t=0 0
m=audio 24296 RTP/AVP 8 98 100
a=rtpmap:8 PCMA/8000
a=fmtp:8 vad=no
a=rtpmap:98 PCMA/8000
a=rtpmap:100 telephone-event/8000
a=fmtp:100 0-15
a=gpmd:98 vbd=yes
a=gpmd:99 vbd=yes
a=sqn: 0
a=cdsc: 1 image udptl t38
a=pmft: T38
a=sendrecv
a=ptime:20

IP 10.20.30.240.5060 > 185.22.44.186.5060: UDP, length 530
E.......@..O
.....,.........SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 185.22.44.186:5060;branch=z9hG4bKekl3un30e8bsgc04f7n0.1;received=185.22.44.186
From: <sip:01711234567@bt.com>;tag=sc1dg1-c08f407d1b894f8e
To: <sip:098765432100@10.64.1.1>;tag=as2552b5b6
Call-ID: 5C27123E-00E30F4B@DDUS0_PCU-255
CSeq: 1 INVITE
Server: Asterisk PBX 16.0.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="16", nonce="28c6aea0"
Content-Length: 0


IP 185.22.44.186.5060 > 10.20.30.240.5060: UDP, length 328
E..d....|.....,.
........P..ACK sip:004998765432100@10.20.30.240:5060 SIP/2.0
Via: SIP/2.0/UDP 185.22.44.186:5060;branch=z9hG4bKekl3un30e8bsgc04f7n0.1
CSeq: 1 ACK
From: <sip:01711234567@bt.com>;tag=sc1dg1-c08f407d1b894f8e
To: <sip:098765432100@10.64.1.1>;tag=as2552b5b6
Call-ID: 5C27123E-00E30F4B@DDUS0_PCU-255
Max-Forwards: 43
Content-Length: 0


IP 10.20.30.112.5060 > 10.20.30.240.5060: UDP, length 4
Eh. ..@.@...
..p
.........l.

..............
IP 10.20.30.112.5060 > 10.20.30.240.5060: UDP, length 4
Eh. ..@.@...
..p
.........l.

..............
IP 10.20.30.240.5060 > 185.22.44.186.5060: UDP, length 650
E....F..@..,
.....,........xREGISTER sip:dg.voip.dg-w.de SIP/2.0
Via: SIP/2.0/UDP 10.20.30.240:5060;branch=z9hG4bK60b1faf2;rport
Max-Forwards: 70
From: <sip:098765432100@dg.voip.dg-w.de>;tag=as62468669
To: <sip:098765432100@dg.voip.dg-w.de>
Call-ID: 1cfaf63e0e602c30187033cd48f1c323@dg.voip.dg-w.de
CSeq: 131 REGISTER
Supported: replaces, timer
User-Agent: Asterisk PBX 16.0.1
Authorization: Digest username="xxxxxxxxxx", realm="dg.voip.dg-w.de", algorithm=MD5, uri="sip:dg.voip.dg-w.de", nonce="5c2712337de838c8de99b8546955052b6a978946", response="b544d56e85247f0c37166e6cbe1a34d8"
Expires: 120
Contact: <sip:004998765432100@10.20.30.240:5060>
Content-Length: 0


IP 185.22.44.186.5060 > 10.20.30.240.5060: UDP, length 384
E.......|..}..,.
.........?.SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.20.30.240:5060;received=100.68.60.55;branch=z9hG4bK60b1faf2;rport=34191
From: <sip:098765432100@dg.voip.dg-w.de>;tag=as62468669
To: <sip:098765432100@dg.voip.dg-w.de>;tag=aprqdkshp7ii9d8j6-456jql3000068
Call-ID: 1cfaf63e0e602c30187033cd48f1c323@dg.voip.dg-w.de
CSeq: 131 REGISTER
Contact: <sip:004998765432100@10.20.30.240:5060>;expires=60

I thought about 2 problems:

  1. Asterisk’s answer to the provider: SIP/2.0 401 Unauthorized
    I`ve set insecure=invite in sip.conf. But this does not change anything.

  2. “To: <sip:098765432100 @10.64.1.1>” in the INVITE header form the provider.
    Could NAT be the problem?!?
    I have tested to set nat to yes, then to force_rport and then to comedia. No success.
    A SIP Phone, which I connect, also behind the pfsense, but direct to the VoIP-Provider runs perfect, but I have seen, with tcpdump, that this phone uses Vovida.org as STUN server.
    The provider don’t offer a STUN server, and I don´t know how to configure an external STUN server client, like the one from vovida.

Any help will be greatly appreciated.

Thanks in advance

Buschi


#2

If Asterisk is giving 401 to invite, when you have insecure=invite, it suggests that Asterisk not matching the correct peer, Etiher it is matching a wrong one, or it is matching none, and you have alwaysauthreject set.

Using the Asterisklogging will give a better idea of what is going wrong.


#3

Hello David,

you make my day! I never thought about, that the incoming call doesn’t match the correct peer. So I put the parameter under [general]. There, it works like a charm.

Now I have a hot track… Thank you very very much!