0
votes

I am unable to make SIP calls to a Realtime SIP peer,but i am able to receive calls from them.I have made some test users using the sip.conf file,the calling operations work fine when i use them.But when i call a realtime sip peer the server disconnects by itself.

My sip peer is as follows:

id 7006
name edwin
canreinvite yes
context internal
host dynamic
nat force_rport
port 63806
qualify no
secret 123
type friend
disallow all
allow g729
allow ilbc
allow gsm
allow ulaw
allow alaw
regseconds 1577676814
ipaddr 192.168.123.122
cancallforward yes
avpf yes
allowguest no
allowoverlap no
srvlookup yes
localnet 192.168.1.0/255.255.255.0
bindport 5060
bindaddr 0.0.0.0
soft_skill 32
rtcachefriends yes
alwaysauthreject yes
session-timers refuse

When i call this user from the user i made in my sip.conf file(shown below) the server disconnects automatically:

[general]
context=internal
allowguest=no
allowoverlap=no
srvlookup=yes
bindport=5060
bindaddr=0.0.0.0
allow=ulaw
alwaysauthreject=yes
canreinvite=no
nat=force_rport
session-timers=refuse
localnet=192.168.1.0/255.255.255.0

[7001]
type=friend
host=dynamic
secret=123
qualify=yes
context=internal


[7002]
type=friend
host=dynamic
secret=456
qualify=yes
context=internal


[7003]
type=friend
host=dynamic
secret=789
qualify=yes
context=internal

I have enabled logging and the output is as follows:

console dial edwin@internal [Dec 30 03:40:46] WARNING[18968]: chan_oss.c:498 setformat: Unable to re-open DSP device /dev/dsp: No such file or directory [Dec 30 03:40:46] NOTICE[18968]: console_video.c:136 console_video_start: voice only, console video support not present pranav*CLI> Disconnected from Asterisk server Asterisk cleanly ending (0). Executing last minute cleanups

My Extensions table in my psql table is:

"2";"internal";"edwin";2;"Dial";"SIP/edwin,60"
"1";"internal";"edwin";1;"Answer";" "
"3";"internal";"edwin";3;"Playback";"vm-nobodyavail"
"4";"internal";"edwin";4;"Hangup";" "

So,how do i fix this so that i can receive calls using the user 'edwin'?

1
Can you confirm if db is connected? and Asterisk can read peers? try to execute sip show peer edwinNasir Iqbal
@NasirIqbal yah it is connected.the above details of the peer are obtained by executing 'sip show'.pranav harish

1 Answers

0
votes

First of all, probably you are running a VM or said machine does not have a sound card, So it is not appropriate to use the console dial command. Instead dial from a softphone or use originate command like

originate SIP/edwin application wait 11

If it does not solve your problem then there are multiple things which can make a user unreachable.

  1. Ping both machines from each other to check if network is reachable
  2. Make sure that can register option is enabled in client/softphone
  3. Also test that asterisk can write to peer table. these entries should be changed on every new registration attempt (try from different hosts)
port 63806
ipaddr 192.168.123.122
regseconds 1577676814
  1. Set qualify=yes to keep the registration/connection alive