enviroment
2 VM
与Debian 8,星号13.13.1,PJSIP 2.5.5
一起和其他Wit Debian 8 Gnome-gui和Sflphone 1.4.1
VM位于同一网络中的NAT路由器后面
围绕NAT的方式是通过Asterisk-VM静态IP
上的裸露主机函数完成的Asterisk-vm防火墙被扭转了,这样做是这样做的:
:iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
文件
======== pjsip.conf
[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0
local_net = 192.168.2.0/24
external_media_address = ---Router WAN IP---
external_signaling_address = ---Router WAN IP---
[reg_sipgate]
type = registration
retry_interval = 20
max_retries = 10
contact_user = ---SIPgate-ID---
expiration = 120
transport = transport-udp
outbound_auth = auth_reg_sipgate
client_uri = sip:---SIPgate-ID---@sipgate.de:5060
server_uri = sip:sipgate.de:5060
[auth_reg_sipgate]
type = auth
username = ---SIPgate-ID---
password = ---SIPgate-passwd---
[sipgate_aor]
type = aor
contact = sip:---SIPgate-ID---@sipgate.de
[sipgate_identity]
type=identity
endpoint = sipgate
match = sipgate.de
[sipgate_auth]
type = auth
username = ---SIPgate-ID---
password = ---SIPgate-passwd---
[sipgate]
type = endpoint
context = sipgate-in
dtmf_mode =rfc4733
disallow = all
allow = alaw
rtp_symmetric = yes
force_rport = yes
rewrite_contact = yes
timers = yes
from_user = ---SIPgate-ID---
from_domain = sipgate.de
language = en
outbound_auth = sipgate_auth
aors = sipgate_aor
======= extensions.conf
[sipgate-in]
exten => _X.,1,NoOp(Processing an incoming call)
;same problem if this line is used and not the above line
;exten => ---SIPgate-number-in-plain---,1,NoOp(Processing an incoming call)
same => n,Dial(PJSIP/1001,20)
same => n,Hangup()
[sipgate-out]
exten => _X.,1,NoOp(Processing an outgoing call)
same => n,Dial(PJSIP/${EXTEN}@sipgate)
same => n,Hangup()
======== pjsip_wizard.conf
[support](!)
type = wizard
accepts_registrations = yes
sends_registrations = no
accepts_auth = yes
sends_auth = no
endpoint/context = support
endpoint/allow_subscribe = yes
endpoint/allow = gsm
endpoint/direct_media = no
endpoint/force_rport = yes
endpoint/disable_direct_media_on_nat = yes
endpoint/direct_media_method = invite
endpoint/ice_support = yes
endpoint/moh_suggest = default
endpoint/send_rpid = yes
endpoint/rewrite_contact = yes
endpoint/send_pai = yes
endpoint/allow_transfer = yes
endpoint/trust_id_inbound = yes
endpoint/device_state_busy_at = 1
endpoint/trust_id_outbound = yes
endpoint/send_diversion = yes
aor/qualify_frequency = 30
aor/max_contacts = 1
aor/remove_existing = yes
aor/minimum_expiration = 30
aor/support_path = yes
phoneprov/PROFILE = profile1
[1001](support)
inbound_auth/username = 1001
inbound_auth/password = XXXXXXXXX
图片
cli通知,用语= 5
问题
传入的通话未连接到我的软电话1001。我唯一得到的是10秒的沉默,然后挂起。外部呼叫运行完美
感谢您的帮助或链接或称我为dumbf*uck,并告诉我这很明显
我只是为了学习而使用这种环境,这并不是24/7 Runnig的生产力。如果您错过了什么,请告诉我
编辑
这是debug.log
[Mar 20 06:46:59] DEBUG[25617] res_pjsip/pjsip_distributor.c: Could not find matching transaction for Request msg INVITE/cseq=103 (rdata0x7f9094001b98)
[Mar 20 06:46:59] DEBUG[25617] res_pjsip/pjsip_distributor.c: Calculated serializer pjsip/distributor-00000026 to use for Request msg INVITE/cseq=103 (rdata0x7f9094001b98)
[Mar 20 06:46:59] DEBUG[25618] res_pjsip_endpoint_identifier_ip.c: No identify sections to match against
[Mar 20 06:46:59] DEBUG[25618] res_pjsip_endpoint_identifier_user.c: Attempting identify by From username '04058962865' domain 'sipgate.de'
[Mar 20 06:46:59] DEBUG[25618] res_pjsip_endpoint_identifier_user.c: Endpoint not found for From username '04058962865' domain 'sipgate.de'
[Mar 20 06:46:59] NOTICE[25618] res_pjsip/pjsip_distributor.c: Request 'INVITE' from '"04058962865" <sip:04058962865@sipgate.de>' failed for '217.10.79.9:5060' (callid: 0eb324896fae520c2707e7933f2b33fe@sipgate.de) - No matching endpoint found
[Mar 20 06:46:59] DEBUG[25617] res_pjsip/pjsip_distributor.c: Could not find matching transaction for Request msg ACK/cseq=103 (rdata0x7f9094001b98)
[Mar 20 06:46:59] DEBUG[25617] res_pjsip/pjsip_distributor.c: Calculated serializer pjsip/distributor-00000026 to use for Request msg ACK/cseq=103 (rdata0x7f9094001b98)
[Mar 20 06:46:59] DEBUG[25618] res_pjsip_endpoint_identifier_ip.c: No identify sections to match against
[Mar 20 06:46:59] DEBUG[25618] res_pjsip_endpoint_identifier_user.c: Attempting identify by From username '04058962865' domain 'sipgate.de'
[Mar 20 06:46:59] DEBUG[25618] res_pjsip_endpoint_identifier_user.c: Endpoint not found for From username '04058962865' domain 'sipgate.de'
[Mar 20 06:47:02] DEBUG[25618] config.c: extract uint from [3] in [0, 4294967295] gives [3](0)
[Mar 20 06:47:02] DEBUG[25618] config.c: extract uint from [0] in [0, 4294967295] gives [0](0)
[Mar 20 06:47:02] DEBUG[25618] config.c: extract uint from [2] in [0, 4294967295] gives [2](0)
[Mar 20 06:47:02] DEBUG[25618] res_pjsip.c: 0x7f90b0006510: Wrapper created
[Mar 20 06:47:02] DEBUG[25618] res_pjsip.c: 0x7f90b0006510: Set timer to 3000 msec
[Mar 20 06:47:02] DEBUG[25618] res_pjsip/pjsip_message_ip_updater.c: Re-wrote Contact URI host/port to 192.168.2.100:5060
[Mar 20 06:47:02] DEBUG[25617] res_pjsip/pjsip_distributor.c: No dialog serializer for response Response msg 200/OPTIONS/cseq=64036 (rdata0x7f9094001b98). Using request transaction as basis
[Mar 20 06:47:02] DEBUG[25617] res_pjsip/pjsip_distributor.c: Found serializer pjsip/default-0000000c on transaction tsx0x7f90b0008e48
[Mar 20 06:47:02] DEBUG[25618] res_pjsip.c: 0x7f90b0006510: PJSIP tsx response received
[Mar 20 06:47:02] DEBUG[25618] res_pjsip.c: 0x7f90b0006510: Cancelling timer
[Mar 20 06:47:02] DEBUG[25618] res_pjsip.c: 0x7f90b0006510: Timer cancelled
[Mar 20 06:47:02] DEBUG[25618] config.c: extract uint from [3] in [0, 4294967295] gives [3](0)
[Mar 20 06:47:02] DEBUG[25618] config.c: extract uint from [0] in [0, 4294967295] gives [0](0)
[Mar 20 06:47:02] DEBUG[25618] config.c: extract uint from [2] in [0, 4294967295] gives [2](0)
[Mar 20 06:47:02] DEBUG[25618] res_pjsip.c: 0x7f90b0006510: Callbacks executed
[Mar 20 06:47:02] DEBUG[25618] res_pjsip.c: 0x7f90b0006510: wrapper destroyed
[Mar 20 06:47:02] DEBUG[25623] res_pjsip/pjsip_configuration.c: Contact 1001/sip:1001@192.168.2.200:5060 status didn't change: Reachable, RTT: 2.107 msec
[Mar 20 06:47:15] DEBUG[25622] threadpool.c: Worker thread idle timeout reached. Dying.
[Mar 20 06:47:15] DEBUG[25620] threadpool.c: Worker thread idle timeout reached. Dying.
[Mar 20 06:47:15] DEBUG[25615] threadpool.c: Destroying worker thread 9
[Mar 20 06:47:15] DEBUG[25615] threadpool.c: Destroying worker thread 7
[Mar 20 06:47:15] DEBUG[25621] threadpool.c: Worker thread idle timeout reached. Dying.
[Mar 20 06:47:15] DEBUG[25615] threadpool.c: Destroying worker thread 8
[Mar 20 06:47:16] DEBUG[25627] threadpool.c: Worker thread idle timeout reached. Dying.
[Mar 20 06:47:16] DEBUG[25625] threadpool.c: Worker thread idle timeout reached. Dying.
[Mar 20 06:47:16] DEBUG[25595] threadpool.c: Destroying worker thread 13
[Mar 20 06:47:16] DEBUG[25595] threadpool.c: Destroying worker thread 12
[Mar 20 06:47:17] DEBUG[25657] res_pjsip_registrar_expire.c: Woke up at 1489988837 Interval: 30
[Mar 20 06:47:17] DEBUG[25657] res_pjsip_registrar_expire.c: Expiring 0 contacts
[Mar 20 06:47:23] DEBUG[25619] threadpool.c: Worker thread idle timeout reached. Dying.
[Mar 20 06:47:23] DEBUG[25615] threadpool.c: Destroying worker thread 6
[Mar 20 06:47:26] DEBUG[25617] res_pjsip/pjsip_distributor.c: Could not find matching transaction for Request msg REGISTER/cseq=53083 (rdata0x7f9094001b98)
[Mar 20 06:47:26] DEBUG[25617] res_pjsip/pjsip_distributor.c: Calculated serializer pjsip/distributor-00000033 to use for Request msg REGISTER/cseq=53083 (rdata0x7f9094001b98)
[Mar 20 06:47:26] DEBUG[25618] res_pjsip_endpoint_identifier_ip.c: No identify sections to match against
[Mar 20 06:47:26] DEBUG[25618] res_pjsip_endpoint_identifier_user.c: Attempting identify by From username '1001' domain '192.168.2.100'
[Mar 20 06:47:26] DEBUG[25618] res_pjsip_endpoint_identifier_user.c: Identified by From username '1001' domain '192.168.2.100'
[Mar 20 06:47:26] DEBUG[25617] res_pjsip/pjsip_distributor.c: Could not find matching transaction for Request msg REGISTER/cseq=53084 (rdata0x7f9094001b98)
[Mar 20 06:47:26] DEBUG[25617] res_pjsip/pjsip_distributor.c: Calculated serializer pjsip/distributor-00000033 to use for Request msg REGISTER/cseq=53084 (rdata0x7f9094001b98)
[Mar 20 06:47:26] DEBUG[25618] res_pjsip_endpoint_identifier_ip.c: No identify sections to match against
[Mar 20 06:47:26] DEBUG[25618] res_pjsip_endpoint_identifier_user.c: Attempting identify by From username '1001' domain '192.168.2.100'
[Mar 20 06:47:26] DEBUG[25618] res_pjsip_endpoint_identifier_user.c: Identified by From username '1001' domain '192.168.2.100'
[Mar 20 06:47:26] DEBUG[25618] res_pjsip_authenticator_digest.c: Calculated nonce 1489988846/53973002a197b8acbac0fc7c46b92b1b. Actual nonce is 1489988846/53973002a197b8acbac0fc7c46b92b1b
解决方案
debug.log中的这条线带我去了
[Mar 20 06:46:59] DEBUG[25618] res_pjsip_endpoint_identifier_ip.c: No identify sections to match against
在pjsip.conf
中更改的两件事一个一个非常愚蠢的错误。
您必须更改此行
[sipgate_identity]
type=identity
to
[sipgate_identity]
type=identify
和第二:
sipgate给了我其他错误,因此似乎不适合Alaw,
所以我将其更改为GSM
见
[sipgate]
type = endpoint
...
disallow = all
allow = alaw
...
更改为
[sipgate]
type = endpoint
...
disallow = all
allow = gsm
...