Link to home
Start Free TrialLog in
Avatar of Adebayo Ojo
Adebayo OjoFlag for Nigeria

asked on

Setting up SIP trunk with Asterisk Realtime

I install Asterisk 13 on CentOS7 and everything is fine. I also configured Asterisk dynamic realtime to register my SIP users and peers. I was able to place a call from one extension to another successfully.
My challenge now is placing a call to my SIP trunk provider.
I initially stored the sip trunk provider detail in the Mysql database just like sip users and peers, but I noticed that it could not register with the SIP provider.
I then added this line in the general section of my sip.conf:
register => 1234567:abcdef@callcentric.com
After adding the above line in the sip.conf, I was able to register, but yet I could not place a call using that trunk, rather I always got the error:

_ == Using SIP RTP CoS mark 5
– Executing [0112348023950246@NaatCast-1:1] Dial(“SIP/1000-00000004”, “SIP/0112348023950246@callcentric.com”) in new stack
== Using SIP RTP CoS mark 5
– Called SIP/0112348023950246@callcentric.com
[Feb 19 14:05:16] NOTICE[7593][C-00000003]: chan_sip.c:24002 handle_response_invite: Failed to authenticate on INVITE to ‘sip:1000@10.32.0.232;tag=as0d259ea6
– SIP/callcentric.com-00000005 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Auto fallthrough, channel ‘SIP/1000-00000004’ status is ‘CONGESTION’_

Below are my configurations:

SIP.CONF
[general]
allowguest=no
udpbindaddr=0.0.0.0:5060
disallowed_methods = UPDATE
srvlookup=yes
dtmfmode = rfc2833
register => 1234567:abcdef@callcentric.com
rtcachefriends=yes

EXTENSIONS.CONF
[NaatCast-1]
exten => _X.,1,Dial(SIP/${EXTEN})
exten => _011234.,1,Dial(SIP/${EXTEN}@callcentric.com)

MYSQL DB:
MariaDB [asterisk]> select * from SIP;
±—±------------±-----------±---------±------------±----------------±------±-----------±---------------------±--------±-----±-------±--------±----------±---------±------------±-------±------------±-----------±----------------±------------±------±-------------------±-------------±---------+
| id | NAME | context | dtmfmode | fromuser | host | port | ipaddr | nat | mailbox | deny | permit | qualify | secret | callerid | directmedia | type | defaultuser | regseconds | fromdomain | insecure | allow | disallowed_methods | videosupport | disallow |
±—±------------±-----------±---------±------------±----------------±------±-----------±---------------------±--------±-----±-------±--------±----------±---------±------------±-------±------------±-----------±----------------±------------±------±-------------------±-------------±---------+
| 1 | 1000 | NaatCast-1 | rfc2833 | NULL | dynamic | 5060 | 10.32.0.15 | force_rport, comedia | NULL | NULL | NULL | no | password0 | 1000 | yes | friend | 1000 | 1519070699 | NULL | port,invite | NULL | NULL | NULL | NULL |
| 2 | 1002 | NaatCast-1 | rfc2833 | NULL | dynamic | 49410 | 10.32.1.48 | force_rport, comedia | NULL | NULL | NULL | no | password1 | 1002 | yes | friend | 1002 | 1518771963 | NULL | NULL | NULL | NULL | NULL | NULL |
| 3 | callcentric | NaatCast-1 | NULL | 177729xxxxx | callcentric.com | 5060 | | NULL | NULL | NULL | NULL | NULL | password2 | NULL | no | peer | 177729xxxxx | 0 | callcentric.com | port,invite | ulaw | UPDATE | no | all |
±—±------------±-----------±---------±------------±----------------±------±-----------±---------------------±--------±-----±-------±--------±----------±---------±------------±-------±------------±-----------±----------------±------------±------±-------------------±-------------±---------+

The two extensions 1000 and 1002 are able to call each other.

My concerns now are these:

Why am I getting the error shown in my log above whenever I try placing calls via the trunk?
Do I still need to populate the DB with SIP trunk details after having the sip register configuration in the sip.conf?
What is the best way to configure SIP trunk while implementing Asterisk ARA?
Avatar of arnold
arnold
Flag of United States of America image

make sure you create rules on the firewall.router disabling ALG
Add rules to prioritize QoS for VOIP, SIP, h.323..

Extensions are internal and do not need to and hit the SIP provider.
do you allow SIP 5062 check with the trunk provider on their QoS and router settings recomendation.

What is the router that you use to connect your environment to the Internet.
Avatar of Adebayo Ojo

ASKER

@arnold, I don't think the issue is related to firewall. I used the sip provider detail directly on a softphone and I was able to register and make call. Both the softphone and the extensions were on same network LAN. If firewall is the issue, then the softphone shouldn't have worked too.
can not say for certain but the functionality of the phone versus the PBX might be different and functions differently.


Its like one person reports they are having issues entering a destination when driving a bus, while another says, no problem here when driving a passenger car.

how many sessions does your SIP trunk allocate to your PBX?
IT seems the error suggests congestion, exceeding the allotted amount?

check network WAN saturation as a cause. Presumably while you are setting this thing up, you have existing users using softphones?
VLAN in the environment?
how many simulteneous connection are you configuring on the asterisk to  be able to handle at the same time?

Check whether you sip.conf and the bindport are not the typo that is causing your issues. try binding on port 5061 versus 5060.
 See https://www.callcentric.com/support/device/asterisk

did you define the sip peer ?
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.