No RTP stream opens automatically


#1

I’m clearly missing something very simple. This is a new Asterisk box that I’m just learning on.

One upstream peer, no extensions. Very simple.

On this call, everything works perfectly (I hear the digits of the caller ID, then I’m connected to 61884708901):

  == Using SIP RTP CoS mark 5
       > 0x7f8b9400b830 -- Strict RTP learning after remote address set to: 139.99.XX.153:22262
    -- Executing [61870785310@in-from-mondotalk:1] Log("SIP/MondoTalkPeer-0000002a", "NOTICE, Receiving incoming call from 61404847356 to 61870785310") in new stack
    -- Executing [61870785310@in-from-mondotalk:2] Answer("SIP/MondoTalkPeer-0000002a", "") in new stack
    -- Executing [61870785310@in-from-mondotalk:3] SayDigits("SIP/MondoTalkPeer-0000002a", "61870785310,m") in new stack
    -- <SIP/MondoTalkPeer-0000002a> Playing 'digits/6.alaw' (language 'en')
       > 0x7f8b9400b830 -- Strict RTP switching to RTP target address 139.99.XX.153:22262 as source
    -- <SIP/MondoTalkPeer-0000002a> Playing 'digits/1.alaw' (language 'en')
       > 0x7f8b9400b830 -- Strict RTP learning complete - Locking on source address 139.99.XX.153:22262
    -- <SIP/MondoTalkPeer-0000002a> Playing 'digits/8.alaw' (language 'en')
    -- <SIP/MondoTalkPeer-0000002a> Playing 'digits/7.alaw' (language 'en')
    -- <SIP/MondoTalkPeer-0000002a> Playing 'digits/0.alaw' (language 'en')
    -- <SIP/MondoTalkPeer-0000002a> Playing 'digits/7.alaw' (language 'en')
    -- <SIP/MondoTalkPeer-0000002a> Playing 'digits/8.alaw' (language 'en')
    -- <SIP/MondoTalkPeer-0000002a> Playing 'digits/5.alaw' (language 'en')
    -- <SIP/MondoTalkPeer-0000002a> Playing 'digits/3.alaw' (language 'en')
    -- <SIP/MondoTalkPeer-0000002a> Playing 'digits/1.alaw' (language 'en')
    -- <SIP/MondoTalkPeer-0000002a> Playing 'digits/0.alaw' (language 'en')
    -- Executing [61870785310@in-from-mondotalk:4] SIPAddHeader("SIP/MondoTalkPeer-0000002a", "P-Asserted-Identity: <sip:61404847356>)") in new stack
    -- Executing [61870785310@in-from-mondotalk:5] Dial("SIP/MondoTalkPeer-0000002a", "SIP/MondoTalkPeer/61884708901,60") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/MondoTalkPeer/61884708901
    -- SIP/MondoTalkPeer-0000002b is ringing
       > 0x7f8c0c007120 -- Strict RTP learning after remote address set to: 139.99.XX.153:43030
    -- SIP/MondoTalkPeer-0000002b answered SIP/MondoTalkPeer-0000002a
    -- Channel SIP/MondoTalkPeer-0000002b joined 'simple_bridge' basic-bridge <769940fc-c2b1-480d-9b59-ddf0a6d3957f>
    -- Channel SIP/MondoTalkPeer-0000002a joined 'simple_bridge' basic-bridge <769940fc-c2b1-480d-9b59-ddf0a6d3957f>
       > Bridge 769940fc-c2b1-480d-9b59-ddf0a6d3957f: switching from simple_bridge technology to native_rtp
       > Locally RTP bridged 'SIP/MondoTalkPeer-0000002a' and 'SIP/MondoTalkPeer-0000002b' in stack
       > 0x7f8c0c007120 -- Strict RTP switching to RTP target address 139.99.XX.153:43030 as source
       > 0x7f8c0c007120 -- Strict RTP learning complete - Locking on source address 139.99.XX.153:43030
    -- Channel SIP/MondoTalkPeer-0000002a left 'native_rtp' basic-bridge <769940fc-c2b1-480d-9b59-ddf0a6d3957f>
    -- Channel SIP/MondoTalkPeer-0000002b left 'native_rtp' basic-bridge <769940fc-c2b1-480d-9b59-ddf0a6d3957f>
  == Spawn extension (in-from-mondotalk, 61870785310, 5) exited non-zero on 'SIP/MondoTalkPeer-0000002a'

