Asterisk Crashes using Realtime and trying to make a call with res_pjsip.so: undefined symbol: pjsip_dlg_create_uas

Hi all

I am pretty new to Asterisk, and I am currently testing with Asterisk in realtime via ODBC to Maria-DB, and PJSIP.

I have set up 2 extensions, but if I try and make a call to the other extension, or indeed make a call to anything, then asterisk crashes on me.

Here is my /etc/odbc.ini

[Asterisk]
Description =MySQL connection to Asterisk Database
Driver =MySQL
Database =asterisk
Server =localhost
UserName =myusername
Password =mypassword
Port =3306
Socket =/var/lib/mysql/mysql.sock

Here is my /etc/asterisk/res_odbc.conf

[asterisk]
enabled => yes
dsn => Asterisk
username => myusername
password => mypassword
pre-connect => yes
max_connections => 1

/etc/asterisk/modules.conf

[modules]
autoload=yes
preload => res_odbc.so
preload => res_config_odbc.so
noload => chan_alsa.so
noload => chan_console.so
noload => chan_sip.so

/etc/asterisk/extconfig.conf

[settings]
queues => odbc,asterisk,queues
queue_members => odbc,asterisk,queue_members
queue_rules => odbc,asterisk,queue_rules
voicemail => odbc,asterisk,voicemail
extensions => odbc,asterisk,extensions
musiconhold => odbc,asterisk,musiconhold
ps_endpoints => odbc,asterisk,ps_endpoints
ps_auths => odbc,asterisk,ps_auths
ps_aors => odbc,asterisk,ps_aors
ps_domain_aliases => odbc,asterisk,ps_domain_aliases
ps_endpoint_id_ips => odbc,asterisk,ps_endpoint_id_ips
ps_contacts => odbc,asterisk,ps_contacts

/etc/asterisk/sorcery.conf

[res_pjsip]
endpoint=realtime,ps_endpoints
auth=realtime,ps_auths
aor=realtime,ps_aors
domain_alias=realtime,ps_domain_aliases
identify=realtime,ps_endpoint_id_ips
contact=realtime,ps_contacts

/etc/asterisk/pjsip.conf

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

/etc/asterisk/extensions.conf

[testing]
switch => Realtime

Database

SELECT * FROM ps_aors

“id” “contact” “default_expiration” “mailboxes” “max_contacts” “minimum_expiration” “remove_existing” “qualify_frequency” “authenticate_qualify” “maximum_expiration” “outbound_proxy” “support_path” “qualify_timeout” “voicemail_extension”
“101” \N \N \N “1” \N \N \N \N \N \N \N \N \N
"102" \N \N \N “1” \N \N \N \N \N \N \N \N \N

SELECT * FROM ps_auths

“id” “auth_type” “nonce_lifetime” “md5_cred” “password” “realm” “username”
“101” “userpass” \N \N “101” \N "101"
“102” “userpass” \N \N “102” \N “102”

SELECT * FROM ps_endpoints

“id” “transport” “aors” “auth” “context” “disallow” “allow” “direct_media” “connected_line_method” “direct_media_method” “direct_media_glare_mitigation” “disable_direct_media_on_nat” “dtmf_mode” “external_media_address” “force_rport” “ice_support” “identify_by” “mailboxes” “moh_suggest” “outbound_auth” “outbound_proxy” “rewrite_contact” “rtp_ipv6” “rtp_symmetric” “send_diversion” “send_pai” “send_rpid” “timers_min_se” “timers” “timers_sess_expires” “callerid” “callerid_privacy” “callerid_tag” “100rel” “aggregate_mwi” “trust_id_inbound” “trust_id_outbound” “use_ptime” “use_avpf” “media_encryption” “inband_progress” “call_group” “pickup_group” “named_call_group” “named_pickup_group” “device_state_busy_at” “fax_detect” “t38_udptl” “t38_udptl_ec” “t38_udptl_maxdatagram” “t38_udptl_nat” “t38_udptl_ipv6” “tone_zone” “language” “one_touch_recording” “record_on_feature” “record_off_feature” “rtp_engine” “allow_transfer” “allow_subscribe” “sdp_owner” “sdp_session” “tos_audio” “tos_video” “sub_min_expiry” “from_domain” “from_user” “mwi_from_user” “dtls_verify” “dtls_rekey” “dtls_cert_file” “dtls_private_key” “dtls_cipher” “dtls_ca_file” “dtls_ca_path” “dtls_setup” “srtp_tag_32” “media_address” “redirect_method” “set_var” “cos_audio” “cos_video” “message_context” “force_avp” “media_use_received_transport” “accountcode” “user_eq_phone” “moh_passthrough” “media_encryption_optimistic” “rpid_immediate” “g726_non_standard” “rtp_keepalive” “rtp_timeout” “rtp_timeout_hold” “bind_rtp_to_media_address” “voicemail_extension” “mwi_subscribe_replaces_unsolicited” “deny” “permit” “acl” “contact_deny” “contact_permit” “contact_acl” “subscribe_context” “fax_detect_timeout” “contact_user”
“101” “transport-udp” “101” “101” “testing” “all” “g722” “yes” \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N
"102" “transport-udp” “102” “102” “testing” “all” “g722” “yes” \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N

SELECT * FROM extensions

“id” “context” “exten” “priority” “app” “appdata”
“3” “testing” “_1XX” “1” “NoOP” “”
“4” “testing” “_1XX” “2” “Dial” “PJSIP/${EXTEN}”

I am able to register correctly with phones 101 and 102, if I run a pjsip show endpoints, I get (with 101 registered):

