Murthy Gandikota
2015-Aug-13 16:25 UTC
[asterisk-users] Is peer order in sip.conf important?
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
David Cunningham
2015-Aug-18 03:32 UTC
[asterisk-users] Is peer order in sip.conf important?
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 at vonage-out. On 14 August 2015 at 02:25, Murthy Gandikota <murthy64 at hotmail.com> wrote:> 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 >-- David Cunningham, Voisonics http://voisonics.com/ USA: +1 213 221 1092 UK: +44 (0) 20 3298 1642 Australia: +61 (0) 2 8063 9019 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150818/380e0894/attachment.html>