Hi,
I have an Asterisk 20 instance running on a VPS without NAT and I am using PJSIP as channel driver.
It is registered to a SIP Trunk and inbound calls seem to work.
Currently, I’m only interested in outbound calls to real phones (i.e. mobile phones) though. Thus, there are no local extensions – just Asterisk and the SIP Trunk.
For testing purposes I simply try to originate a call from the CLI (so no dial plan) to my mobile phone.
However, neither is my phone ringing nor does the SIP Trunk Provider show any outbound calls.
And I cannot see any errors or traffic:
localhost*CLI> pjsip set logger on
PJSIP Logging enabled
localhost*CLI> channel originate PJSIP/49157xxxxxxxx@trunk application Playback hello-world
-- Called 49157xxxxxxxx@trunk
I also have a full logging (full => notice,warning,error,debug,verbose(5),dtmf
) which outputs the following:
[Dec 12 20:23:59] DEBUG[142561] chan_pjsip.c: 49157xxxxxxxx@trunk Topology: <0:audio-0:audio:sendrecv (slin)>
[Dec 12 20:23:59] DEBUG[142521] chan_pjsip.c: 49157xxxxxxxx@trunk
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_session.c: trunk 49157xxxxxxxx Topology: <0:audio-0:audio:sendrecv (slin)>
[Dec 12 20:23:59] DEBUG[142521] chan_pjsip.c: trunk
[Dec 12 20:23:59] DEBUG[142521] chan_pjsip.c: Direct media no glare mitigation
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_session/pjsip_session_caps.c: 'trunk' Caps for outgoing audio call with pref 'remote_merge' - remote: (slin) local: (alaw|ulaw) joint: (alaw|ulaw)
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_session.c:
[Dec 12 20:23:59] DEBUG[142521] chan_pjsip.c:
[Dec 12 20:23:59] DEBUG[142561] chan_pjsip.c: trunk
[Dec 12 20:23:59] DEBUG[142561] channel_internal_api.c: <initializing>: Formats: (none)
[Dec 12 20:23:59] DEBUG[142561] channel_internal_api.c: Channel is being initialized or destroyed
[Dec 12 20:23:59] DEBUG[142561] stasis.c: Creating topic. name: channel:1702412639.2, detail:
[Dec 12 20:23:59] DEBUG[142561] stasis.c: Topic 'channel:1702412639.2': 0x7f5f68003410 created
[Dec 12 20:23:59] DEBUG[142561] channel.c: Channel 0x7f5f68001cd0 'PJSIP/trunk-00000002' allocated
[Dec 12 20:23:59] DEBUG[142561] chan_pjsip.c: Topology: <0:audio-0:audio:sendrecv (alaw|ulaw)> Formats: (alaw|ulaw)
[Dec 12 20:23:59] DEBUG[142561] chan_pjsip.c: Compatible? yes
[Dec 12 20:23:59] DEBUG[142561] channel_internal_api.c: PJSIP/trunk-00000002: MultistreamFormats: (alaw|ulaw)
[Dec 12 20:23:59] DEBUG[142561] channel_internal_api.c: Set native formats but not topology
[Dec 12 20:23:59] DEBUG[142561] channel_internal_api.c: PJSIP/trunk-00000002: <0:audio-0:audio:sendrecv (alaw|ulaw)>
[Dec 12 20:23:59] DEBUG[142561] channel_internal_api.c: Used provided topology
[Dec 12 20:23:59] DEBUG[142561] chan_pjsip.c:
[Dec 12 20:23:59] DEBUG[142561] chan_pjsip.c: Channel: PJSIP/trunk-00000002
[Dec 12 20:23:59] DEBUG[142495] threadpool.c: Increasing threadpool stasis/pool's size by 1
[Dec 12 20:23:59] DEBUG[142630] chan_pjsip.c: PJSIP/trunk-00000002 Topology: <0:audio-0:audio:sendrecv (alaw|ulaw)>
[Dec 12 20:23:59] DEBUG[142630] chan_pjsip.c: 'call' task pushed
[Dec 12 20:23:59] VERBOSE[142630] dial.c: Called 49157xxxxxxxx@trunk
[Dec 12 20:23:59] DEBUG[142521] chan_pjsip.c: PJSIP/trunk-00000002 Topology: <0:audio-0:audio:sendrecv (alaw|ulaw)>
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_session.c: PJSIP/trunk-00000002
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_session.c: PJSIP/trunk-00000002
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_session.c: PJSIP/trunk-00000002: Processing streams
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_session.c: PJSIP/trunk-00000002 Adding position 0
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_session.c: Creating new media session
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_session.c: Setting media session as default for audio
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_session.c: Done
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_session.c: PJSIP/trunk-00000002 Stream: 0:audio-0:audio:sendrecv (alaw|ulaw)
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_sdp_rtp.c: PJSIP/trunk-00000002 Type: audio 0:audio-0:audio:sendrecv (alaw|ulaw)
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_sdp_rtp.c: Transport transport-udp bound to 0.0.0.0: Using it for RTP media.
[Dec 12 20:23:59] DEBUG[142521] rtp_engine.c: Using engine 'asterisk' for RTP instance '0x7f5fcc2592b0'
[Dec 12 20:23:59] DEBUG[142521] res_rtp_asterisk.c: (0x7f5fcc2592b0) RTP allocated port 10098
[Dec 12 20:23:59] DEBUG[142521] rtp_engine.c: RTP instance '0x7f5fcc2592b0' is setup and ready to go
[Dec 12 20:23:59] DEBUG[142521] acl.c: Multiple addresses. Using the first only
[Dec 12 20:23:59] DEBUG[142521] res_rtp_asterisk.c: () RTCP setup on RTP instance
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_sdp_rtp.c: RC: 1
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_session.c: Handled
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_session.c: PJSIP/trunk-00000002: Adding bundle groups (if available)
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_session.c: PJSIP/trunk-00000002: Copying connection details
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_session.c: PJSIP/trunk-00000002
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_session.c:
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_session.c: PJSIP/trunk-00000002: Method is INVITE
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_geolocation.c: PJSIP/trunk-00000002
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_geolocation.c: PJSIP/trunk-00000002: Endpoint has no geoloc_outgoing_call_profile. Skipping.
[Dec 12 20:23:59] DEBUG[142521] res_pjsip_session.c: PJSIP/trunk-00000002
[Dec 12 20:23:59] DEBUG[142521] chan_pjsip.c: RC: 0
Note that
- ICE support is disabled (Can't make internal/outbound calls with PJSIP - #6 by jcolp)
- I also tried setting
from_user
andfrom_domain
on the endpoint in thepjsip.conf
(How do I make an outbound call to a mobile number? - #11 by zscore) - The
RC: 1
seems to be ok if I read the code correctly (create_outgoing_sdp_stream
’s return value is checked against< 0
in https://github.com/asterisk/asterisk/blob/master/res/res_pjsip_session.c#L5059).
What I don’t understand: Why can’t I see any SIP traffic? Any error message or SIP package would be a hint towards a solution but no output makes debugging difficult.
I appreciate any idea and thank you for spending your time for me!
Regards, Jim
Resources I’ve look through before posting yet another question: