Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

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


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
murthy64 at hotmail.com
Guest





PostPosted: Thu Aug 13, 2015 11:26 am    Post subject: [asterisk-users] Is peer order in sip.conf important? Reply with quote

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
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
dcunningham at voisoni...
Guest





PostPosted: Mon Aug 17, 2015 10:34 pm    Post subject: [asterisk-users] Is peer order in sip.conf important? Reply with quote

Hi Murthy,

You probably want [69.59.234.67] first so that it matches on inbound calls. For outbound the question is what exactly do you specify in your dial? It should be something like number@vonage-out.



On 14 August 2015 at 02:25, Murthy Gandikota <murthy64@hotmail.com (murthy64@hotmail.com)> wrote:
Quote:
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=[url=tel:16194077214]16194077214[/url]
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
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



--
David Cunningham, Voisonics
http://voisonics.com/
USA: +1 213 221 1092
UK: +44 (0) 20 3298 1642
Australia: +61 (0) 2 8063 9019
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services