Cannot make inbound call

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Cannot make inbound call

Postby elsayed.mohamed » Sat Feb 20, 2021 3:50 pm

Hello everyone,
I am new to this forum and to VICIdial as well. I installed a vicidial server in my home network. I got a lot working. I can dial extension-to-extension and I can dial outbound calls too. However, I am not able to make inbound calls. the famous "sip/2.0 401-unauthorized" error. I changed several parameters in sip.conf, extensions.conf, the web interface, and my sip trunking configuration but no luck. I really appreciate your help.

Here is some information about my system. I can post/email any information if needed. Thanks.

Asterisk 13.34.0-vici currently running
****************************************************************************************************************************************
[CloudVision]
disallow=all
allow=ulaw
allow=alaw
allow=gsm
allow=g729
type=friend
username=xxxxxxxxxx
secret=yyyyyyyy
host=w.x.y.z
dtmfmode=rfc2833
context=trunkinbound
****************************************************************************************************************************************
exten => _XXXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _XXXXXXXXXX,2,Dial(SIP/CloudVision/${EXTEN},,tTo)
exten => _XXXXXXXXXX,4,Hangup()
****************************************************************************************************************************************
[general]
context=trunkinbound ; Default context for incoming calls
allowguest=no ; Allow or reject guest calls (default is yes)
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
;allowtransfer=no ; Disable all transfers (unless enabled in peers or users)
;realm=mydomain.tld ; Realm for digest authentication
bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
;domain=mydomain.tld ; Set default domain for this host
;pedantic=yes ; Enable checking of tags in headers,
;tos_sip=cs3 ; Sets TOS for SIP packets.
;tos_audio=ef ; Sets TOS for RTP audio packets.
;tos_video=af41 ; Sets TOS for RTP video packets.
;maxexpiry=3600 ; Maximum allowed time of incoming registrations
;minexpiry=60 ; Minimum length of registrations/subscriptions (default 60)
;defaultexpiry=120 ; Default length of incoming/outgoing registration
;t1min=100 ; Minimum roundtrip time for messages to monitored hosts
;notifymimetype=text/plain ; Allow overriding of mime type in MWI NOTIFY
;checkmwi=10 ; Default time between mailbox checks for peers
;buggymwi=no ; Cisco SIP firmware doesn't support the MWI RFC
;vmexten=voicemail ; dialplan extension to reach mailbox sets the
disallow=all ; First disallow all codecs
allow=ulaw ; Allow codecs in order of preference
allow=gsm
mohinterpret=default
mohsuggest=default
language=en ; Default language setting for all users/peers
relaxdtmf=yes ; Relax dtmf handling
trustrpid = no ; If Remote-Party-ID should be trusted
sendrpid = yes ; If Remote-Party-ID should be sent
progressinband=no ; If we should generate in-band ringing always
;useragent=Asterisk PBX ; Allows you to change the user agent string
;promiscredir = no ; If yes, allows 302 or REDIR to non-local SIP address
;usereqphone = no ; If yes, ";user=phone" is added to uri that contains
dtmfmode = rfc2833 ; Set default dtmfmode for sending DTMF. Default: rfc2833
;compactheaders = yes ; send compact sip headers.
videosupport=no ; Turn on support for SIP video. You need to turn this on
;maxcallbitrate=384 ; Maximum bitrate for video calls (default 384 kb/s)
callevents=yes ; generate manager events when sip ua
;alwaysauthreject = yes ; When an incoming INVITE or REGISTER is to be rejected,
;g726nonstandard = yes ; If the peer negotiates G726-32 audio, use AAL2 packing
;matchexterniplocally = yes ; Only substitute the externip or externhost setting if it matches
;regcontext=sipregistrations
rtptimeout=60 ; Terminate call if 60 seconds of no RTP or RTCP activity
;rtpholdtimeout=300 ; Terminate call if 300 seconds of no RTP or RTCP activity
;rtpkeepalive=<secs> ; Send keepalives in the RTP stream to keep NAT open
;sipdebug = yes ; Turn on SIP debugging by default, from
;recordhistory=yes ; Record SIP history by default
;dumphistory=yes ; Dump SIP history at end of SIP dialogue
;allowsubscribe=no ; Disable support for subscriptions. (Default is yes)
;subscribecontext = default ; Set a specific context for SUBSCRIBE requests
notifyringing = yes ; Notify subscriptions on RINGING state (default: no)
notifyhold = yes ; Notify subscriptions on HOLD state (default: no)
limitonpeers = yes ; Apply call limits on peers only. This will improve
;t38pt_udptl = yes ; Default false
;register => 1234:password@mysipprovider.com
;registertimeout=20 ; retry registration calls every 20 seconds (default)
;registerattempts=10 ; Number of registration attempts before we give up
externip = 96.56.237.2 ; Address that we're going to put in outbound SIP
;externhost=test.test.com ; Alternatively you can specify a domain
;externrefresh=10 ; How often to refresh externhost if
localnet=192.168.0.0/255.255.0.0; All RFC 1918 addresses are local networks
localnet=10.0.0.0/255.0.0.0 ; Also RFC1918
localnet=172.16.0.0/12 ; Another RFC1918 with CIDR notation
localnet=169.254.0.0/255.255.0.0 ;Zero conf local network
nat=yes ; Global NAT settings (Affects all peers and users)
canreinvite=no ; Asterisk by default tries to redirect the
;directrtpsetup=yes ; Enable the new experimental direct RTP setup. This sets up
;rtcachefriends=yes ; Cache realtime friends by adding them to the internal list
;rtsavesysname=yes ; Save systemname in realtime database at registration
;rtupdate=yes ; Send registry updates to database using realtime? (yes|no)
;rtautoclear=yes ; Auto-Expire friends created on the fly on the same schedule
;ignoreregexpire=yes ; Enabling this setting has two functions:
;domain=mydomain.tld,mydomain-incoming
;domain=1.2.3.4 ; Add IP address as local domain
;allowexternaldomains=no ; Disable INVITE and REFER to non-local domains
;autodomain=yes ; Turn this on to have Asterisk add local host
;fromdomain=mydomain.tld ; When making outbound SIP INVITEs to
jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a
jbforce = no ; Forces the use of a jitterbuffer on the receive side of a SIP
jbmaxsize = 100 ; Max length of the jitterbuffer in milliseconds.
jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is
jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of a SIP
jblog = no ; Enables jitterbuffer frame logging. Defaults to "no".
qualify=yes ; By default, qualify all peers at 2000ms
limitonpeer = yes ; enable call limit on a per peer basis, different from limitonpeers