The bit I don’t understand, is if I remove the SayDigits(${EXTEN},m) from the dial plan, everything still goes as expected, but I dont get connected to the external party…This is what I see:

 == Using SIP RTP CoS mark 5
       > 0x7f8b9400b830 -- Strict RTP learning after remote address set to: 103.77.233.187:29642
    -- Executing [61870785310@in-from-mondotalk:1] Log("SIP/MondoTalkPeer-00000032", "NOTICE, Receiving incoming call from 61404847356 to 61870785310") in new stack
    -- Executing [61870785310@in-from-mondotalk:2] Answer("SIP/MondoTalkPeer-00000032", "") in new stack
    -- Executing [61870785310@in-from-mondotalk:3] SIPAddHeader("SIP/MondoTalkPeer-00000032", "P-Asserted-Identity: <sip:61404847356>)") in new stack
    -- Executing [61870785310@in-from-mondotalk:4] Dial("SIP/MondoTalkPeer-00000032", "SIP/MondoTalkPeer/61884708901,60") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/MondoTalkPeer/61884708901
    -- SIP/MondoTalkPeer-00000033 is ringing
       > 0x7f8b9400b830 -- Strict RTP switching to RTP target address 103.77.233.187:29642 as source
       > 0x7f8b9400b830 -- Strict RTP learning complete - Locking on source address 103.77.233.187:29642
       > 0x7f8c18010390 -- Strict RTP learning after remote address set to: 35.189.35.225:18510
    -- SIP/MondoTalkPeer-00000033 answered SIP/MondoTalkPeer-00000032
    -- Channel SIP/MondoTalkPeer-00000033 joined 'simple_bridge' basic-bridge <eb8bf98c-3845-44fc-a825-cba17e3d67c7>
    -- Channel SIP/MondoTalkPeer-00000033 left 'simple_bridge' basic-bridge <eb8bf98c-3845-44fc-a825-cba17e3d67c7>
  == Spawn extension (in-from-mondotalk, 61870785310, 4) exited non-zero on 'SIP/MondoTalkPeer-00000032'

I see RTP packets going in both directions:

Sent RTP packet to      103.77.XX.187:48688 (type 08, seq 012349, ts 020160, len 000160)
Got  RTP packet from    103.77.XX.187:48688 (type 08, seq 023016, ts 3619535224, len 000160)
Sent RTP packet to      103.77.XX.187:48688 (type 08, seq 012350, ts 020320, len 000160)
Got  RTP packet from    103.77.XX.187:48688 (type 08, seq 023017, ts 3619535384, len 000160)

If I remove the Answer() and add Ringing() the call gets connected on the outbound leg, but no audio:

  == Using SIP RTP CoS mark 5
       > 0x7f8b9400b830 -- Strict RTP learning after remote address set to: 103.77.233.187:33898
    -- Executing [61870785310@in-from-mondotalk:1] Log("SIP/MondoTalkPeer-00000036", "NOTICE, Receiving incoming call from 61404847356 to 61870785310") in new stack
    -- Executing [61870785310@in-from-mondotalk:2] Ringing("SIP/MondoTalkPeer-00000036", "") in new stack
    -- Executing [61870785310@in-from-mondotalk:3] SIPAddHeader("SIP/MondoTalkPeer-00000036", "P-Asserted-Identity: <sip:61404847356>)") in new stack
    -- Executing [61870785310@in-from-mondotalk:4] Dial("SIP/MondoTalkPeer-00000036", "SIP/MondoTalkPeer/61884708901,60") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/MondoTalkPeer/61884708901
    -- SIP/MondoTalkPeer-00000037 is ringing
       > 0x7f8c2000da40 -- Strict RTP learning after remote address set to: 139.99.140.153:47610
    -- SIP/MondoTalkPeer-00000037 answered SIP/MondoTalkPeer-00000036
    -- Channel SIP/MondoTalkPeer-00000037 joined 'simple_bridge' basic-bridge <dabda734-ff99-489e-8ff2-ba4f7f89f54d>
    -- Channel SIP/MondoTalkPeer-00000036 joined 'simple_bridge' basic-bridge <dabda734-ff99-489e-8ff2-ba4f7f89f54d>
       > Bridge dabda734-ff99-489e-8ff2-ba4f7f89f54d: switching from simple_bridge technology to native_rtp
       > Locally RTP bridged 'SIP/MondoTalkPeer-00000036' and 'SIP/MondoTalkPeer-00000037' in stack
    -- Channel SIP/MondoTalkPeer-00000036 left 'native_rtp' basic-bridge <dabda734-ff99-489e-8ff2-ba4f7f89f54d>
    -- Channel SIP/MondoTalkPeer-00000037 left 'native_rtp' basic-bridge <dabda734-ff99-489e-8ff2-ba4f7f89f54d>
  == Spawn extension (in-from-mondotalk, 61870785310, 4) exited non-zero on 'SIP/MondoTalkPeer-00000036'

