Telnyx pjsip configuration

Hi,

I want to use my TELNYX SIP TRUNK to originate calls.
This SIP TRUNK is associated to 10 phone numbers.
When I use ZOIPER FREE with:

DOMAIN
USERNAME
PASSWORD
CALLER ID NAME

I can receive and emit calls with TELNYX which use one of the 10 avaible numbers.

Then, I added this connection to PJSIP:

;TELNYX
[telnyx]
type=registration
outbound_auth=telnyx
server_uri=sip:DOMAIN
client_uri=sip:USERNAME@DOMAIN
retry_interval=5
fatal_retry_interval=5
forbidden_retry_interval=20
;auth_rejection_permanent=yes

[telnyx]
type=auth
auth_type=userpass
password=PASSWORD
username=USERNAME
;keep_alive_interval=20

[telnyx]
type=aor
contact=sip:DOMAIN
max_contacts=1
qualify_frequency=20
qualify_timeout=5

[telnyx]
type=endpoint
context=router
disallow=all
allow=alaw,ulaw;,slin,gsm,g729,g723
outbound_auth=telnyx
aors=telnyx
direct_media=yes
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
ice_support=yes
media_use_received_transport=yes

[telnyx]
type=identify
endpoint=telnyx
match=DOMAIN

Why, the originate commands does not work?

the PJSIP configuration is not good? I use the same for OVH numbers and it works…

Thanks a lot!!

You forgot the logs and the details of the Originate command.

Hi

await this.localChannel.originate({
endpoint: `PJSIP/NUMTOCALL@telnyx`,
  formats: this.opts.format, 
  extension: 's',
  context: 'incoming',  
  priority: 1,
  timeout: 30,
  app: this.ariAppname,
  callerId: 'ME',
  appArgs: 'dialed',
})

About the log, there is nothing instead of

Channel XXX joined ‘simple bridge’…
Channel XXX left ‘simple bridge’…

Connected to Asterisk 20.4.0 currently running on ip55 (pid = 1279)
ip55*CLI>
 Creating Stasis app 'externalMedia_MYID'
 Shutting down application 'externalMedia_LAST'
 Destroying Stasis app externalMedia_LAST
    -- Remove stasis-externalMedia_LAST/h/1, registrar=res_stasis; con=stasis-externalMedia_LAST(0x7f6004006080); con->root=0x7f6004006470
  == WebSocket connection from '127.0.0.1:45688' for protocol '' accepted using version '13'
    -- Remove stasis-externalMedia_LAST/_./1, registrar=res_stasis; con=stasis-externalMedia_LAST(0x7f6004006080); con->root=0x7f6004006470
    -- Called NUMTOCALL@telnyx
       > 0x7f6008018080 -- Strict RTP learning after remote address set to: 127.0.0.1:6900
    -- Called 127.0.0.1:6900
    -- UnicastRTP/127.0.0.1:6900-0x7f6008012b40 answered
       > Launching Stasis(externalMedia_MYID) on UnicastRTP/127.0.0.1:6900-0x7f6008012b40
    -- Channel Snoop/cd2fc7dd-f837-47a5-a5bc-ec05da7ef2d9-00000012 joined 'simple_bridge' stasis-bridge <d2df488c-348a-4a40-9123-44b4715ddc98>
    -- Channel Snoop/cd2fc7dd-f837-47a5-a5bc-ec05da7ef2d9-00000013 joined 'simple_bridge' stasis-bridge <78559588-347f-499b-8b21-d9b57848d896>
    -- Channel UnicastRTP/127.0.0.1:6900-0x7f6008012b40 joined 'simple_bridge' stasis-bridge <9972ceb0-58cb-4a78-9c64-4745141d8cdf>
    -- Channel UnicastRTP/127.0.0.1:6900-0x7f6008012b40 left 'simple_bridge' stasis-bridge <9972ceb0-58cb-4a78-9c64-4745141d8cdf>
    -- Channel UnicastRTP/127.0.0.1:6900-0x7f6008012b40 joined 'simple_bridge' stasis-bridge <d2df488c-348a-4a40-9123-44b4715ddc98>
    -- Channel Snoop/cd2fc7dd-f837-47a5-a5bc-ec05da7ef2d9-00000013 left 'simple_bridge' stasis-bridge <78559588-347f-499b-8b21-d9b57848d896>
 Deactivating Stasis app 'externalMedia_MYID'
  == WebSocket connection from '127.0.0.1:45688' closed
    -- Channel Snoop/cd2fc7dd-f837-47a5-a5bc-ec05da7ef2d9-00000012 left 'simple_bridge' stasis-bridge <d2df488c-348a-4a40-9123-44b4715ddc98>
    -- Channel UnicastRTP/127.0.0.1:6900-0x7f6008012b40 left 'simple_bridge' stasis-bridge <d2df488c-348a-4a40-9123-44b4715ddc98>

Thanks

In addition, from the asterisk CLI

originate PJSIP/MYNUMBER@OVH_SIP application Playback hello-world → originate the call
originate PJSIP/MYNUMBER@telnyx application Playback hello-world → do not originate the call
if I turn on pjsip logger, I have a D35 error and 403 “Caller Origination Number is Invalid”
For MYNUMBER I tried +336, 00336, 06…and always this error…

On Tuesday 05 March 2024 at 01:02:28, meirjdd via Asterisk Community wrote:

403 “Caller Origination Number is Invalid” For MYNUMBER I tried +336, 00336,
06…and always this error…

You need to ask your upstream provider what number/s, and in what format/s,
you have to present Caller ID for them to accept the call. We cannot know
this.

Antony.


RTFM may be the appropriate reply, but please specify exactly which FM to R.

                                               Please reply to the list;
                                                     please *don't* CC me.

Thanks! Using ARI I managed to specify the CallerID and it works
Thanks a lot

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