Hello, I’m having an issue while registering Asterisk with my Zoiper.
My sip.conf looks like so
[general]
context=from-sip-external
allowguest=no
udpbindaddr=0.0.0.0
tcpenable=no
realm=mydomain.com
transport=udp,ws,wss
[VOIP-main]
type=friend
username=VOIP-main
secret=959Ac3kCCIk8593
host=dynamic
context=from-internal
nat=force_rport,comedia
dtmfmode=rfc2833
canreinvite=no
In Zoiper I pass in the arguments as follow:
https://i.imgur.com/L6qIbiZ.png
https://i.imgur.com/z87D0Mm.png
my.ip
of course represents external IP of my VPS
This returns to Asterisk CLI
VPS.IP > VPS IP address
MY.IP > my local IP address
[2023-03-13 16:40:33] NOTICE[24347] res_pjsip/pjsip_distributor.c: Request 'REGISTER' from '<sip:VOIP-main@VPS.IP>' failed for 'MY.IP:18293' (callid: 5lBKi7zeO6qdR4KcGtn1HQ..) - No matching endpoint found
[2023-03-13 16:40:33] NOTICE[24347] res_pjsip/pjsip_distributor.c: Request 'REGISTER' from '<sip:VOIP-main@VPS.IP>' failed for 'MY.IP:18293' (callid: 5lBKi7zeO6qdR4KcGtn1HQ..) - No matching endpoint found
[2023-03-13 16:40:33] NOTICE[24347] res_pjsip/pjsip_distributor.c: Request 'REGISTER' from '<sip:VOIP-main@VPS.IP>' failed for 'MY.IP:18293' (callid: 5lBKi7zeO6qdR4KcGtn1HQ..) - Failed to authenticate
I really don’t know what to do about this as nothing I tried has worked so far
You have put your configuration in the file used for the, obsolete, chan_sip, but chan_pjsip is actually the driver listening for SIP requests.
Please delete sip.conf and refer to:
https://wiki.asterisk.org/wiki/display/AST/res_pjsip+Configuration+Examples
for common pjsip.conf formats, and to:
https://wiki.asterisk.org/wiki/display/AST/PJSIP+Configuration+Sections+and+Relationships
and
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Configuration_res_pjsip
to understand what they mean.
chan_sip has been removed from the development branch of the source code.
1 Like
Will try this out, thank you so much. Will come back here with my results
Hello, I believe this is the solution, thank you.
However I ran into a configuration issue which I can’t seem to solve.
[2023-03-15 12:18:36] ERROR[29834]: res_pjsip.c:763 ast_sip_set_tpselector_from_ transport_name: Unable to retrieve PJSIP transport 'simpletrans'
my pjsip.conf
[global]
type=global
user_agent=FPBX-15.0.23(18.16.0)
use_callerid_contact=no
keep_alive_interval=90
taskprocessor_overload_trigger=pjsip_only
[6001]
type=endpoint
context=default
disallow=all
allow=ulaw
transport=simpletrans
auth=auth6001
aors=6001
[simpletrans]
type=transport
protocol=udp
bind=0.0.0.0
[auth6001]
type=auth
auth_type=userpass
password=mypassword1234
username=6001
[6001]
type=aor
max_contacts=3
I understand that I must include my SIP trunk provider’s details somewhere, I just don’t know where.
Most people would put the transport section first, however, I would have hoped that didn’t matter.
If the user agent really is FPBX-15.0.23, you should not be touching pjsip.conf directly and only touching pjsip_additional.conf through the GUI.
The examples pages contains a typical provider configuration, although, again, for FreePBX, you should use the GUI.
1 Like
Alright, I couldn’t manage to set it up for PJSIP… but I followed: [part 10] Setting up SIP trunk on your FreePBX system so it can talk to the phone company - YouTube
which worked (kind of), it is registered with my SIP trunk provider and everything…
Now I ran across another issue, I don’t know how to connect to it using Zoiper. There is no password defined, I don’t even know if I’m trying to register (from my Zoiper) under the right username.
https://i.imgur.com/djqn1sC.png
^^ I assume that route is used for connecting to it, I’m really just floating around, don’t know what I’m really doing
Thank you in advance, it’s been really helpful so far
EDIT: Registered PJSIP [Preformatted text](https://i.imgur.com/970Q9lO.png)
Another update: I created an extension and routes for outbound calls. Connected to it using Zoiper, no issues so far.
Upon trying to dial a number, it got rejected with error Decline (code: 603)
Asterisk CLI returned this error:
ERROR[32255] loader.c: Error loading module 'app_macro': /usr/lib/asterisk/modules/app_macro.so: cannot open shared object file: No such file or directory
Insufficient logging. However providers will often use 603 if you violate policy rules, e.g. not using your assigned caller ID.
app_macro is deprecated, and will not be built by default. You should not try to load it unless your dialplan uses it, and you have selected it to be built.
Like chan_sip, it is no longer in the development branch of the source code, so will not be in this year’s release of Asterisk.
Note to Asterisk developers, I wonder if you have underestimated the number of users copying and pasting out of date (and often buggy) tutorials, who are going to find they can no longer just copy an example.
1 Like
I see, not really sure what to do then, I followed instructions as shown on documentations you sent me.
PJSIP is being used. Is it possible somehow not to use said app_macro
?
To not use it, simply don’t use it. Nothing in Asterisk will use it unless you explicitly request its use.
However in this case, I think it is because you have a modules.conf that is explicitly trying to load it, in which case you should remove it from modules.conf.
Note that FreePBX makes heavy use of it, the video you referenced was for FreePBX. If you are using FreePBX, you should use their forum for support. (The video also includes username, which is an obsolete name for something that doesn’t do what people are assuming it does.)
The instructions I provided don’t cover the user of app_macro, one way or the other. It is not relevant to the chan_sip / chan_pjsip difference. Also the examples in that documentation are examples; they may need to be modified, by reference to the full list of options, and an understanding of what the provider actually requires. They will generally work with a provider that does things in a straightforward way and particular ones expecting to be used by a phone, rather than a PABX.
1 Like
This is my modules.conf, nothing regarding any macro
being listed
https://pastebin.com/KWjjuFg1
Will ask around FreePBX forums as well!
I don’t understand how you could get no such file without an explicit load request, but, if you are using FreePBX, you will need that file to exist.
I tried recompiling Asterisk from source and in the configuration (make menuselect
) I chose app_macro
and marked it, compiled using make install
https://i.imgur.com/7lNIcSQ.png
https://i.imgur.com/gsoeSrl.png
It was compiled without any issue, however the error still persists:
[2023-03-15 22:26:14] WARNING[3986][C-00000002]: pbx.c:2928 pbx_extension_helper: No application 'Macro' for extension (from-internal, 3034985509, 1)
[2023-03-15 22:26:14] WARNING[3986][C-00000002]: pbx.c:2928 pbx_extension_helper: No application 'Macro' for extension (from-internal, h, 1)
I’m sorry, I had to enable it manually using module load app_macro
Thank you so much!