In that case there is no RTP traffic shown in debug mode.

Any guidance would be appreciated :slight_smile:


#2

What is your actual configuration in use? Do you have directmedia set to no?


#3

I’m not sure what the question means. But my config in sip.conf is:

[general]
register => uname:pwd@host

[MondoTalkPeer]
disallow=all
allow=alaw,ulaw,g729
username=uname
type=peer
secret=pwd
nat=yes
insecure=port,invite
host=host
fromuser=uname
fromdomain=host
dtmfmode=rfc2833
canreinvite=no
context=in-from-mondotalk
qualify=yes

#4

You have an obsolete name for directmedia set to no, so the answer is “yes”,


#5

Ah ok. Yep - I’ve just read about that. Those details were in the documentation for the trunk which is obliviously out of date.

Changing it to directmedia=yes and directmedia=no both results in the same thing though. Call goes out, and then hangs up.

= Using SIP RTP CoS mark 5
       > 0x7f7444006e10 -- Strict RTP learning after remote address set to: 101.0.XX.107:37944
    -- Executing [61870785310@in-from-mondotalk:1] Log("SIP/MondoTalkPeer-00000000", "NOTICE, Receiving incoming call from 61404847356 to 61870785310") in new stack
    -- Executing [61870785310@in-from-mondotalk:2] Answer("SIP/MondoTalkPeer-00000000", "") in new stack
    -- Executing [61870785310@in-from-mondotalk:3] Ringing("SIP/MondoTalkPeer-00000000", "") in new stack
    -- Executing [61870785310@in-from-mondotalk:4] SIPAddHeader("SIP/MondoTalkPeer-00000000", "P-Asserted-Identity: <sip:61404847356>)") in new stack
    -- Executing [61870785310@in-from-mondotalk:5] Dial("SIP/MondoTalkPeer-00000000", "SIP/MondoTalkPeer/61884708901,60") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/MondoTalkPeer/61884708901
    -- SIP/MondoTalkPeer-00000001 is ringing
       > 0x7f7444006e10 -- Strict RTP switching to RTP target address 101.0.XX.107:37944 as source
       > 0x7f7444006e10 -- Strict RTP learning complete - Locking on source address 101.0.XX.107:37944
       > 0x7f7444017890 -- Strict RTP learning after remote address set to: 139.99.XX.153:23654
    -- SIP/MondoTalkPeer-00000001 answered SIP/MondoTalkPeer-00000000
    -- Channel SIP/MondoTalkPeer-00000001 joined 'simple_bridge' basic-bridge <93988eda-153b-4964-8e15-8b7170741cb6>
    -- Channel SIP/MondoTalkPeer-00000000 joined 'simple_bridge' basic-bridge <93988eda-153b-4964-8e15-8b7170741cb6>
       > Bridge 93988eda-153b-4964-8e15-8b7170741cb6: switching from simple_bridge technology to native_rtp
       > Remotely bridged 'SIP/MondoTalkPeer-00000000' and 'SIP/MondoTalkPeer-00000001' - media will flow directly between them
    -- Channel SIP/MondoTalkPeer-00000001 left 'native_rtp' basic-bridge <93988eda-153b-4964-8e15-8b7170741cb6>
    -- Channel SIP/MondoTalkPeer-00000000 left 'native_rtp' basic-bridge <93988eda-153b-4964-8e15-8b7170741cb6>
  == Spawn extension (in-from-mondotalk, 61870785310, 5) exited non-zero on 'SIP/MondoTalkPeer-00000000'
       > 0x7f7444017890 -- Strict RTP learning after remote address set to: 139.99.XX.153:23654

