Asterisk Issue with outbound calls

Hello,

I am using asterisk 13 with OpenWRT. Everything was working fine, but suddenly I got following warning and outbound call stops working. Now I am getting this error very often.( so sometimes it works fine and sometimes it gives me following warning)

[Aug 18 22:22:18] WARNING[15809][C-00000000]: app_dial.c:2429 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Auto fallthrough, channel 'SIP/1003-00000000' status is 'CHANUNAVAIL'

sip.conf

register => user@XXXX.twilio.com:abcde:authuser@XXXX.twilio.com:5060

[sipphone]
host=XXXX.twilio.com
secret=abcde
defaultuser=user
fromuser=user
fromdomain=XXXX.twilio.com
insecure=port,invite
type=peer
allow=gsm,ulaw,alaw,h263,h264
dtmfmode=rfc2833
trustrpid=yes
sendrpid=yes
context=incoming-context
alwaysauthreject=yes
mailbox=1001@vmset
tos_sip=cs3
tos_audio=ef

extensions.conf

[incoming-context]
exten => s,1,NoOp(inside context)
same => n,Wait(1)
same => n,Answer()
same => n,Dial(dahdi/1,20)
same => n,VoiceMail(1001@vmset)

exten => _X.,1,NoOp(dialing-remote)
same => n,Dial(SIP/+${EXTEN}@sipphone,20,r)

Note: ‘sip show registry’ shows that it is registered.

This is a secondary error. Look for the original error which should appear further up the logg… It is often that the destination peer isn’t registered.

Hi @david551,

Thanks for your reply.

Followings are the errors, warnings and notices,(when asterisk restarts/starts):

