[asterisk-bugs] [JIRA] (ASTERISK-21225) Setting nat=force_rport in [general] sip.conf will never work
Alexandr Gordeev (JIRA)
noreply at issues.asterisk.org
Thu Mar 28 00:49:01 CDT 2013
[ https://issues.asterisk.org/jira/browse/ASTERISK-21225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=204674#comment-204674 ]
Alexandr Gordeev edited comment on ASTERISK-21225 at 3/28/13 12:47 AM:
-----------------------------------------------------------------------
I use Asterisk 10.7.0 and "nat=yes" (Force rport to always be on and perform comedia RTP handling).
# asterisk -rx "sip show settings"
{code}Parsing /etc/asterisk/extconfig.conf
Global Settings:
----------------
UDP Bindaddress: 0.0.0.0:5060
TCP SIP Bindaddress: Disabled
TLS SIP Bindaddress: Disabled
Videosupport: No
Textsupport: No
Ignore SDP sess. ver.: No
AutoCreate Peer: No
Match Auth Username: Yes
Allow unknown access: No
Allow subscriptions: No
Allow overlap dialing: No
Allow promisc. redir: No
Enable call counters: No
SIP domain support: No
Realm. auth: No
Our auth realm asterisk
Use domains as realms: No
Call to non-local dom.: Yes
URI user is phone no: No
Always auth rejects: Yes
Direct RTP setup: No
User Agent: Asterisk 10.7.0
SDP Session Name: Asterisk 10.7.0
SDP Owner Name: root
Reg. context: (not set)
Regexten on Qualify: No
Trust RPID: No
Send RPID: No
Legacy userfield parse: No
Caller ID: asterisk
From: Domain:
Record SIP history: Off
Call Events: Off
Auth. Failure Events: Off
T.38 support: Yes
T.38 EC mode: Redundancy
T.38 MaxDtgrm: -1
SIP realtime: Disabled
Qualify Freq : 60000 ms
Q.850 Reason header: No
Store SIP_CAUSE: No
Network QoS Settings:
---------------------------
IP ToS SIP: CS0
IP ToS RTP audio: CS0
IP ToS RTP video: CS0
IP ToS RTP text: CS0
802.1p CoS SIP: 4
802.1p CoS RTP audio: 5
802.1p CoS RTP video: 6
802.1p CoS RTP text: 5
Jitterbuffer enabled: No
Network Settings:
---------------------------
SIP address remapping: Disabled, no localnet list
Externhost: <none>
Externaddr: (null)
Externrefresh: 10
Global Signalling Settings:
---------------------------
Codecs: (gsm|ulaw|alaw|h263|testlaw)
Codec Order: none
Relax DTMF: No
RFC2833 Compensation: No
Symmetric RTP: Yes
Compact SIP headers: No
RTP Keepalive: 0 (Disabled)
RTP Timeout: 60
RTP Hold Timeout: 120
MWI NOTIFY mime type: application/simple-message-summary
DNS SRV lookup: No
Pedantic SIP support: Yes
Reg. min duration 60 secs
Reg. max duration: 3600 secs
Reg. default duration: 120 secs
Outbound reg. timeout: 20 secs
Outbound reg. attempts: 0
Notify ringing state: Yes
Include CID: No
Notify hold state: No
SIP Transfer mode: closed
Max Call Bitrate: 384 kbps
Auto-Framing: No
Outb. proxy: <not set>
Session Timers: Accept
Session Refresher: uas
Session Expires: 1800 secs
Session Min-SE: 90 secs
Timer T1: 500
Timer T1 minimum: 100
Timer B: 32000
No premature media: Yes
Max forwards: 70
Default Settings:
-----------------
Allowed transports: UDP
Outbound transport: UDP
Context: default
Force rport: Yes
DTMF: rfc2833
Qualify: 0
Use ClientCode: No
Progress inband: Never
Language: ru
MOH Interpret: default
MOH Suggest:
Voice Mail Extension: asterisk
----
Asterisk ending (0).
{code}
# asterisk -rx "sip show peer r1234_line1"
{code}
Parsing /etc/asterisk/extconfig.conf
* Name : r1234_line1
Description :
Secret : <Set>
MD5Secret : <Not set>
Remote Secret: <Not set>
Context : from-ipclients
Subscr.Cont. : <Not set>
Language : ru
AMA flags : Unknown
Transfer mode: closed
CallingPres : Presentation Allowed, Not Screened
Callgroup :
Pickupgroup :
MOH Suggest :
Mailbox :
VM Extension : asterisk
LastMsgsSent : 0/0
Call limit : 1
Max forwards : 0
Dynamic : Yes
Callerid : "" <1234567890>
MaxCallBR : 384 kbps
Expire : 3218
Insecure : no
Force rport : Yes
ACL : No
DirectMedACL : No
T.38 support : Yes
T.38 EC mode : Redundancy
T.38 MaxDtgrm: -1
DirectMedia : No
PromiscRedir : No
User=Phone : No
Video Support: No
Text Support : No
Ign SDP ver : No
Trust RPID : No
Send RPID : No
Subscriptions: No
Overlap dial : No
DTMFmode : rfc2833
Timer T1 : 500
Timer B : 32000
ToHost :
Addr->IP : 95.138.160.45:62893
Defaddr->IP : (null)
Prim.Transp. : UDP
Allowed.Trsp : UDP
Def. Username: r1234_line1
SIP Options :
Codecs : (gsm|ulaw|alaw|g729)
Codec Order : (alaw:20,ulaw:20,g729:20,gsm:20)
Auto-Framing : No
Status : OK (160 ms)
Useragent : Linksys/SPA2102-3.3.6
Reg. Contact : sip:r1234_line1 at 192.168.5.17:5060
Qualify Freq : 60000 ms
Sess-Timers : Accept
Sess-Refresh : uas
Sess-Expires : 1800 secs
Min-Sess : 90 secs
RTP Engine : asterisk
Parkinglot :
Use Reason : No
Encryption : No
Asterisk ending (0)
{code}
tcpdump
{code}09:28:20.932560 IP 95.138.160.45.62893 > 88.80.1.50.5060: SIP, length: 422
09:28:24.681426 IP 88.80.1.50.5060 > 95.138.160.45.62893: SIP, length: 945
09:28:24.924838 IP 95.138.160.45.62893 > 88.80.1.50.5060: SIP, length: 322
09:28:24.925086 IP 95.138.160.45.62893 > 88.80.1.50.5060: SIP, length: 433
09:28:27.264832 IP 95.138.160.45.62893 > 88.80.1.50.5060: SIP, length: 814
09:28:27.268305 IP 88.80.1.50.5060 > 192.168.5.17.5060: SIP, length: 442
09:28:27.389518 IP 88.80.1.50.15200 > 192.168.5.17.16400: UDP, length 32
09:28:27.410068 IP 88.80.1.50.15200 > 192.168.5.17.16400: UDP, length 32{code}
Why media traffic going to 192.168.5.17 ?
was (Author: axonaro):
I use Asterisk 10.7.0 and "nat=yes" (Force rport to always be on and perform comedia RTP handling).
# asterisk -rx "sip show settings"
{code}Parsing /etc/asterisk/extconfig.conf
Global Settings:
----------------
UDP Bindaddress: 0.0.0.0:5060
TCP SIP Bindaddress: Disabled
TLS SIP Bindaddress: Disabled
Videosupport: No
Textsupport: No
Ignore SDP sess. ver.: No
AutoCreate Peer: No
Match Auth Username: Yes
Allow unknown access: No
Allow subscriptions: No
Allow overlap dialing: No
Allow promisc. redir: No
Enable call counters: No
SIP domain support: No
Realm. auth: No
Our auth realm asterisk
Use domains as realms: No
Call to non-local dom.: Yes
URI user is phone no: No
Always auth rejects: Yes
Direct RTP setup: No
User Agent: Asterisk 10.7.0
SDP Session Name: Asterisk 10.7.0
SDP Owner Name: root
Reg. context: (not set)
Regexten on Qualify: No
Trust RPID: No
Send RPID: No
Legacy userfield parse: No
Caller ID: asterisk
From: Domain:
Record SIP history: Off
Call Events: Off
Auth. Failure Events: Off
T.38 support: Yes
T.38 EC mode: Redundancy
T.38 MaxDtgrm: -1
SIP realtime: Disabled
Qualify Freq : 60000 ms
Q.850 Reason header: No
Store SIP_CAUSE: No
Network QoS Settings:
---------------------------
IP ToS SIP: CS0
IP ToS RTP audio: CS0
IP ToS RTP video: CS0
IP ToS RTP text: CS0
802.1p CoS SIP: 4
802.1p CoS RTP audio: 5
802.1p CoS RTP video: 6
802.1p CoS RTP text: 5
Jitterbuffer enabled: No
Network Settings:
---------------------------
SIP address remapping: Disabled, no localnet list
Externhost: <none>
Externaddr: (null)
Externrefresh: 10
Global Signalling Settings:
---------------------------
Codecs: (gsm|ulaw|alaw|h263|testlaw)
Codec Order: none
Relax DTMF: No
RFC2833 Compensation: No
Symmetric RTP: Yes
Compact SIP headers: No
RTP Keepalive: 0 (Disabled)
RTP Timeout: 60
RTP Hold Timeout: 120
MWI NOTIFY mime type: application/simple-message-summary
DNS SRV lookup: No
Pedantic SIP support: Yes
Reg. min duration 60 secs
Reg. max duration: 3600 secs
Reg. default duration: 120 secs
Outbound reg. timeout: 20 secs
Outbound reg. attempts: 0
Notify ringing state: Yes
Include CID: No
Notify hold state: No
SIP Transfer mode: closed
Max Call Bitrate: 384 kbps
Auto-Framing: No
Outb. proxy: <not set>
Session Timers: Accept
Session Refresher: uas
Session Expires: 1800 secs
Session Min-SE: 90 secs
Timer T1: 500
Timer T1 minimum: 100
Timer B: 32000
No premature media: Yes
Max forwards: 70
Default Settings:
-----------------
Allowed transports: UDP
Outbound transport: UDP
Context: default
Force rport: Yes
DTMF: rfc2833
Qualify: 0
Use ClientCode: No
Progress inband: Never
Language: ru
MOH Interpret: default
MOH Suggest:
Voice Mail Extension: asterisk
----
Asterisk ending (0).
{code}
# asterisk -rx "sip show peer r1234_line1"
{code}
Parsing /etc/asterisk/extconfig.conf
* Name : r1234_line1
Description :
Secret : <Set>
MD5Secret : <Not set>
Remote Secret: <Not set>
Context : from-ipclients
Subscr.Cont. : <Not set>
Language : ru
AMA flags : Unknown
Transfer mode: closed
CallingPres : Presentation Allowed, Not Screened
Callgroup :
Pickupgroup :
MOH Suggest :
Mailbox :
VM Extension : asterisk
LastMsgsSent : 0/0
Call limit : 1
Max forwards : 0
Dynamic : Yes
Callerid : "" <1234567890>
MaxCallBR : 384 kbps
Expire : 3218
Insecure : no
Force rport : Yes
ACL : No
DirectMedACL : No
T.38 support : Yes
T.38 EC mode : Redundancy
T.38 MaxDtgrm: -1
DirectMedia : No
PromiscRedir : No
User=Phone : No
Video Support: No
Text Support : No
Ign SDP ver : No
Trust RPID : No
Send RPID : No
Subscriptions: No
Overlap dial : No
DTMFmode : rfc2833
Timer T1 : 500
Timer B : 32000
ToHost :
Addr->IP : 95.138.160.45:62893
Defaddr->IP : (null)
Prim.Transp. : UDP
Allowed.Trsp : UDP
Def. Username: r1234_line1
SIP Options :
Codecs : (gsm|ulaw|alaw|g729)
Codec Order : (alaw:20,ulaw:20,g729:20,gsm:20)
Auto-Framing : No
Status : OK (160 ms)
Useragent : Linksys/SPA2102-3.3.6
Reg. Contact : sip:r1234_line1 at 192.168.5.17:5060
Qualify Freq : 60000 ms
Sess-Timers : Accept
Sess-Refresh : uas
Sess-Expires : 1800 secs
Min-Sess : 90 secs
RTP Engine : asterisk
Parkinglot :
Use Reason : No
Encryption : No
Asterisk ending (0)
{code}
tcpdump
{code}09:28:19.911907 IP 88.80.1.50.5060 > 95.138.160.45.62893: SIP, length: 569
09:28:20.911952 IP 88.80.1.50.5060 > 95.138.160.45.62893: SIP, length: 569
09:28:20.932560 IP 95.138.160.45.62893 > 88.80.1.50.5060: SIP, length: 422
09:28:24.681426 IP 88.80.1.50.5060 > 95.138.160.45.62893: SIP, length: 945
09:28:24.924838 IP 95.138.160.45.62893 > 88.80.1.50.5060: SIP, length: 322
09:28:24.925086 IP 95.138.160.45.62893 > 88.80.1.50.5060: SIP, length: 433
09:28:27.264832 IP 95.138.160.45.62893 > 88.80.1.50.5060: SIP, length: 814
09:28:27.268305 IP 88.80.1.50.5060 > 192.168.5.17.5060: SIP, length: 442
09:28:27.389518 IP 88.80.1.50.15200 > 192.168.5.17.16400: UDP, length 32
09:28:27.410068 IP 88.80.1.50.15200 > 192.168.5.17.16400: UDP, length 32{code}
Why media traffic going to 192.168.5.17 ?
> Setting nat=force_rport in [general] sip.conf will never work
> -------------------------------------------------------------
>
> Key: ASTERISK-21225
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-21225
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Channels/chan_sip/General
> Affects Versions: 11.2.1
> Reporter: Alexandre Vezina
> Assignee: Michael L. Young
> Severity: Minor
> Attachments: asterisk-21225-handle-options-default-prob_1.8_v3.diff, asterisk-21225-handle-options-default-prob_v3.diff
>
>
> I noticed that it was impossible to set nat=force_rport in the general section of sip.conf. It actually has no effect when issuing cli command "sip show settings" (result is Force rport: Auto (No).
> The function to reload configurations in chan_sip.c sets the flag SIP_PAGE3_NAT_AUTO_RPORT in the global flags and the function sip_parse_nat_option in config_parser.c will only add the flag SIP_NAT_FORCE_RPORT if SIP_PAGE3_NAT_AUTO_RPORT is not present.
> So, it seems impossible to raise the flag SIP_NAT_FORCE_RPORT in the [general] section of sip.conf.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the asterisk-bugs
mailing list