#include sip-vicidial.conf

; register SIP account on remote machine if using SIP trunks
; register => testSIPtrunk:test@10.10.10.16:5060
;
; setup account for SIP trunking:
; [SIPtrunk]
; disallow=all
; allow=ulaw
; allow=alaw
; type=friend
; username=testSIPtrunk
; secret=test
; host=10.10.10.16
; dtmfmode=inband
; qualify=1000
****************************************************************************************************************************************
elsayed.mohamed
 
Posts: 4
Joined: Thu Feb 11, 2021 2:20 pm

Re: Cannot make inbound call

Postby elsayed.mohamed » Mon Feb 22, 2021 9:25 pm

<--- Reliably Transmitting (NAT) to 192.92.8.30:5061 --->
[Feb 22 21:22:26] SIP/2.0 401 Unauthorized
[Feb 22 21:22:26] Via: SIP/2.0/UDP 192.92.8.30:5061;branch=z9hG4bK-ldiyjdve5a5ikhsy;received=192.92.8.30;rport=5061
[Feb 22 21:22:26] From: <sip:17322593236@192.92.8.30>;tag=2yxbv35sokrmkmmz.o
[Feb 22 21:22:26] To: <sip:16408887676@96.56.237.2>;tag=as1b5b43d7
[Feb 22 21:22:26] Call-ID: 222565344_112764632@67.231.9.166
[Feb 22 21:22:26] CSeq: 417 INVITE
[Feb 22 21:22:26] Server: Asterisk PBX 13.34.0-vici
[Feb 22 21:22:26] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
[Feb 22 21:22:26] Supported: replaces, timer
[Feb 22 21:22:26] WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="5ff0a208"
[Feb 22 21:22:26] Content-Length: 0
elsayed.mohamed
 
Posts: 4
Joined: Thu Feb 11, 2021 2:20 pm

Re: Cannot make inbound call

Postby carpenox » Thu Feb 25, 2021 5:32 pm