[Aug 18 23:34:27] WARNING[18076]: loader.c:556 load_dynamic_module: Error loading module 'res_musiconhold.so': File not found
[Aug 18 23:34:28] ERROR[18076]: res_xmpp.c:763 xmpp_config_prelink: No user specified on client 'google'
[Aug 18 23:34:28] ERROR[18076]: config_options.c:521 process_category: In xmpp.conf: Pre-link callback for google failed
[Aug 18 23:34:28] ERROR[18076]: astobj2.c:129 INTERNAL_OBJ: bad magic number for object 0xa39054. Object is likely destroyed.
[Aug 18 23:34:28] ERROR[18076]: config_options.c:647 aco_process_config: Unable to load config file 'hep.conf'
[Aug 18 23:34:33] WARNING[18076]: iax2/firmware.c:234 iax_firmware_reload: Error opening firmware directory '/usr/lib/asterisk/firmware/iax': No such file or directory
[Aug 18 23:34:33] WARNING[18076]: chan_dahdi.c:4079 dahdi_open: Unable to specify channel 1: Invalid argument
[Aug 18 23:34:33] ERROR[18076]: chan_dahdi.c:12044 mkintf: Unable to open channel 1: Invalid argument
here = 0, tmp->channel = 1, channel = 1
[Aug 18 23:34:33] ERROR[18076]: chan_dahdi.c:17451 build_channels: Unable to register channel '1'
[Aug 18 23:34:33] WARNING[18076]: chan_dahdi.c:17658 process_dahdi: Channel '1' failure ignored: ignore_failed_channels.
[Aug 18 23:34:33] WARNING[18076]: chan_dahdi.c:18963 process_dahdi: Ignoring any changes to 'userbase' (on reload) at line 23.
[Aug 18 23:34:33] WARNING[18076]: chan_dahdi.c:18963 process_dahdi: Ignoring any changes to 'vmsecret' (on reload) at line 31.
[Aug 18 23:34:33] WARNING[18076]: chan_dahdi.c:18963 process_dahdi: Ignoring any changes to 'hassip' (on reload) at line 35.
[Aug 18 23:34:33] WARNING[18076]: chan_dahdi.c:18963 process_dahdi: Ignoring any changes to 'hasiax' (on reload) at line 39.
[Aug 18 23:34:33] WARNING[18076]: chan_dahdi.c:18963 process_dahdi: Ignoring any changes to 'hasmanager' (on reload) at line 47.
[Aug 18 23:34:33] ERROR[18076]: chan_motif.c:2683 custom_connection_handler: Connection 'google' configured on endpoint 'google' could not be found
[Aug 18 23:34:33] ERROR[18076]: config_options.c:733 aco_process_var: Error parsing connection=google at line 99 of 
[Aug 18 23:34:33] ERROR[18076]: config_options.c:516 process_category: In motif.conf: Processing options for google failed
[Aug 18 23:34:33] ERROR[18076]: chan_motif.c:2758 load_module: Unable to read config file motif.conf. Module loaded but not running.
SIP channel loading...
[Aug 18 23:34:33] NOTICE[18076]: chan_sip.c:31286 build_peer: The 'username' field for sip peers has been deprecated in favor of the term 'defaultuser'
[Aug 18 23:34:34] NOTICE[18076]: confbridge/conf_config_parser.c:2076 verify_default_profiles: Adding default_menu menu to app_confbridge
[Aug 18 23:34:34] NOTICE[18858]: chan_sip.c:24403 handle_response_peerpoke: Peer '1004' is now Reachable. (47ms / 5000ms)
[Aug 18 23:34:34] NOTICE[18858]: chan_sip.c:24403 handle_response_peerpoke: Peer '1005' is now Reachable. (23ms / 5000ms)
[Aug 18 23:34:34] NOTICE[18858]: chan_sip.c:24403 handle_response_peerpoke: Peer '1006' is now Reachable. (10ms / 5000ms)
[Aug 18 23:34:34] NOTICE[18858]: chan_sip.c:24403 handle_response_peerpoke: Peer '1007' is now Reachable. (3ms / 5000ms)
[Aug 18 23:34:34] NOTICE[18858]: chan_sip.c:24403 handle_response_peerpoke: Peer '1001' is now Reachable. (5ms / 5000ms)
[Aug 18 23:34:34] NOTICE[18858]: chan_sip.c:24403 handle_response_peerpoke: Peer '1003' is now Reachable. (440ms / 5000ms)
[Aug 18 23:34:34] NOTICE[18858]: chan_sip.c:24403 handle_response_peerpoke: Peer '1008' is now Reachable. (433ms / 5000ms)
[Aug 18 23:34:35] NOTICE[18858]: chan_sip.c:24403 handle_response_peerpoke: Peer '1111' is now Reachable. (258ms / 5000ms)
[Aug 18 23:34:35] WARNING[18858]: chan_sip.c:24263 handle_response_register: Got 423 Interval too brief for service user11@f2020.sip.us1.twilio.com, minimum is 600 seconds
[Aug 18 23:34:44] NOTICE[18858]: chan_sip.c:29921 sip_poke_noanswer: Peer '1002' is now UNREACHABLE!  Last qualify: 0
[Aug 18 23:34:44] NOTICE[18858]: chan_sip.c:29921 sip_poke_noanswer: Peer 'sipphone' is now UNREACHABLE!  Last qualify: 0
[Aug 18 23:35:01] ERROR[18076]: codec_dahdi.c:820 find_transcoders: Failed to open /dev/dahdi/transcode: No such file or directory
[Aug 18 23:35:01] WARNING[18076]: app_voicemail.c:13591 actual_load_config: maxsilence should be less than minsecs or you may get empty messages

Note: I also have some local extensions(1001 to 1008 + extension mentioned in the question) and they are working fine. Therefore, I have not mentioned them in the question’s sip.conf.

Looks like something is wrong with your dahdi install.

How can I resolve this?

Should I rebuild OpenWRT image with Asterisk 13(the same asterisk I have)?
or
Should I download asterisk again and then rebuild?

I don’t know anything about OpenWRT sorry.

Can you re-run the make-install for dahdi? and make sure the dahdi service is running and detecting your card(s)?

OpenWRT is a small distro for home routers isn’t? Do you have dahdi cards on that router?

Anyway your error seems more related with your trunk which is not responding

Sip show registry is for incoming calls, show us the “sip show peers” output. And the complete call attempt with the sip debug enabled.

The primary error for a CHANUNVAIL dial status should appear after DIal, but before the errors you originally reported. Often it includes a code number of 20, which is basically unregistered, or possibly a failed qualify.

OpenWRT is not going to be able to make sensible use of DAHDI, as the dahdi_dummy functions are now better performed in user space.

Thanks for your reply.

I rebuilt the OpenWRT and It started working. However, after some time, it started happening again and now it is giving me same issue.

I am also using the same OpenWRT image on the different device(with different credential and had the problem only once – but it is working fine since then).

Also, in the following output, it is showing “sipphone/user4” Unreachable, 1/2 hour ago it was reachable but was having the same issue.

