[asterisk-users] Is peer order in sip.conf important?

Murthy Gandikota murthy64 at hotmail.com
Thu Aug 13 11:25:54 CDT 2015


Hi All

Noticed in sip.conf that the asterisk (v11) is sensitive to the order of peers. 
Here  is my sip.conf

[general]
context = demo  ;              Default context for incoming calls
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
context=incoming 
disallow=all 
allow=ulaw 
allow=alaw 
allow=g729 
allow=g723 
externip=72.220.28.226 
localnet=192.168.0.0 
nat=yes 
maxexpiry=15
minexpiry=14
 
register =>16194077214:<<password>@69.59.234.67:5060

[vonage-out]
username=16194077214
type=friend
secret=<<password>>
port=5061
nat=yes
host=69.59.234.67
fromuser=1619xxxxxxx
fromdomain=69.59.234.67
dtmfmode=rfc2833
auth=md5

[69.59.234.67]
username=1619xxxxxxx
;type=friend
type=peer
;type=user
secret=<<password>>
port=5061
nat=yes
insecure=port,invite
host=69.59.234.67
fromuser=1619xxxxxxx
fromdomain=69.59.234.67
;dtmfmode=inband
context=from-pstn
canreinvite=no
;auth=md5
disallow=all
allow=ulaw 
;allow=alaw 
;allow=g729 
;allow=g723 

 When I make the INBOUD call, vonage-out peer is selected based on the debug.  In other words if my sip.conf is as follows

[general]
....
[vonage-out]
....
[69.59.234.67]
...
Then the peer Asterisk selects is vonage-out. I want vonage-out to be  used for OUTBOUND as the name implies.

However if I switch them, as follows:

[general]
...
[69.59.234.67]
...
[vonage-out]
.....

Then the peer 69.59.234.67 is selected which is what I want for an INBOUND.

Any idea why?

Your kind help is appreciated.

Best regards
murthy 		 	   		  


More information about the asterisk-users mailing list