#6

What is the output of “sip show peer MondoTalkPeer”? It really seems as though the configuration in the file doesn’t match what is in use.


#7
[general]
register => user:pwd@host

[MondoTalkPeer]
disallow=all
allow=alaw,ulaw,g729
username=user
type=peer
secret=pwd
nat=yes
insecure=port,invite
host=host
fromuser=user
fromdomain=host
dtmfmode=rfc2833
context=in-from-mondotalk
qualify=yes
directmedia=yes
localhost*CLI> sip show peer MondoTalkPeer


  * Name       : MondoTalkPeer
  Description  :
  Secret       : <Set>
  MD5Secret    : <Not set>
  Remote Secret: <Not set>
  Context      : in-from-mondotalk
  Record On feature : automon
  Record Off feature : automon
  Subscr.Cont. : <Not set>
  Language     :
  Tonezone     : <Not set>
  AMA flags    : Unknown
  Transfer mode: open
  CallingPres  : Presentation Allowed, Not Screened
  FromUser     : user
  FromDomain   : host Port 5060
  Callgroup    :
  Pickupgroup  :
  Named Callgr :
  Nam. Pickupgr:
  MOH Suggest  :
  Mailbox      :
  VM Extension : asterisk
  LastMsgsSent : 0/0
  Call limit   : 0
  Max forwards : 0
  Dynamic      : No
  Callerid     : "" <>
  MaxCallBR    : 384 kbps
  Expire       : -1
  Insecure     : port,invite
  Force rport  : Yes
  Symmetric RTP: Yes
  ACL          : No
  DirectMedACL : No
  T.38 support : No
  T.38 EC mode : Unknown
  T.38 MaxDtgrm: 4294967295
  DirectMedia  : Yes
  PromiscRedir : No
  User=Phone   : No
  Video Support: No
  Text Support : No
  Ign SDP ver  : No
  Trust RPID   : No
  Send RPID    : No
  Path support : No
  Path         : N/A
  TrustIDOutbnd: Legacy
  Subscriptions: Yes
  Overlap dial : Yes
  DTMFmode     : rfc2833
  Timer T1     : 500
  Timer B      : 32000
  ToHost       : host
  Addr->IP     : 35.XXX.47.13:5060
  Defaddr->IP  : (null)
  Prim.Transp. : UDP
  Allowed.Trsp : UDP
  Def. Username: user
  SIP Options  : replaces replace timer
  Codecs       : (alaw|ulaw|g729)
  Auto-Framing : No
  Status       : OK (36 ms)
  Useragent    :
  Reg. Contact :
  Qualify Freq : 60000 ms
  Keepalive    : 0 ms
  Sess-Timers  : Accept
  Sess-Refresh : uas
  Sess-Expires : 1800 secs
  Min-Sess     : 90 secs
  RTP Engine   : asterisk
  Parkinglot   :
  Use Reason   : No
  Encryption   : No
  RTCP Mux     : No

#8

You need to set “directmedia” to no.


#9

I’ve already tried both options. That gives the same result…