–> Output of the “sip show peers”

iobot-009c*CLI> sip show peers
Name/username             Host                                    Dyn Forcerport Comedia    ACL Port     Status      Description                      
1001/1001                 192.168.141.144                          D  Auto (No)  No             5060     OK (168 ms)                                  
1002/1002                 192.168.141.112                          D  Auto (No)  No             5060     OK (1022 ms)                                  
1111/1111                 192.168.141.250                          D  Auto (No)  No             5060     OK (33 ms)                                   
sipphone/user4            54.172.60.1                                 Auto (No)  No             5060     UNREACHABLE                                  
4 sip peers [Monitored: 3 online, 1 offline Unmonitored: 0 online, 0 offline]

–> Following is the complete log of call attempt with “sip set debug on”

iobot-009c*CLI> 

<--- SIP read from UDP:192.168.141.112:5060 --->
INVITE sip:15622775051@192.168.3.150 SIP/2.0
Via: SIP/2.0/UDP 192.168.141.112:5060;branch=z9hG4bK1021617921;rport
From: "abc" <sip:1002@192.168.3.150>;tag=1294536902
To: <sip:15622775051@192.168.3.150>
Call-ID: 1596175498-5060-50@BJC.BGI.BEB.BBC
CSeq: 490 INVITE
Contact: "abc" <sip:1002@192.168.141.112:5060>
Max-Forwards: 70
User-Agent: Grandstream GXV3240 1.0.3.137
Privacy: none
P-Preferred-Identity: "abc" <sip:1002@192.168.3.150>
P-Emergency-Info: IEEE-EUI-48;eui-48-addr=00-0B-82-A1-4F-6D
Supported: replaces, path, timer, eventlist
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length: 301

