0

Enviroment

2 VMs

One with Debian 8, Asterisk 13.13.1, PJSIP 2.5.5

and the other wit Debian 8 Gnome-GUI and SFLphone 1.4.1

VMs are located behinde NAT router in same network

Way around NAT is done by Exposed-Host function on the Asterisk-VM static IP

Asterisk-VM Firewall is turned of, to do so I have done in CLI as root:

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

Files

======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

Picture

CLI notice with verbose = 5

Problem

Incoming calls are not routed to my softphone 1001. Only thing i get is 10sec silence, then HangUp. External calls run perfect

Thanks for help or link or calling me a dumbf*uck and telling me it's obvious

I use this enviroment just to learn, it's not productive neither 24/7 runnig. If you're missing something, tell me


Edit

Here is the 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
hennes
  • 1
  • 5
  • Looks like you have a config issue (no matching endpoint) - I have a working sipgate config here posted for another user - give it a try & let me know if it works for you. http://stackoverflow.com/a/42563808/3788685 – user3788685 Mar 08 '17 at 19:45
  • Thanks for help, but it does not work for me. Changed tlds and, of course username+passwd in your pjsip and have tryed it with your extensions.conf and plain number _X. my configuration is extracted from here: https://www.sipgate.de/basic/konfiguration/219/asterisk-pbx – hennes Mar 09 '17 at 14:47
  • is is the same error you get ? I'll try and have a look when I have some time tonight ( >20:00GMT) – user3788685 Mar 09 '17 at 14:58
  • Still same error: the INVITE failed for '217...' – hennes Mar 09 '17 at 19:26
  • can you make an outbound call? - and that error in the image is and endpoint error – user3788685 Mar 09 '17 at 20:17
  • Outbound works without any trouble. I know that it says ENDPOINT, but this error is the only hint I get. Do I have to create an Endpoint with a number that matches exactly my sipgate number? That can't be necessary – hennes Mar 11 '17 at 13:59
  • 2 things to check - there is an endpoint section in the `pjsip.conf` `type = endpoint` and in the `extensions.conf` you need to use your sipgate user number - in my config example its all '0s'. Also what is your log/debug level? – user3788685 Mar 15 '17 at 20:27
  • It does not work and I get the same error. To be clear and as an example: from_user = 1234 in pjsip's endpoint section and in extensions.conf in the context of the endpoint I worked with the line exten => 1234 ... – hennes Mar 17 '17 at 18:52
  • Edited log. Maybe someone finds something – hennes Mar 20 '17 at 14:39
  • is this a fresh config or from an old version of * ? and presume your behind a nat/firewall - have you opened the right ports etc ? I'll have a look through your updated logs later tonight if i get some time – user3788685 Mar 20 '17 at 17:30
  • The log is fresh. I did nothing besides the things listet here. All ports should be open, as far as i can confirme this, due to the Exposed Host function from the router I'm using. – hennes Mar 20 '17 at 18:31

1 Answers1

0

Solution

This line in debug.log brought me to it

[Mar 20 06:46:59] DEBUG[25618] res_pjsip_endpoint_identifier_ip.c: No identify sections to match against

Two things to change in pjsip.conf

One very silly mistake by myself.

You have to change this lines

[sipgate_identity]
type=identity

To

[sipgate_identity]
type=identify

and second:

sipgate gave me some other errors, so it seems like it does not work with alaw,

so I changed it to gsm

See

[sipgate]
type = endpoint
...
disallow = all
allow = alaw
...

changed to

[sipgate]
type = endpoint
...
disallow = all
allow = gsm
...
hennes
  • 1
  • 5