I can't receive inbound calls from my DID

Hi everyone and thanks in advance .

I can’t receive inbound calls from my DID provided by sipgate.co.uk. The main issue is do not get logs from Cli, so i do not know where to start.

I’m using goautodial 2.1, vicidial 2.4 and asterisk 1.4.

Here my config:

[code]Registration String

userid:pw@sipgate.co.uk:5060/userid

Account Entry:

[sipgate]
type=friend
username=userid
secret=pw
host=sipgate.co.uk
fromuser=userid
nat=yes
qualify=yes
authuser=userid
dtmfmode=info
context=trunkinbound
insecure=very
canreinvite=no
allow=g729
type=friend

Globals String:
SIPGATE= SIP/sipgate

Dialplan Entry:

exten => _x.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _x.,2,Dial(${sipgate}/${EXTEN:1},55,tTor))
exten => _x.,3,Hangup

;Placed in extensions.conf [trunkinbound] ; DID call routing process exten => _X.,1,AGI(agi-DID_route.agi)

Active: y

sip show peers

CODE: SELECT ALL
sipgate/1809100 217.10.79.23 N 5060 OK (113 ms)[/code]

[code]DID config

DID Extension:020360xxxxx
Active:Y
DID Route:phone
Phone Extension:8001
Server IP: my ip[/code]

When I dial my DID i have only vm from sipgate, it seems that my server does not detect my did.

If you have any advices, please let me know. thanks a lot.

Logging is controlled by logger.conf, and the CLI commands:

core set debug…
core set verbose …
sip set debug…

You should not be using Asterisk 1.4 for new installations,

Why have you set nat= ?

[quote=“david55”]Logging is controlled by logger.conf, and the CLI commands:

core set debug…
core set verbose …
sip set debug…

You should not be using Asterisk 1.4 for new installations,

Why have you set nat= ?[/quote]

thanks for replying I did test:
SIP Debugging enabled

[code][Apr 20 16:47:45] Reliably Transmitting (NAT) to 192.168.43.235:43901:
OPTIONS sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;c pd=on SIP/2.0
Via: SIP/2.0/UDP 192.168.43.200:5060;branch=z9hG4bK5f496a36;rport
From: “asterisk” sip:asterisk@192.168.43.200;tag=as7b264b05
To: <sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;cpd= on>
Contact: sip:asterisk@192.168.43.200
Call-ID: 4ec76d7c140cce6e4695e6be50a653bd@192.168.43.200
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Sun, 20 Apr 2014 15:47:45 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 0


[Apr 20 16:47:46] Retransmitting #1 (NAT) to 192.168.43.235:43901:
OPTIONS sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;c pd=on SIP/2.0
Via: SIP/2.0/UDP 192.168.43.200:5060;branch=z9hG4bK5f496a36;rport
From: “asterisk” sip:asterisk@192.168.43.200;tag=as7b264b05
To: <sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;cpd= on>
Contact: sip:asterisk@192.168.43.200
Call-ID: 4ec76d7c140cce6e4695e6be50a653bd@192.168.43.200
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Sun, 20 Apr 2014 15:47:45 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 0


[Apr 20 16:47:47] Retransmitting #2 (NAT) to 192.168.43.235:43901:
OPTIONS sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;c pd=on SIP/2.0
Via: SIP/2.0/UDP 192.168.43.200:5060;branch=z9hG4bK5f496a36;rport
From: “asterisk” sip:asterisk@192.168.43.200;tag=as7b264b05
To: <sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;cpd= on>
Contact: sip:asterisk@192.168.43.200
Call-ID: 4ec76d7c140cce6e4695e6be50a653bd@192.168.43.200
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Sun, 20 Apr 2014 15:47:45 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 0


[Apr 20 16:47:48] Retransmitting #3 (NAT) to 192.168.43.235:43901:
OPTIONS sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;c pd=on SIP/2.0
Via: SIP/2.0/UDP 192.168.43.200:5060;branch=z9hG4bK5f496a36;rport
From: “asterisk” sip:asterisk@192.168.43.200;tag=as7b264b05
To: <sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;cpd= on>
Contact: sip:asterisk@192.168.43.200
Call-ID: 4ec76d7c140cce6e4695e6be50a653bd@192.168.43.200
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Sun, 20 Apr 2014 15:47:45 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 0


[Apr 20 16:47:49] Retransmitting #4 (NAT) to 192.168.43.235:43901:
OPTIONS sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;c pd=on SIP/2.0
Via: SIP/2.0/UDP 192.168.43.200:5060;branch=z9hG4bK5f496a36;rport
From: “asterisk” sip:asterisk@192.168.43.200;tag=as7b264b05
To: <sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;cpd= on>
Contact: sip:asterisk@192.168.43.200
Call-ID: 4ec76d7c140cce6e4695e6be50a653bd@192.168.43.200
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Sun, 20 Apr 2014 15:47:45 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 0


[Apr 20 16:47:49] Really destroying SIP dialog ‘4ec76d7c140cce6e4695e6be50a653bd @192.168.43.200’ Method: OPTIONS
[Apr 20 16:47:59] Reliably Transmitting (NAT) to 192.168.43.235:43901:
OPTIONS sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;c pd=on SIP/2.0
Via: SIP/2.0/UDP 192.168.43.200:5060;branch=z9hG4bK046783c0;rport
From: “asterisk” sip:asterisk@192.168.43.200;tag=as0bf9edd5
To: <sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;cpd= on>
Contact: sip:asterisk@192.168.43.200
Call-ID: 105bccd06a1322df088f00d41fb477b7@192.168.43.200
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Sun, 20 Apr 2014 15:47:59 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 0


