4

I want to register my asterisk server to a SIP trunk. I have added following piece of code in my sip.conf and extensions.conf

sip.conf

[general]
register => myusername:mypassword@sip.flowroute.com
allow=ulaw

[flowroute]                     ; keep this lowercase, do not change format
type=friend
secret=mypassword
username=myusername
host=sip.flowroute.com
dtmfmode=rfc2833
context=inbound            
canreinvite=no
allow=ulaw                   
insecure=port,invite
fromdomain=sip.flowroute.com

extensions.conf

[outgoing]
exten=> _03.,1,Dial(SIP/${EXTEN}@flowroute,30)

when i do 'sip show peers' in asterisk, it shows

CLI> sip show peers
Name/username             Host                                    Dyn Forcerport ACL Port     Status      Description 

flowroute/84106639        216.115.69.144                               a             5060     Unmonitored  

goip/goip                 192.168.10.6                             D   a             5060     OK (6 ms)                        

When I visit the my sip provider's management console it doesn't show any registration with asterisk. Please guide in this regard

Thanks

bluewhale
  • 41
  • 1
  • 2
  • 3

4 Answers4

5

The config looks fine at first sight. Go on and try to debug your setup:

  1. use "sip show registry" inside of asterisk to display the ougoing registrations
  2. enable sip debugging: "sip set debug on" (shows the sip traffic within asterisk cli)
  3. force a register attempt: "sip reload" and monitor the cli for appearing sip messages

If step 2 only shows outgoing but not incoming packets, you might have a firewall issue.

  • sip show registry –  Mar 21 '17 at 10:47
  • sip show registry shows 0 sip registration and debug logs displays no logs showing any connection established (outgoing/incoming) with sip trunk. Sip messages exchanged with goip are visible but no logs with sip trunk. Do I need to add some more configs in sip trunk ? –  Mar 21 '17 at 10:57
  • I think i spotted a problem in your sip.conf: please change username= to defaultuser=. See https://github.com/asterisk/asterisk/blob/master/configs/samples/sip.conf.sample for a reference –  Mar 21 '17 at 11:34
3

First, the register line should have a path set at the end, like:

register => myusername:mypassword:myusername@sip.flowroute.com/84106639

Then do a sip reload or service asterisk restart. After that, the sip show peers command should return some kind of status. The qualify=yes option is useful too to check IP connectivity and SIP service status.

Also, your [outgoing] rule in the dialplan should be:

exten=> _03.,1,Dial(SIP/flowroute/${EXTEN},30)
viktike
  • 141
  • 1
3

You are missing two items to be placed directly under your register => entry.

[general]
register => myusername:mypassword@sip.flowroute.com
registertimeout=20
registerattempts=0

As soon as you enter these in sip.conf, at the asterisk console enter:
*CLI> sip reload
*CLI> sip show registry

alta3
  • 31
  • 1
2

i) use qualify=yes in sip.conf then sip reload and run command sip show peers and check status is ok or not of your flowroute.

ii) Also stop firewall service and check status.

  • 1) sip show registry shows successful registration however sip show peers show unmonitored status. Also the registration timed out error appearing frequently. What does this mean? – bluewhale Mar 27 '17 at 10:11
  • correction: sip show registry shows that registration request has been sent but not getting a response back. What could be the possible cause for this? – bluewhale Mar 27 '17 at 10:32