Webrtc Socket disconnect automatically after call end in Asterisk Queue

204 views
Skip to first unread message

Virendra Bhati

unread,
Jul 8, 2021, 8:13:06 AM7/8/21
to discuss-doubango
Dear Team,
We are able to make dialout calls without issue. We are facing issue in Inbound call when we want call ring to Agent(WebRTC user).
Incoming Call are working and Agent number is ringing but after Answer and call Hangup by caller OR Agent didn't pick the call then WebRTC socket is disconnected automatically.

1) We added WebRTC user into Queue as Dynamic Agent,
2) After Call end ot No Answer WebRTC REGISTER packet is send with expire=0

Please check attached image for call-flow..

Call Logs
   -- Executing [4589883136@inbound:1] Verbose("SIP/95.211.119.240-000019ae", "2,Got incoming call from "" <4588917686> to 4589883136 ") in new stack
  == Got incoming call from "" <4588917686> to 4589883136
    -- Executing [4589883136@inbound:2] Set("SIP/95.211.119.240-000019ae", "__CLR=4588917686") in new stack
    -- Executing [4589883136@inbound:3] Set("SIP/95.211.119.240-000019ae", "__CLRchannel=SIP/95.211.119.240-000019ae") in new stack
    -- Executing [4589883136@inbound:4] AGI("SIP/95.211.119.240-000019ae", "agi/did_inbound.php") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/agi/did_inbound.php
    -- AGI Script Executing Application: (VERBOSE) Options: (DEBUG: AGI: Initialized! [/var/www/html/agi/connector.ini])
DEBUG: AGI: Initialized! [/var/www/html/agi/connector.ini]
    -- AGI Script Executing Application: (Ringing) Options: ()
    -- AGI Script Executing Application: (VERBOSE) Options: (DEBUG: ARI: Initialized! [/var/www/html/agi/connector.ini])
DEBUG: ARI: Initialized! [/var/www/html/agi/connector.ini]
    -- AGI Script Executing Application: (VERBOSE) Options: (DEBUG:  SIP PEER: 7676235294 / offline)
DEBUG:  SIP PEER: 7676235294 / offline
    -- AGI Script Executing Application: (VERBOSE) Options: (DEBUG:  SIP PEER: 1549509352 / offline)
DEBUG:  SIP PEER: 1549509352 / offline
    -- AGI Script Executing Application: (VERBOSE) Options: (DEBUG:  SIP PEER: 2385102177 / online)
DEBUG:  SIP PEER: 2385102177 / online
    -- AGI Script Executing Application: (VERBOSE) Options: (DEBUG:  SIP PEER: 5798002951 / offline)
DEBUG:  SIP PEER: 5798002951 / offline
    -- AGI Script Executing Application: (VERBOSE) Options: (DEBUG:  SIP PEER: 0855320465 / online)
DEBUG:  SIP PEER: 0855320465 / online
    -- AGI Script Executing Application: (VERBOSE) Options: (DEBUG:  DO:[agents_all] Having total: 5 users/2 Online  Primary Agent: SIP:2385102177)
DEBUG:  DO:[agents_all] Having total: 5 users/2 Online  Primary Agent: SIP:2385102177
    -- AGI Script Executing Application: (Dial) Options: (SIP/2385102177&SIP/0855320465,60)
  == DTLS ECDH initialized (automatic), faster PFS enabled
  == Using SIP RTP CoS mark 5
  == DTLS ECDH initialized (automatic), faster PFS enabled
  == Using SIP RTP CoS mark 5
    -- Called SIP/2385102177
    -- Called SIP/0855320465
    -- SIP/0855320465-000019b0 is ringing
       > 0x7faa40824a10 -- Strict RTP switching to RTP target address 81.201.83.59:18102 as source
    -- SIP/2385102177-000019af is ringing
    -- SIP/0855320465-000019b0 answered SIP/95.211.119.240-000019ae
    -- Channel SIP/0855320465-000019b0 joined 'simple_bridge' basic-bridge <f15b68b3-72c4-44c9-9488-a4948fa3297d>
    -- Channel SIP/95.211.119.240-000019ae joined 'simple_bridge' basic-bridge <f15b68b3-72c4-44c9-9488-a4948fa3297d>
       > 0x7faa480b49b0 -- Strict RTP learning after ICE completion
       > 0x7faa480b49b0 -- Strict RTP learning after remote address set to: 188.166.157.195:55305
       > 0x7faa480b49b0 -- Strict RTP switching to RTP target address 188.166.157.195:55305 as source
       > 0x7faa40824a10 -- Strict RTP learning complete - Locking on source address 81.201.83.59:18102
       > 0x7faa480b49b0 -- Strict RTP learning complete - Locking on source address 188.166.157.195:55305
[Jul  8 08:58:14] WARNING[1852]: chan_sip.c:4151 retrans_pkt: Timeout on 4507953417959378...@x.x.x.x:5060 on non-critical invite transaction.
    -- Channel SIP/95.211.119.240-000019ae left 'simple_bridge' basic-bridge <f15b68b3-72c4-44c9-9488-a4948fa3297d>
    -- <SIP/95.211.119.240-000019ae>AGI Script agi/did_inbound.php completed, returning 4
  == Spawn extension (inbound, 4589883136, 4) exited non-zero on 'SIP/95.211.119.240-000019ae'
    -- Executing [h@inbound:1] NoOp("SIP/95.211.119.240-000019ae", ""Please put your hangup logic here [QUEUE] = "") in new stack
    -- Channel SIP/0855320465-000019b0 left 'simple_bridge' basic-bridge <f15b68b3-72c4-44c9-9488-a4948fa3297d>
    -- Unregistered SIP '0855320465'



issue.jpg

Virendra Bhati

unread,
Jul 30, 2021, 12:38:20 PM7/30/21
to discuss-doubango
After a lot of code review issue found at my custom JS of Call handling. Issue fixed.. It's was not related to SIPML5 at all.  
Reply all
Reply to author
Forward
0 new messages