[asterisk-bugs] [Asterisk 0011626]: iax2 show peers are showing duplicate lines

noreply at bugs.digium.com noreply at bugs.digium.com
Sat Dec 22 16:02:29 CST 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11626 
====================================================================== 
Reported By:                pnlarsson
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   11626
Category:                   Channels/chan_iax2
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 94541 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             12-22-2007 15:32 CST
Last Modified:              12-22-2007 16:02 CST
====================================================================== 
Summary:                    iax2 show peers are showing duplicate lines
Description: 
After every iax2 reload, an duplicate row is printed with iax2 show peers.

How to reproduce:

iax.conf:
; do not edit this file, this is an auto-generated file by freepbx
; all modifications must be done from the web gui

[general]

; These will all be included in the [general] context
#include iax_general_additional.conf
#include iax_general_custom.conf
#include iax_registrations_custom.conf
#include iax_registrations.conf

; These should all be expected to come after the [general] context
;
#include iax_custom.conf
#include iax_additional.conf
#include iax_custom_post.conf

The file iax_additional.conf contains all peers and users. And if
iax_custom_post.conf contains any users / peers or is empty then after
every iax2 reload you will get another duplicate row.
====================================================================== 

---------------------------------------------------------------------- 
 mvanbaak - 12-22-07 16:02  
---------------------------------------------------------------------- 
tested it with only 1 include in my iax.conf and got the same.

iax.conf:
[general]
delayreject=yes
disallow=all
allow=ulaw
allow=alaw
allow=gsm
jitterbuffer=no
forcejitterbuffer=no
autokill=yes

register => my_username:my_secret at iax1.provider
register => my_username:[switch.vanbaak.info]@switch01.provider
register => my_username:[switch.vanbaak.info]@switch02.provider


[guest]
type=user
context=default

[vanbaak]
type=user
auth=rsa
inkeys=switch.provider
context=from-provider

#include iax_peers.conf

; vim: set ts=8 sw=2 filetype=asterisk:

iax_peers.conf:
[provider01]
type=peer
username=my_username
auth=rsa
outkey=switch.vanbaak.info
host=switch01.provider
accountcode=outgoing-provider
amaflags=billing
qualify=yes

[provider02]
type=peer
username=my_username
auth=rsa
outkey=switch.vanbaak.info
host=switch02.provider
accountcode=outgoing-provider
amaflags=billing
qualify=yes

[provider03]
type=peer
username=my_username
secret=my_secret
auth=md5
host=iax1.provider
accountcode=outgoing-provider
amaflags=billing
qualify=yes

after a clean start of asterisk I get:
asterisk*CLI> iax2 show peers
Name/Username    Host           Mask             Port          Status    
provider01/vanba  x.x.x.x  (S)  255.255.255.255  4569          OK (22 ms)
provider02/vanba  x.x.x.x  (S)  255.255.255.255  4569          OK (22 ms)
provider03/vanba  x.x.x.x  (S)  255.255.255.255  4569          OK (61 ms)
3 iax2 peers [3 online, 0 offline, 0 unmonitored]
asterisk*CLI> 

Now the interesting part:
asterisk*CLI> iax2 reload
  == Parsing '/etc/asterisk/iax.conf':   == Found
  == Parsing '/etc/asterisk/iax_peers.conf':   == Found
  == Parsing '/etc/asterisk/users.conf':   == Found
[2007-12-22 23:01:07] NOTICE[1724]: chan_iax2.c:9449 iax2_poke_peer: Still
have a callno...
[2007-12-22 23:01:07] NOTICE[1724]: chan_iax2.c:9449 iax2_poke_peer: Still
have a callno...
[2007-12-22 23:01:07] NOTICE[1724]: chan_iax2.c:9449 iax2_poke_peer: Still
have a callno...
  == Loaded firmware 'iaxy.bin'
    -- Registered IAX2 to 'x.x.x.x', who sees us as y.y.y.y:64168 with no
messages waiting

    -- Registered IAX2 to 'x.x.x.x', who sees us as y.y.y.y:61419 with no
messages waiting

    -- Registered IAX2 to 'x.x.x.x', who sees us as y.y.y.y:54104 with no
messages waiting

asterisk*CLI> iax2 show peers
Name/Username    Host           Mask             Port          Status    
provider01/vanba  x.x.x.x  (S)  255.255.255.255  4569          OK (26 ms)
provider01/vanba  x.x.x.x  (S)  255.255.255.255  4569          OK (26 ms)
provider02/vanba  x.x.x.x  (S)  255.255.255.255  4569          OK (25 ms)
provider02/vanba  x.x.x.x  (S)  255.255.255.255  4569          OK (25 ms)
provider03/vanba  x.x.x.x  (S)  255.255.255.255  4569          OK (26 ms)
provider03/vanba  x.x.x.x  (S)  255.255.255.255  4569          OK (26 ms)
6 iax2 peers [6 online, 0 offline, 0 unmonitored]
asterisk*CLI> 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
12-22-07 16:02  mvanbaak       Note Added: 0075853                          
======================================================================




More information about the asterisk-bugs mailing list