[Apr 20 16:48:00] Retransmitting #1 (NAT) to 192.168.43.235:43901:
OPTIONS sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;c pd=on SIP/2.0
Via: SIP/2.0/UDP 192.168.43.200:5060;branch=z9hG4bK046783c0;rport
From: “asterisk” sip:asterisk@192.168.43.200;tag=as0bf9edd5
To: <sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;cpd= on>
Contact: sip:asterisk@192.168.43.200
Call-ID: 105bccd06a1322df088f00d41fb477b7@192.168.43.200
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Sun, 20 Apr 2014 15:47:59 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 0


[Apr 20 16:48:01] Retransmitting #2 (NAT) to 192.168.43.235:43901:
OPTIONS sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;c pd=on SIP/2.0
Via: SIP/2.0/UDP 192.168.43.200:5060;branch=z9hG4bK046783c0;rport
From: “asterisk” sip:asterisk@192.168.43.200;tag=as0bf9edd5
To: <sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;cpd= on>
Contact: sip:asterisk@192.168.43.200
Call-ID: 105bccd06a1322df088f00d41fb477b7@192.168.43.200
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Sun, 20 Apr 2014 15:47:59 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 0


[Apr 20 16:48:02] Retransmitting #3 (NAT) to 192.168.43.235:43901:
OPTIONS sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;c pd=on SIP/2.0
Via: SIP/2.0/UDP 192.168.43.200:5060;branch=z9hG4bK046783c0;rport
From: “asterisk” sip:asterisk@192.168.43.200;tag=as0bf9edd5
To: <sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;cpd= on>
Contact: sip:asterisk@192.168.43.200
Call-ID: 105bccd06a1322df088f00d41fb477b7@192.168.43.200
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Sun, 20 Apr 2014 15:47:59 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 0


[Apr 20 16:48:03] Retransmitting #4 (NAT) to 192.168.43.235:43901:
OPTIONS sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;c pd=on SIP/2.0
Via: SIP/2.0/UDP 192.168.43.200:5060;branch=z9hG4bK046783c0;rport
From: “asterisk” sip:asterisk@192.168.43.200;tag=as0bf9edd5
To: <sip:8001@192.168.43.235:43901;rinstance=afe48b15faf7e27c;transport=UDP;cpd= on>
Contact: sip:asterisk@192.168.43.200
Call-ID: 105bccd06a1322df088f00d41fb477b7@192.168.43.200
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Sun, 20 Apr 2014 15:47:59 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 0


[Apr 20 16:48:03] Really destroying SIP dialog ‘105bccd06a1322df088f00d41fb477b7 @192.168.43.200’ Method: OPTIONS
[Apr 20 16:48:04] == Parsing ‘/etc/asterisk/manager.conf’: [Apr 20 16:48:04] F ound
[Apr 20 16:48:04] == Manager ‘sendcron’ logged on from 127.0.0.1
[Apr 20 16:48:04] == Manager ‘sendcron’ logged off from 127.0.0.1
[Apr 20 16:48:04] == Parsing ‘/etc/asterisk/manager.conf’: [Apr 20 16:48:04] F ound
[Apr 20 16:48:04] == Manager ‘sendcron’ logged on from 127.0.0.1[/code]

I tried core set verbose 5 and core set debug 5 but nothing appeared on the terminal

I used nat=yes in sip-vicidial.conf.

This is “DIY” server just for testing so asterisk version does not matter(?).

You are not configured for NAT. nat= is more about working around problems with remote NAT, and I assume that sipgate will not need it.

Look in the sample configuration file, but typically you will need to specify your public host name or public IP address, and you may need to specify a STUN server.

Again, I would repeat, you should not be doing new installations with Asterisk 1.4. If someone tells you you need to use it, please get your support from them.

thanks for your reply, but my problem is due to the nat. Unfortunately I’m using a 3g connection, so I do not have access to the firewall only my mobile provider can do it, and they are not able to do as i’m not business customer.

It is quite likely that the 3g operator blocks SIP traffic because it competes with their phone call revenue.

To see debug level output, you need to look at the log files, rather than the console.

However your basic problem is the 192.x.x.x address in the following:

Contact: sip:asterisk@192.168.43.200

which indicates that you have not configured for NAT. nat= does not do that. See sip.conf.sample for the actual options that allow Asterisk to work out its public address. (nat= is mainly to work round cases where the other side failed to account for being behind NAT.)

Hi David,

Do you know where are they located ?

[quote]which indicates that you have not configured for NAT. nat= does not do that. See sip.conf.sample for the actual options that allow Asterisk to work out its public address. (nat= is mainly to work round cases where the other side failed to account for being behind NAT.)
[/quote]

I added in my dialplan externip = My public IP and localnet=192.168.43.200/255.255.0.0.

So I do not know what can I do to configure Nat.

Yes. Any Asterisk user should know that.

Your trace is not consistent with your use of externip. If that is out of date and the Contact header has now changed, I’d assume you simply don’t have permission to use SIP over your mobile phone. If the Contact header hasn’t changed, you probably have externip in the wrong place.

I’am a new user

No, im able to use sip on my mobile phone, because I have no problem when I use Zoiper on my phone. That’s why I do not understand.

google.co.uk/search?q=asterisk+logs

Check the Contact header.

With mobile providers they usually block traffic coming in from the internet. So incoming calls will most probably be a problem. It also is very likely that the mobile provider blocks SIP.

About setting NAT on Asterisk, try using externip= and localnet= parameters.