v=0
o=1002 8000 8000 IN IP4 192.168.141.112
s=SIP Call
c=IN IP4 192.168.141.112
t=0 0
m=audio 5004 RTP/AVP 0 8 9 101
a=sendrecv
a=rtcp:5005 IN IP4 192.168.141.112
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
<------------->
--- (17 headers 14 lines) ---
Sending to 192.168.141.112:5060 (no NAT)
Sending to 192.168.141.112:5060 (no NAT)
Using INVITE request as basis request - 1596175498-5060-50@BJC.BGI.BEB.BBC
Found peer '1002' for '1002' from 192.168.141.112:5060
  == Using SIP VIDEO CoS mark 6
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 9
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found audio description format G722 for ID 9
Found audio description format telephone-event for ID 101
Capabilities: us - (ulaw|alaw|gsm|h263|h264), peer - audio=(ulaw|alaw|g722)/video=(nothing)/text=(nothing), combined - (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.141.112:5004
Peer doesn't provide video
Looking for 15622775051 in incoming-context (domain 192.168.3.150)
sip_route_dump: route/path hop: <sip:1002@192.168.141.112:5060>

<--- Transmitting (no NAT) to 192.168.141.112:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.141.112:5060;branch=z9hG4bK1021617921;received=192.168.141.112;rport=5060
From: "abc" <sip:1002@192.168.3.150>;tag=1294536902
To: <sip:15622775051@192.168.3.150>
Call-ID: 1596175498-5060-50@BJC.BGI.BEB.BBC
CSeq: 490 INVITE
Server: Asterisk PBX 13.9.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:15622775051@192.168.3.150:5060>
Content-Length: 0


<------------>
Reliably Transmitting (no NAT) to 54.172.61.5:5060:
OPTIONS sip:XXXX.twilio.com SIP/2.0
Via: SIP/2.0/UDP 192.168.3.150:5060;branch=z9hG4bK5e1e878e
Max-Forwards: 70
From: "asterisk" <sip:user4@192.168.3.150>;tag=as28dd7781
To: <sip:XXXX.twilio.com>
Contact: <sip:user4@192.168.3.150:5060>
Call-ID: 23dd495b4c04799200bf058d72407a2a@192.168.3.150:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 13.9.1
Date: Mon, 21 Aug 2017 17:10:40 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.141.112:5060 --->
INVITE sip:15622775051@192.168.3.150 SIP/2.0
Via: SIP/2.0/UDP 192.168.141.112:5060;branch=z9hG4bK1021617921;rport
From: "abc" <sip:1002@192.168.3.150>;tag=1294536902
To: <sip:15622775051@192.168.3.150>
Call-ID: 1596175498-5060-50@BJC.BGI.BEB.BBC
CSeq: 490 INVITE
Contact: "abc" <sip:1002@192.168.141.112:5060>
Max-Forwards: 70
User-Agent: Grandstream GXV3240 1.0.3.137
Privacy: none
P-Preferred-Identity: "abc" <sip:1002@192.168.3.150>
P-Emergency-Info: IEEE-EUI-48;eui-48-addr=00-0B-82-A1-4F-6D
Supported: replaces, path, timer, eventlist
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length: 301

v=0
o=1002 8000 8000 IN IP4 192.168.141.112
s=SIP Call
c=IN IP4 192.168.141.112
t=0 0
m=audio 5004 RTP/AVP 0 8 9 101
a=sendrecv
a=rtcp:5005 IN IP4 192.168.141.112
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
<------------->
--- (17 headers 14 lines) ---
Ignoring this INVITE request

<--- Transmitting (no NAT) to 192.168.141.112:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.141.112:5060;branch=z9hG4bK1021617921;received=192.168.141.112;rport=5060
From: "abc" <sip:1002@192.168.3.150>;tag=1294536902
To: <sip:15622775051@192.168.3.150>
Call-ID: 1596175498-5060-50@BJC.BGI.BEB.BBC
CSeq: 490 INVITE
Server: Asterisk PBX 13.9.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:15622775051@192.168.3.150:5060>
Content-Length: 0


<------------>

<--- SIP read from UDP:192.168.141.144:5060 --->

<------------->

<--- SIP read from UDP:192.168.141.112:5060 --->
INVITE sip:15622775051@192.168.3.150 SIP/2.0
Via: SIP/2.0/UDP 192.168.141.112:5060;branch=z9hG4bK1021617921;rport
From: "abc" <sip:1002@192.168.3.150>;tag=1294536902
To: <sip:15622775051@192.168.3.150>
Call-ID: 1596175498-5060-50@BJC.BGI.BEB.BBC
CSeq: 490 INVITE
Contact: "abc" <sip:1002@192.168.141.112:5060>
Max-Forwards: 70
User-Agent: Grandstream GXV3240 1.0.3.137
Privacy: none
P-Preferred-Identity: "abc" <sip:1002@192.168.3.150>
P-Emergency-Info: IEEE-EUI-48;eui-48-addr=00-0B-82-A1-4F-6D
Supported: replaces, path, timer, eventlist
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length: 301

v=0
o=1002 8000 8000 IN IP4 192.168.141.112
s=SIP Call
c=IN IP4 192.168.141.112
t=0 0
m=audio 5004 RTP/AVP 0 8 9 101
a=sendrecv
a=rtcp:5005 IN IP4 192.168.141.112
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
<------------->
--- (17 headers 14 lines) ---
Ignoring this INVITE request
    -- Executing [15622775051@incoming-context:1] NoOp("SIP/1002-00000001", "dialing-remote") in new stack

<--- Transmitting (no NAT) to 192.168.141.112:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.141.112:5060;branch=z9hG4bK1021617921;received=192.168.141.112;rport=5060
From: "abc" <sip:1002@192.168.3.150>;tag=1294536902
To: <sip:15622775051@192.168.3.150>
Call-ID: 1596175498-5060-50@BJC.BGI.BEB.BBC
CSeq: 490 INVITE
Server: Asterisk PBX 13.9.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:15622775051@192.168.3.150:5060>
Content-Length: 0


<------------>
    -- Executing [15622775051@incoming-context:2] Dial("SIP/1002-00000001", "SIP/+15622775051@sipphone,20,r") in new stack
[Aug 21 17:10:40] WARNING[23417][C-00000001]: app_dial.c:2429 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Auto fallthrough, channel 'SIP/1002-00000001' status is 'CHANUNAVAIL'

<--- Reliably Transmitting (no NAT) to 192.168.141.112:5060 --->
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 192.168.141.112:5060;branch=z9hG4bK1021617921;received=192.168.141.112;rport=5060
From: "abc" <sip:1002@192.168.3.150>;tag=1294536902
To: <sip:15622775051@192.168.3.150>;tag=as59105372
Call-ID: 1596175498-5060-50@BJC.BGI.BEB.BBC
CSeq: 490 INVITE
Server: Asterisk PBX 13.9.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
X-Asterisk-HangupCause: Subscriber absent
X-Asterisk-HangupCauseCode: 20
Content-Length: 0


<------------>
Really destroying SIP dialog '138ce2240dc67286791af7cf034ade3b@127.0.0.1:5060' Method: INVITE
Retransmitting #1 (no NAT) to 192.168.141.112:5060:
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 192.168.141.112:5060;branch=z9hG4bK1021617921;received=192.168.141.112;rport=5060
From: "abc" <sip:1002@192.168.3.150>;tag=1294536902
To: <sip:15622775051@192.168.3.150>;tag=as59105372
Call-ID: 1596175498-5060-50@BJC.BGI.BEB.BBC
CSeq: 490 INVITE
Server: Asterisk PBX 13.9.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
X-Asterisk-HangupCause: Subscriber absent
X-Asterisk-HangupCauseCode: 20
Content-Length: 0


---
Retransmitting #2 (no NAT) to 192.168.141.112:5060:
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 192.168.141.112:5060;branch=z9hG4bK1021617921;received=192.168.141.112;rport=5060
From: "abc" <sip:1002@192.168.3.150>;tag=1294536902
To: <sip:15622775051@192.168.3.150>;tag=as59105372
Call-ID: 1596175498-5060-50@BJC.BGI.BEB.BBC
CSeq: 490 INVITE
Server: Asterisk PBX 13.9.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
X-Asterisk-HangupCause: Subscriber absent
X-Asterisk-HangupCauseCode: 20
Content-Length: 0


---

<--- SIP read from UDP:192.168.141.112:5060 --->
ACK sip:15622775051@192.168.3.150 SIP/2.0
Via: SIP/2.0/UDP 192.168.141.112:5060;branch=z9hG4bK1021617921;rport
From: "abc" <sip:1002@192.168.3.150>;tag=1294536902
To: <sip:15622775051@192.168.3.150>;tag=as59105372
Call-ID: 1596175498-5060-50@BJC.BGI.BEB.BBC
CSeq: 490 ACK
Content-Length: 0

<------------->
--- (7 headers 0 lines) ---
Really destroying SIP dialog '1596175498-5060-50@BJC.BGI.BEB.BBC' Method: ACK
Retransmitting #1 (no NAT) to 54.172.61.5:5060:
OPTIONS sip:XXXX.twilio.com SIP/2.0
Via: SIP/2.0/UDP 192.168.3.150:5060;branch=z9hG4bK5e1e878e
Max-Forwards: 70
From: "asterisk" <sip:user4@192.168.3.150>;tag=as28dd7781
To: <sip:XXXX.twilio.com>
Contact: <sip:user4@192.168.3.150:5060>
Call-ID: 23dd495b4c04799200bf058d72407a2a@192.168.3.150:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 13.9.1
Date: Mon, 21 Aug 2017 17:10:40 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---
Retransmitting #2 (no NAT) to 54.172.61.5:5060:
OPTIONS sip:XXXX.twilio.com SIP/2.0
Via: SIP/2.0/UDP 192.168.3.150:5060;branch=z9hG4bK5e1e878e
Max-Forwards: 70
From: "asterisk" <sip:user4@192.168.3.150>;tag=as28dd7781
To: <sip:XXXX.twilio.com>
Contact: <sip:user4@192.168.3.150:5060>
Call-ID: 23dd495b4c04799200bf058d72407a2a@192.168.3.150:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 13.9.1
Date: Mon, 21 Aug 2017 17:10:40 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---
Retransmitting #3 (no NAT) to 54.172.61.5:5060:
OPTIONS sip:XXXX.twilio.com SIP/2.0
Via: SIP/2.0/UDP 192.168.3.150:5060;branch=z9hG4bK5e1e878e
Max-Forwards: 70
From: "asterisk" <sip:user4@192.168.3.150>;tag=as28dd7781
To: <sip:XXXX.twilio.com>
Contact: <sip:user4@192.168.3.150:5060>
Call-ID: 23dd495b4c04799200bf058d72407a2a@192.168.3.150:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 13.9.1
Date: Mon, 21 Aug 2017 17:10:40 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---
Retransmitting #4 (no NAT) to 54.172.61.5:5060:
OPTIONS sip:XXXX.twilio.com SIP/2.0
Via: SIP/2.0/UDP 192.168.3.150:5060;branch=z9hG4bK5e1e878e
Max-Forwards: 70
From: "asterisk" <sip:user4@192.168.3.150>;tag=as28dd7781
To: <sip:XXXX.twilio.com>
Contact: <sip:user4@192.168.3.150:5060>
Call-ID: 23dd495b4c04799200bf058d72407a2a@192.168.3.150:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 13.9.1
Date: Mon, 21 Aug 2017 17:10:40 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---
Retransmitting #5 (no NAT) to 54.172.61.5:5060:
OPTIONS sip:XXXX.twilio.com SIP/2.0
Via: SIP/2.0/UDP 192.168.3.150:5060;branch=z9hG4bK5e1e878e
Max-Forwards: 70
From: "asterisk" <sip:user4@192.168.3.150>;tag=as28dd7781
To: <sip:XXXX.twilio.com>
Contact: <sip:user4@192.168.3.150:5060>
Call-ID: 23dd495b4c04799200bf058d72407a2a@192.168.3.150:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 13.9.1
Date: Mon, 21 Aug 2017 17:10:40 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---
Really destroying SIP dialog '0ee13ba7679c7ace7d350f813c95f8a5@192.168.3.150:5060' Method: OPTIONS
Retransmitting #6 (no NAT) to 54.172.61.5:5060:
OPTIONS sip:XXXX.twilio.com SIP/2.0
Via: SIP/2.0/UDP 192.168.3.150:5060;branch=z9hG4bK5e1e878e
Max-Forwards: 70
From: "asterisk" <sip:user4@192.168.3.150>;tag=as28dd7781
To: <sip:XXXX.twilio.com>
Contact: <sip:user4@192.168.3.150:5060>
Call-ID: 23dd495b4c04799200bf058d72407a2a@192.168.3.150:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 13.9.1
Date: Mon, 21 Aug 2017 17:10:40 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---
Retransmitting #7 (no NAT) to 54.172.61.5:5060:
OPTIONS sip:XXXX.twilio.com SIP/2.0
Via: SIP/2.0/UDP 192.168.3.150:5060;branch=z9hG4bK5e1e878e
Max-Forwards: 70
From: "asterisk" <sip:user4@192.168.3.150>;tag=as28dd7781
To: <sip:XXXX.twilio.com>
Contact: <sip:user4@192.168.3.150:5060>
Call-ID: 23dd495b4c04799200bf058d72407a2a@192.168.3.150:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 13.9.1
Date: Mon, 21 Aug 2017 17:10:40 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---

is the first error logged.

The obvious cause is that the peer is not replying to the many retransmitted OPTIONs. That is sometimes because of dynamic firewall or port forwarding rules timing out on a router.

Thanks. Let me check the firewall of my router.

Is there any way I can tell my main router to allow the ports and IP address or turn off the firewall from my OpenWRT device?

His dial plan references a DAHDI channel

same => n,Dial(dahdi/1,20)

But in the incoming context right? I thought this was for an outgoing call :stuck_out_tongue: my bad.

Hmm, He only gave us the one context which is marked as incoming so I assumed it was an incoming call as he also included a register statement…

Hello again, There was not a single rule on my router. I added the port forwarding rule for the ports 5060 and 5061 to my device on my router.

Even after adding the rule, I am having the same issue.

I also tried adding “rtpkeepalive=10” in my sip.conf. I also tried to add “nat=yes” and “keepalive=45” but did not solve the issue.

Is it recommended to add “nat=yes” and “keepalive=45” in my sip.conf?

Note: I am using Ubiquity Amplifi router and ubiquity repeater.

Thanks.

Hi @johnkiniston and @navaismo ,

I named it as “incoming-context” but it works for both in-bound and out-bound calls.

In,

[incoming-context]
exten => s,1,NoOp(inside context)
same => n,Wait(1)
same => n,Answer()
same => n,Dial(dahdi/1,20)
same => n,VoiceMail(1001@vmset)

exten => _X.,1,NoOp(dialing-remote)
same => n,Dial(SIP/+${EXTEN}@sipphone,20,r)

→ Following part is used for in-bound calls

exten => s,1,NoOp(inside context)
same => n,Wait(1)
same => n,Answer()
same => n,Dial(dahdi/1,20)
same => n,VoiceMail(1001@vmset)

–>Following part is for out-bound calls

exten => _X.,1,NoOp(dialing-remote)
same => n,Dial(SIP/+${EXTEN}@sipphone,20,r)

That’s a really bad idea and exposes your PBX unnecessarily to potential Fraud.

Incoming calls should never terminate into a context that can dial out to the PSTN.