S
S
Stepan2018-03-27 23:31:09
Asterisk
Stepan, 2018-03-27 23:31:09

How to change the address to external instead of local in a bunch of Asterisk and JsSIP?

There is Asterisk which calls perfectly through the test service from JsSIP

== DTLS ECDH initialized (automatic), faster PFS enabled
  == Using SIP RTP CoS mark 5
       > 0x7fdafc01dad0 -- Strict RTP learning after remote address set to: :52920
    -- Executing [[email protected]:1] Answer("SIP/199-00000008", "") in new stack
       > 0x7fdafc01dad0 -- Strict RTP learning after ICE completion
       > 0x7fdafc01dad0 -- Strict RTP switching to RTP target address :1150 as source
    -- Executing [[email protected]:2] Playback("SIP/199-00000008", "demo-congrats") in new stack
    -- <SIP/199-00000008> Playing 'demo-congrats.slin' (language 'ru')
    -- Executing [[email protected]:3] Hangup("SIP/199-00000007", "") in new stack
  == Spawn extension (default, 200, 3) exited non-zero on 'SIP/199-00000007'

But when I try to call through this script using my website, the
log changes to the following
== DTLS ECDH initialized (automatic), faster PFS enabled
  == Using SIP RTP CoS mark 5
       > 0x7fdaf0019540 -- Strict RTP learning after remote address set to: [[мой внутренний! IP]]:55849
    -- Executing [[email protected]:1] Answer("SIP/199-00000009", "") in new stack
       > 0x7fdaf0019540 -- Strict RTP learning after ICE completion
    -- Executing [[email protected]:2] Playback("SIP/199-00000009", "demo-congrats") in new stack
    -- <SIP/199-00000009> Playing 'demo-congrats.slin' (language 'ru')
       > 0x7fdaf0019540 -- Strict RTP switching to RTP target address :55849 as source
       > 0x7fdaf0019540 -- Strict RTP learning complete - Locking on source address :55849
    -- Executing [[email protected]:3] Hangup("SIP/199-00000009", "") in new stack
  == Spawn extension (default, 200, 3) exited non-zero on 'SIP/199-00000009'

What could be the difference that two external services give different results? why in one case the external IP is substituted and in the other internal?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question