do you have your carrier setup to take inbound calls?
Alma Linux 9.5 | SVN Version: 3920 | DB Schema Version: 1725 | Asterisk 18.26.0 | PHP8
https://dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
DC: https://discord.gg/DVktk6smbh -:- TG: https://t.me/+wkDmkF9U4aUxOGYx
carpenox
 
Posts: 2594
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: Cannot make inbound call

Postby elsayed.mohamed » Thu Feb 25, 2021 7:26 pm

[url][/url]Hi Carpenox,
Thank you for trying to help me out.

I resolved the 401 Unauthorized message issue. Now the call goes through but I get the message "the number you have dialed is not in service" I am sure I have the number from my provider and it is configured. Below is the SIP exchange between my mobile (17322593236) and my SIP number (16408887676) I know the issue is with my [trunkinbound] section dialplan configuration in extensions.conf file. However, I am not able to configure the dialplan correctly.

exten => _XXXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _XXXXXXXXXX,2,Set(CALLERID(num)=16408887676)
exten => _XXXXXXXXXX,3,Dial(SIP/CloudVision/${EXTEN},,tTo)
exten => _XXXXXXXXXX,4,Hangup()


Below is the SIP exchange of the call from my mobile to 16408887676.



[Feb 25 18|51|54] == Using SIP RTP CoS mark 5
[Feb 25 18|51|54] > 0x7fb9440aff40 -- Strict RTP learning after remote address set to| x.y.w.z|39228
[Feb 25 18|51|54] -- Executing [0204254938@trunkinbound|1] AGI("SIP|x.y.w.z-00000054", "agi-DID_route.agi") in new stack
[Feb 25 18|51|54] -- Launched AGI Script |usr|share|asterisk|agi-bin|agi-DID_route.agi
[Feb 25 18|51|54] -- <SIP|x.y.w.z-00000054>AGI Script agi-DID_route.agi completed, returning 0
[Feb 25 18|51|54] -- Executing [9998811112@default|1] Wait("SIP|x.y.w.z-00000054", "2") in new stack
[Feb 25 18|51|56] -- Executing [9998811112@default|2] Answer("SIP|x.y.w.z-00000054", "") in new stack
[Feb 25 18|51|57] -- Executing [9998811112@default|3] Playback("SIP|x.y.w.z-00000054", "ss-noservice") in new stack
[Feb 25 18|51|57] -- <SIP|x.y.w.z-00000054> Playing 'ss-noservice.gsm' (language 'en')
[Feb 25 18|51|57] > 0x7fb9440aff40 -- Strict RTP switching to RTP target address x.y.w.z|39228 as source
[Feb 25 18|51|59] NOTICE[2578]| chan_sip.c|15842 sip_reregister| -- Re-registration for 0204254938@xyx.net
elsayed.mohamed
 
Posts: 4
Joined: Thu Feb 11, 2021 2:20 pm

Re: Cannot make inbound call

Postby carpenox » Fri Feb 26, 2021 4:04 pm

Your DID is routed to EXTEN which you have set to the "no service" sound. Change the routing to however you want the call sent to:

Image
Alma Linux 9.5 | SVN Version: 3920 | DB Schema Version: 1725 | Asterisk 18.26.0 | PHP8
https://dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
DC: https://discord.gg/DVktk6smbh -:- TG: https://t.me/+wkDmkF9U4aUxOGYx
carpenox
 
Posts: 2594
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: Cannot make inbound call

Postby elsayed.mohamed » Fri Feb 26, 2021 7:27 pm

It is already routed to extension 100. Am I missing something? I am not able to attach a screen show to show you.
elsayed.mohamed
 
Posts: 4
Joined: Thu Feb 11, 2021 2:20 pm

Re: Cannot make inbound call

Postby williamconley » Mon Apr 28, 2025 12:54 pm

it was dialing "9998811112" which means it was routed to "EXTEN" rather than "PHONE". First you have to change the route before you enter the phone value or it'll never check the phone value.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # 888-883-8488 # +44(203) 769-2294
williamconley
 
Posts: 20435
Joined: Wed Oct 31, 2007 4:17 pm
Location: Bartow, FL (In the boondocks)


Return to Support

Who is online

Users browsing this forum: No registered users and 117 guests