Setting Up Asterisk: Building a Simple PBX with Voxbeam for Outbound Calls

Hello Guys,

I downloaded Asterisk version 20.8.1 and ran it on a VirtualBox Ubuntu 24.04 LTS. I followed the installation guide from this LINK Afterward, I followed this tutorial, but tried to adapt it to my use case, meaning I used the chan_pjsip.so.

Here’s my current configuration:

ubuntu@ubuntu-VirtualBox:/etc/asterisk$ ls
asterisk.conf    indications.conf  pjsip_notify.conf  sip.conf.default
cdr.conf         logger.conf       queues.conf        voicemail.conf
cdr_custom.conf  modules.conf      README
confbridge.conf  musiconhold.conf  samples
extensions.conf  pjsip.conf        sip.conf
ubuntu@ubuntu-VirtualBox:/etc/asterisk$ cat sip.conf
[general]
udpbindaddr = 0.0.0.0:5060
context = dummy
disallow = all
allow = ulaw
alwaysauthreject = yes
allowguest = no

[zoiper]
type=friend
secret=#supersecret#
host=dynamic
qualify=yes
directmedia=no
context=from-internal

[xlite]
type=friend
secret=#supersecret#
host=dynamic
qualify=yes
directmedia=no
context=from-internal
ubuntu@ubuntu-VirtualBox:/etc/asterisk$ cat modules.conf 
[modules]
autoload = yes

; This is a minimal module load. We are loading only the modules
; required for the Asterisk features used in the "Super Awesome
; Company" configuration.

; Applications

load = app_bridgewait.so
load = app_dial.so
load = app_playback.so
load = app_stack.so
load = app_verbose.so
load = app_voicemail.so
load = app_directory.so
load = app_confbridge.so
load = app_queue.so

; Bridging

load = bridge_builtin_features.so
load = bridge_builtin_interval_features.so
load = bridge_holding.so
load = bridge_native_rtp.so
load = bridge_simple.so
load = bridge_softmix.so

; Call Detail Records

load = cdr_custom.so

; Channel Drivers

load = chan_bridge_media.so
load = chan_pjsip.so

; Codecs

load = codec_gsm.so
load = codec_resample.so
load = codec_ulaw.so
load = codec_g722.so

; Formats

load = format_gsm.so
load = format_pcm.so
load = format_wav_gsm.so
load = format_wav.so

; Functions

load = func_callerid.so
load = func_cdr.so
load = func_pjsip_endpoint.so
load = func_sorcery.so
load = func_devstate.so
load = func_strings.so

; Core/PBX

load = pbx_config.so

; Resources

load = res_http_websocket.so
load = res_musiconhold.so
load = res_pjproject.so
load = res_pjsip_acl.so
load = res_pjsip_authenticator_digest.so
load = res_pjsip_caller_id.so
load = res_pjsip_dialog_info_body_generator.so
load = res_pjsip_diversion.so
load = res_pjsip_dtmf_info.so
load = res_pjsip_endpoint_identifier_anonymous.so
load = res_pjsip_endpoint_identifier_ip.so
load = res_pjsip_endpoint_identifier_user.so
load = res_pjsip_exten_state.so
load = res_pjsip_header_funcs.so
load = res_pjsip_logger.so
load = res_pjsip_messaging.so
load = res_pjsip_mwi_body_generator.so
load = res_pjsip_mwi.so
load = res_pjsip_nat.so
load = res_pjsip_notify.so
load = res_pjsip_one_touch_record_info.so
load = res_pjsip_outbound_authenticator_digest.so
load = res_pjsip_outbound_publish.so
load = res_pjsip_outbound_registration.so
load = res_pjsip_path.so
load = res_pjsip_pidf_body_generator.so
load = res_pjsip_pidf_digium_body_supplement.so
load = res_pjsip_pidf_eyebeam_body_supplement.so
load = res_pjsip_publish_asterisk.so
load = res_pjsip_pubsub.so
load = res_pjsip_refer.so
load = res_pjsip_registrar.so
load = res_pjsip_rfc3326.so
load = res_pjsip_sdp_rtp.so
load = res_pjsip_send_to_voicemail.so
load = res_pjsip_session.so
load = res_pjsip.so
load = res_pjsip_t38.so
load = res_pjsip_transport_websocket.so
load = res_pjsip_xpidf_body_generator.so
load = res_rtp_asterisk.so
load = res_sorcery_astdb.so
load = res_sorcery_config.so
load = res_sorcery_memory.so
load = res_sorcery_realtime.so
load = res_timing_timerfd.so

; Do not load res_hep and kin unless you are using HEP monitoring
; <http://sipcapture.org> in your network.

noload = res_hep.so
noload = res_hep_pjsip.so
noload = res_hep_rtcp.so
ubuntu@ubuntu-VirtualBox:/etc/asterisk$ 

What are the next steps to build a simple PBX where I can make outbound calls using Python and the Asterisk API? Can anyone help out, for a reasonable price or karma points?

Note: Any reading material is welcome, i am not a lazy person, just a noob :slight_smile:

Best,
Volkan

Delete sip.conf and start again with pjsip.conf.

1 Like

Any document written in 2023 that’s saying to not use pjsip.conf should be ignored as outdated; no matter what the source. chan_sip has been on the chopping block for quite some time.

Like @david551 mentioned; you’ll need to create your trunks and define your endpoints using pjsip.conf.

If you’re wanting to make calls through Asterisk with a Python app; you don’t need the app to interface with Asterisk, you just need it to function as a SIP client; then you’ll create a dialplan in Asterisk so it knows what to do with calls to exetensions.

1 Like

you are configuring chan_sip. You need to check if chan_sip is enabled on Asterisks.

On Wednesday 26 June 2024, david551 via Asterisk Community <notifications@asterisk.discoursemail.com> wrote:

david551
June 26

Delete sip.conf and start again with pjsip.conf.


Visit Topic or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, click here.

I see that Noble Numbat includes Asterisk 20.6.0-something in its repo. I know it’s a slightly older version than 20.8.1, but that may not matter.

Python is useful for programmatically initiating calls between specified endpoints, and also for tracking calls. The Python wrappers from the Asterisk project don’t support event-driven programming with asyncio; if you want that, you will have to look elsewhere.

Thank you!

Do you have a library in mind that I could use with my Python Flask app?

Note: For beginners with Asterisk like me, and for general problem solvers, I recommend trying asterisk-ami version 0.1.7.

I encountered many issues while trying to install PJSIP.

I will keep you updated. Any feedback or recommendations are welcome :slight_smile:

Does Flask support asyncio? Then my Seaskirt library should work with it.

I haven’t done proper documentation, but examples of how to use it can be found here.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.