localhost*CLI> sip show peer MondoTalkPeer


  * Name       : MondoTalkPeer
  Description  :
  Secret       : <Set>
  MD5Secret    : <Not set>
  Remote Secret: <Not set>
  Context      : in-from-mondotalk
  Record On feature : automon
  Record Off feature : automon
  Subscr.Cont. : <Not set>
  Language     :
  Tonezone     : <Not set>
  AMA flags    : Unknown
  Transfer mode: open
  CallingPres  : Presentation Allowed, Not Screened
  FromUser     : user
  FromDomain   : host Port 5060
  Callgroup    :
  Pickupgroup  :
  Named Callgr :
  Nam. Pickupgr:
  MOH Suggest  :
  Mailbox      :
  VM Extension : asterisk
  LastMsgsSent : 0/0
  Call limit   : 0
  Max forwards : 0
  Dynamic      : No
  Callerid     : "" <>
  MaxCallBR    : 384 kbps
  Expire       : -1
  Insecure     : port,invite
  Force rport  : Yes
  Symmetric RTP: Yes
  ACL          : No
  DirectMedACL : No
  T.38 support : No
  T.38 EC mode : Unknown
  T.38 MaxDtgrm: 4294967295
  DirectMedia  : No
  PromiscRedir : No
  User=Phone   : No
  Video Support: No
  Text Support : No
  Ign SDP ver  : No
  Trust RPID   : No
  Send RPID    : No
  Path support : No
  Path         : N/A
  TrustIDOutbnd: Legacy
  Subscriptions: Yes
  Overlap dial : Yes
  DTMFmode     : rfc2833
  Timer T1     : 500
  Timer B      : 32000
  ToHost       : host
  Addr->IP     : 35.189.XX.13:5060
  Defaddr->IP  : (null)
  Prim.Transp. : UDP
  Allowed.Trsp : UDP
  Def. Username: user
  SIP Options  : (none)
  Codecs       : (alaw|ulaw|g729)
  Auto-Framing : No
  Status       : OK (27 ms)
  Useragent    :
  Reg. Contact :
  Qualify Freq : 60000 ms
  Keepalive    : 0 ms
  Sess-Timers  : Accept
  Sess-Refresh : uas
  Sess-Expires : 1800 secs
  Min-Sess     : 90 secs
  RTP Engine   : asterisk
  Parkinglot   :
  Use Reason   : No
  Encryption   : No
  RTCP Mux     : No

  == Using SIP RTP CoS mark 5
       > 0x7fac5c006ea0 -- Strict RTP learning after remote address set to: 139.99.XX.153:38452
    -- Executing [61870785310@in-from-mondotalk:1] Log("SIP/MondoTalkPeer-00000000", "NOTICE, Receiving incoming call from 61404847356 to 61870785310") in new stack
    -- Executing [61870785310@in-from-mondotalk:2] Answer("SIP/MondoTalkPeer-00000000", "") in new stack
    -- Executing [61870785310@in-from-mondotalk:3] Ringing("SIP/MondoTalkPeer-00000000", "") in new stack
    -- Executing [61870785310@in-from-mondotalk:4] SIPAddHeader("SIP/MondoTalkPeer-00000000", "P-Asserted-Identity: <sip:61404847356>)") in new stack
    -- Executing [61870785310@in-from-mondotalk:5] Dial("SIP/MondoTalkPeer-00000000", "SIP/MondoTalkPeer/61884708901,60") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/MondoTalkPeer/61884708901
    -- SIP/MondoTalkPeer-00000001 is ringing
       > 0x7fac5c006ea0 -- Strict RTP switching to RTP target address 139.99.XX.153:38452 as source
       > 0x7fac5c006ea0 -- Strict RTP learning complete - Locking on source address 139.99.XX.153:38452
       > 0x7faccc0110a0 -- Strict RTP learning after remote address set to: 101.0.XX.109:43562
    -- SIP/MondoTalkPeer-00000001 answered SIP/MondoTalkPeer-00000000
    -- Channel SIP/MondoTalkPeer-00000001 joined 'simple_bridge' basic-bridge <841f3aa0-902f-49cd-a131-ca6bdcc0e5dd>
    -- Channel SIP/MondoTalkPeer-00000000 joined 'simple_bridge' basic-bridge <841f3aa0-902f-49cd-a131-ca6bdcc0e5dd>
       > Bridge 841f3aa0-902f-49cd-a131-ca6bdcc0e5dd: switching from simple_bridge technology to native_rtp
       > Locally RTP bridged 'SIP/MondoTalkPeer-00000000' and 'SIP/MondoTalkPeer-00000001' in stack
    -- Channel SIP/MondoTalkPeer-00000001 left 'native_rtp' basic-bridge <841f3aa0-902f-49cd-a131-ca6bdcc0e5dd>
    -- Channel SIP/MondoTalkPeer-00000000 left 'native_rtp' basic-bridge <841f3aa0-902f-49cd-a131-ca6bdcc0e5dd>
  == Spawn extension (in-from-mondotalk, 61870785310, 5) exited non-zero on 'SIP/MondoTalkPeer-00000000'


#10

Well I feel a bit foolish, but in the interest of anyone having this problem - for me, it was my firewall. Which I thought I’d ruled out.

I’d configured SIP and RTP ports on our external firewall, but forgot about firewalld on the actual asterisk server itself. tcmpdump was what gave me the pointer in the right direction.

Thanks for your help jcolp. At least I learned a few things along the way.