[asterisk-bugs] [Asterisk 0013634]: Asterisk fills "via" header not correctly.

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Dec 15 22:57:33 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13634 
====================================================================== 
Reported By:                performer
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13634
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.0 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-10-07 00:42 CDT
Last Modified:              2008-12-15 22:57 CST
====================================================================== 
Summary:                    Asterisk fills "via" header not correctly.
Description: 
Some provider couldn't send responses to Asterisk because information in
"via" header has port "0".

My solution:
diff chan_sip.c.bak chan_sip.c
2628c2628
<                       ntohs(p->ourip.sin_port), p->branch, rport);
---
>                       ntohs(p->socket.port), p->branch, rport);

====================================================================== 

---------------------------------------------------------------------- 
 (0096432) performer (reporter) - 2008-12-15 22:57
 http://bugs.digium.com/view.php?id=13634#c96432 
---------------------------------------------------------------------- 
[general]
context=incoming
realm=mydomain.ru
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
domain=mydomain.ru

register => AAAA:AAAA at sipnet.ru:5060/1234567
register => BBBB:BBBB at sip.asterisk.somedomain1.com:55060
register => CCCC:CCCC at sip.asterisk.somedomain1.com:55060
register => DDDD:DDDD at proxy01.sipphone.com:5060
register => EEEE:EEEE at sip.voiparound.com:5060
register => FFFF:FFFF at somedomain2.dynalias.com:5060

externhost=sip.mydomain.ru
localnet=192.168.4.0/255.255.255.0
localnet=192.168.5.0/255.255.255.0

nat=route

canreinvite=no

domain=mydomain.ru,internal
domain=192.168.4.7
fromdomain=mydomain.ru

[authentication]

auth = FFFF:FFFF at FFFF ; somedomain2 realm

[BBBB]
type=friend
context=incoming1
username=BBBB
secret=BBBB
fromuser=BBBB
host=sip.asterisk.somedomain1.com
insecure=port,invite
outboundproxy=sip.asterisk.somedomain1.com
port=55060
nat=route
language=ru
disallow=all
allow=alaw

[CCCC]
type=friend
context=incoming1
username=CCCC
secret=CCCC
fromuser=CCCC
host=sip.asterisk.somedomain1.com
insecure=port,invite
outboundproxy=sip.asterisk.somedomain1.com
port=55060
nat=route
language=ru
disallow=all
allow=alaw

[sipnet]
type=friend
username=AAAA
secret=AAAA
fromuser=AAAA
fromdomain=sipnet.ru
host=sipnet.ru
port=5060
outboundproxy=sipnet.ru
canreinvite=no
nat=route
insecure=port,invite
disallow=all
allow=alaw
allow=ulaw
allow=g723
allow=g729
;allow=gsm
context=incoming1
qualify=yes

[sipphone]
type=friend
username=DDDD
secret=DDDD
host=proxy01.sipphone.com
port=5060
outboundproxy=proxy01.sipphone.com
canreinvite=no
insecure=port,invite
disallow=all
allow=ulaw
allow=ilbc
allow=gsm
context=incoming1

[FFFF]
type=friend
username=FFFF
secret=FFFF
fromdomain=somedomain2.dynalias.com
host=somedomain2.dynalias.com
port=5060
outboundproxy=somedomain2.dynalias.com
canreinvite=no
nat=route
insecure=port,invite
context=incoming3
disallow=all
allow=alaw
allow=gsm

[freecall]
type=friend
username=EEEE
secret=EEEE
host=sip.voiparound.com
port=5060
outboundproxy=sip.voiparound.com
canreinvite=no
insecure=port,invite
disallow=all
allow=ulaw
allow=ilbc
allow=gsm
context=incoming1

[3000]
username=3000
type=friend
secret=123
host=dynamic
context=extended
insecure=port,invite

[3001]
username=3001
type=friend
secret=123
host=dynamic
context=extended
insecure=port,invite
language=ru
mailbox=3001

[3002]
callgroup=2
username=3002
type=friend
secret=123
host=dynamic
context=extended
insecure=port,invite
reinvite=no
disallow=all
allow=alaw
allow=ilbc
allow=gsm
language=ru
mailbox=3002

[3003]
username=3003
type=friend
secret=123
host=dynamic
context=extended
insecure=port,invite
reinvite=no
language=ru
mailbox=3003

[3004]
username=3004
type=friend
secret=123
host=dynamic
context=extended
insecure=port,invite
language=ru
mailbox=3004

[3005]
username=3005
type=friend
secret=123
host=dynamic
context=extended
insecure=port,invite
language=ru
mailbox=3004

[3007]
username=3007
type=friend
secret=123
host=dynamic
context=extended
insecure=port,invite
language=ru

[3008]
username=3008
type=friend
secret=123
host=dynamic
context=extended
insecure=port,invite
reinvite=no
disallow=all
allow=alaw
allow=ilbc
allow=gsm
language=ru
nat=yes
mailbox=3008
quality=yes

[3009]
username=3009
type=friend
secret=123
context=extended
mailbox=3402
language=ru
host=dynamic
context=extended
insecure=port,invite
reinvite=no
disallow=all
allow=g729
allow=ilbc
allow=gsm
language=ru
nat=yes
mailbox=3009

[3011]
username=3011
type=friend
secret=123
host=dynamic
context=extended
insecure=port,invite
language=ru

[3012]
username=3012
type=friend
secret=123
host=dynamic
context=extended
insecure=port,invite
language=ru

[3013]
username=3013
type=friend
secret=123
host=dynamic
context=extended
insecure=port,invite
language=ru

[3014]
username=3014
type=friend
secret=123
host=dynamic
context=extended
insecure=port,invite
language=ru 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-12-15 22:57 performer      Note Added: 0096432                          
======================================================================




More information about the asterisk-bugs mailing list