SOLVED Asterisk 13.6.0 ignores from_user / from_domain settings

bofh42

Member
Joined
Jan 5, 2016
Messages
32
Reaction score
0
IncrediblePBX 13-12-3 for RaspberryPi 2

FreePBX 12.0.70 / IncredibleGUI 12.0.30
Asterisk 13.6.0
Raspbian Wheezy
chan_pjsip

all updates installed

Problem: Asterisk always send REGISTER and OPTIONS packets to the trunk with the
"default_from_user" instead of using the values for "from_user" and "from_domain" given in the config files

The result is that it is impossible to perform outbound calls due to not being registered

Code:
OPTIONS sip:[email protected]:5060 SIP/2.0
            192.168.80.12:5060             217.0.23.36:5060 │Via: SIP/2.0/UDP 84.178.92.172:5060;rport;branch=z9hG4bKPjb545c814-7679-474c-9d31-48a31d
          ──────────┬─────────          ──────────┬─────────│c579
                    │           OPTIONS           │         │From: <sip:[email protected]>;tag=4b740498-65f5-4156-9ab5-5474fe865813
  20:44:21.463773   │ ──────────────────────────> │         │To: <sip:[email protected]>
        +0.014493   │        403 Forbidden        │         │Contact: <sip:[email protected]:5060>
  20:44:21.478266   │ <────────────────────────── │         │Call-ID: 2545a727-0740-47b5-9f0a-34844b6f3d13
                    │                             │         │CSeq: 19859 OPTIONS
                    │                             │         │Max-Forwards: 70
                    │                             │         │User-Agent: FPBX-12.0.70(13.6.0)
                    │                             │         │Content-Length:  0

Code:
pjsip.endpoint.conf:from_user=05173xxx



[Telekom-xxx]
type=endpoint
transport=0.0.0.0-udp
context=ext-did-0002
disallow=all
allow=g722,ulaw,alaw,gsm,g729,g723,g726,speex,speex16,speex32
outbound_auth=Telekom-xxx
aors=Telekom-xxx
direct_media=no
from_domain=tel.t-online.de
from_user=05173xxx

(it can be put in the pjsip.registration.conf as well, that does not help either...)

Code:
raspberrypi*CLI> pjsip show registration Telekom-xxx

.....
force_avp                     : false
 force_rport                   : true
 from_domain                   :
 from_user                     :
 g726_non_standard             : false
.....

well ....

is there any update path to anything newer and (hopefully) bug-free?
 

Jake

Active Member
Joined
Aug 27, 2010
Messages
419
Reaction score
81
For starters try using just Chan SIP for your trunks. I've yet to have success with PJSIP and trunks.
 

bofh42

Member
Joined
Jan 5, 2016
Messages
32
Reaction score
0
Whatever I try with chan_sip - and I did try for weeks, using any howto I could find - it always ends with
Code:
[2017-06-17 08:51:44] ERROR[1475]: chan_sip.c:4181 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data
[2017-06-17 08:51:44] NOTICE[1475]: chan_sip.c:15347 sip_reg_timeout:    -- Registration for '[email protected]' timed out, trying again (Attempt #2204)

so that is not an option.
 

bofh42

Member
Joined
Jan 5, 2016
Messages
32
Reaction score
0
looks like
Code:
from_user=
from_domain=

have to be present in
Code:
pjsip.endpoint.conf / type=endpoint

FreePBX 12.x as shipped in Incredibple Pi 2 does not write it at all, in none of the config files

additional
Code:
contact_user=
has to be present in
Code:
pjsip.registration.con / type=registration

FreePBX 12 as shipped in PIAF writes it to
Code:
type=endpoint / pjsip.endpoint.conf
, which is WRONG.

Any mistake in this stops things from working

If parameters for type=registration are put into type=endpoint, the whole configuration for that item is silently (!!) ignored. Therefore, the wrong place, FreePBX writes contact_user to - stops the endpoints being configured...

The underlying problem here is, that even in the official asterisk wiki for v13.x on asterisk.org, the parameter contact_user is listed under type=endpoint (and type=registration), where it may not be put - it disables the endpoint.

Having made these changes, pjsip no works flawlessly.

But: every change in the FreePBX GUI + save destroys these settings again - after saving from the GUI, you have to correct all type=endpoint settings for all trunks and reload asterisk again from the command line.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,221
Solution: Don't use PJsip for trunks. That's been the recommendation for at least the last 2 years.
 

bofh42

Member
Joined
Jan 5, 2016
Messages
32
Reaction score
0
and again: after several weeks of trying: I could NOT get chan_sip to work in any way with any of the trunks.

Nor could I get any help beyond: that's easy and works.

chan_pjsip now works perfectly
 

Members online

No members online now.

Forum statistics

Threads
25,812
Messages
167,763
Members
19,240
Latest member
nikko
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top