Endpoint: <Endpoint/CID…> <State…> <Channels.>
I/OAuth: <AuthId/UserName…>
Aor: <Aor…>
Contact: <Aor/ContactUri…> <Hash…> <RTT(ms)…>
Transport: <TransportId…> <BindAddress…>
Channel: <ChannelId…> <State…> <Time…>
Exten: <DialedExten…> CLCID: <ConnectedLineCID…>

Endpoint: 101 Not in use 0 of inf
InAuth: 101/101
Aor: 101 1
Contact: 101/sip:101@10.5.0.55:51748;rinstance=fde2 35afdbd6d6 Unknown nan
Transport: transport-udp udp 0 0 0.0.0.0:5060

Endpoint: 102 Unavailable 0 of inf
InAuth: 102/102
Aor: 102 1
Transport: transport-udp udp 0 0 0.0.0.0:5060

Make a call from Endpoint: 101 to 333 (anything dialled is the same including the other extension) in this case (with pjsip logging on)

<— Received SIP request (872 bytes) from UDP:10.5.0.55:51748 —>
INVITE sip:333@10.5.0.100 SIP/2.0
Via: SIP/2.0/UDP 10.5.0.55:51748;branch=z9hG4bK-524287-1—43c7443c93978966;rport
Max-Forwards: 70
Contact: sip:101@10.5.0.55:51748;rinstance=fde2efa632e84760
To: sip:333@10.5.0.100
From: sip:101@10.5.0.100;tag=b306375f
Call-ID: 82167YzdhOTJhOGNiYjE3NDI0NzM5NGM2NzljYjQ4YjMyN2Y
CSeq: 1 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, OPTIONS, MESSAGE
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.9.6 stamp 82167
Content-Length: 327

v=0
o=- 1478613164342661 1 IN IP4 10.5.0.55
s=X-Lite release 4.9.6 stamp 82167
c=IN IP4 10.5.0.55
t=0 0
m=audio 62222 RTP/AVP 9 8 120 0 84 101
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

<— Transmitting SIP response (514 bytes) to UDP:10.5.0.55:51748 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.5.0.55:51748;rport=51748;received=10.5.0.55;branch=z9hG4bK-524287-1—43c7443c93978966
Call-ID: 82167YzdhOTJhOGNiYjE3NDI0NzM5NGM2NzljYjQ4YjMyN2Y
From: sip:101@10.5.0.100;tag=b306375f
To: sip:333@10.5.0.100;tag=z9hG4bK-524287-1—43c7443c93978966
CSeq: 1 INVITE
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1478613165/c1887fdebc05b65a21de54260790f803”,opaque=“505058482997f9e3”,algorithm=md5,qop="auth"
Server: Asterisk PBX 14.1.0
Content-Length: 0

<— Received SIP request (333 bytes) from UDP:10.5.0.55:51748 —>
ACK sip:333@10.5.0.100 SIP/2.0
Via: SIP/2.0/UDP 10.5.0.55:51748;branch=z9hG4bK-524287-1—43c7443c93978966;rport
Max-Forwards: 70
To: sip:333@10.5.0.100;tag=z9hG4bK-524287-1—43c7443c93978966
From: sip:101@10.5.0.100;tag=b306375f
Call-ID: 82167YzdhOTJhOGNiYjE3NDI0NzM5NGM2NzljYjQ4YjMyN2Y
CSeq: 1 ACK
Content-Length: 0

<— Received SIP request (1151 bytes) from UDP:10.5.0.55:51748 —>
INVITE sip:333@10.5.0.100 SIP/2.0
Via: SIP/2.0/UDP 10.5.0.55:51748;branch=z9hG4bK-524287-1—affb0f2f36c01372;rport
Max-Forwards: 70
Contact: sip:101@10.5.0.55:51748;rinstance=fde2efa632e84760
To: sip:333@10.5.0.100
From: sip:101@10.5.0.100;tag=b306375f
Call-ID: 82167YzdhOTJhOGNiYjE3NDI0NzM5NGM2NzljYjQ4YjMyN2Y
CSeq: 2 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, OPTIONS, MESSAGE
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.9.6 stamp 82167
Authorization: Digest username=“101”,realm=“asterisk”,nonce=“1478613165/c1887fdebc05b65a21de54260790f803”,uri=“sip:333@10.5.0.100”,response=“702385f3175410acdc75d9f258d0a466”,cnonce=“4245be740e39200ca71adef7df049736”,nc=00000001,qop=auth,algorithm=md5,opaque="505058482997f9e3"
Content-Length: 327

v=0
o=- 1478613164342661 1 IN IP4 10.5.0.55
s=X-Lite release 4.9.6 stamp 82167
c=IN IP4 10.5.0.55
t=0 0
m=audio 62222 RTP/AVP 9 8 120 0 84 101
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

voip001*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups

so as you can see Asterisk crashes, I am running Asterisk 14.1.0

I have also ran Asterisk will full logging, and the error I get is:

asterisk: symbol lookup error: /usr/lib64/asterisk/modules/res_pjsip.so: undefined symbol: pjsip_dlg_create_uas

Can anyone help me with what I have done wrong? I cannot seem to find much assistance on this error online?

Thanks

How exactly have you built and installed Asterisk, and PJSIP?

It is installed as per the instructions at http://www.voip-info.org/wiki/view/Asterisk+11+Installation+on+CentOS+6 but obviously using asterisk 14 and cent os 7

And what about PJSIP?

I think I just used the install_prereq script

I reinstalled this time using ./configure --with-pjproject-bundled and it’s now all working, thanks for pointing me in the right direction :slight_smile: