Quantcast
Channel: Asterisk Forums
Viewing all articles
Browse latest Browse all 7460

*13.4-SIP- no early media even after 183 Session Progress

$
0
0
chan_sip.c --> sip_write() --> case AST_FRAME_VOICE:

i have added following lines to debug

Code:                 if (p) {
                        sip_pvt_lock(p);
                        if (p->t38.state == T38_ENABLED) {
                                /* drop frame, can't sent VOICE frames while in T.38 mode */
                                sip_pvt_unlock(p);
                                break;
                        } else if (p->rtp) {
                                /* If channel is not up, activate early media session */
                                if ((ast_channel_state(ast) != AST_STATE_UP) &&
                                    !ast_test_flag(&p->flags[0], SIP_PROGRESS_SENT) &&
                                    !ast_test_flag(&p->flags[0], SIP_OUTGOING)) {
                                        ast_rtp_instance_update_source(p->rtp);
                                        if (!global_prematuremediafilter) {

ast_verbose(" ::::: activating early media session\r\n");

                                                p->invitestate = INV_EARLY_MEDIA;
                                                transmit_provisional_response(p, "183 Session Progress", &p->initreq, TRUE);
                                                ast_set_flag(&p->flags[0], SIP_PROGRESS_SENT);
                                        }
                                }
                                if (p->invitestate > INV_EARLY_MEDIA || (p->invitestate == INV_EARLY_MEDIA &&
                                                                         ast_test_flag(&p->flags[0], SIP_PROGRESS_SENT))) {

ast_verbose(" ::::: early media session already activated\r\n");

                                        p->lastrtptx = time(NULL);
                                        res = ast_rtp_instance_write(p->rtp, frame);
                                }
                        }
                        sip_pvt_unlock(p);
                }


and below is the output

Code: <--- SIP read from UDP:remote_SIP_IP:5060 --->
INVITE tel:99966;phone-context=unknown SIP/2.0
Content-Length:1060
From:<tel:+96597834852>;tag=7dfBXeCeDeie8i5d
To:<tel:99966;phone-context=unknown>
Via:SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKA9i_Wi0CD1h6V7U7
Call-ID:2D3C3078FB3FE294ABB244D2@6443ffffffff
CSeq:1 INVITE
Max-Forwards:70
Route:<sip:my_SIP_IP:5060;lr>
Record-Route:<sip:AAQAAZK5DAAAvAAAAvQAAfHoK@remote_SIP_IP:5060;lr>
Request-Disposition:no-fork
P-Asserted-Identity:<sip:+96597834852@remote_host;user=phone>,<tel:+96597834852>
Session-Expires:1800;refresher=uac
Contact:sip:remote_SIP_IP:5060
Supported:100rel,timer
Allow:ACK,BYE,CANCEL,INFO,INVITE,OPTIONS,PRACK,UPDATE
P-Charging-Vector:icid-value=aZWWkCQrIoQZAAAAFg7MBWRDShY-;icid-generated-at=remote_SIP_IP;orig-ioi=remote_host
P-Early-Media:supported
Content-Type:multipart/mixed;boundary=BF106AA6F14C1CC2663A7F00
MIME-Version:1.0

--BF106AA6F14C1CC2663A7F00
Content-Type:application/sdp
Content-Disposition:session;handling=required

v=0
o=- 0 0 IN IP4 remote_sdp_owner
s=-
c=IN IP4 remote_media_IP
t=0 0
m=audio 6222 RTP/AVP 96 97 98 99 100 101 102 8 103
b=AS:80
a=rtpmap:96 AMR/8000
a=fmtp:96 mode-set=0,2,4,7; mode-change-period=2; mode-change-neighbor=1; max-red=0
a=rtpmap:97 AMR/8000
a=fmtp:97 mode-set=7; max-red=0
a=rtpmap:98 AMR/8000
a=fmtp:98 mode-set=0,2; mode-change-period=2; mode-change-neighbor=1; max-red=0
a=rtpmap:99 AMR/8000
a=fmtp:99 mode-set=4; max-red=0
a=rtpmap:100 AMR/8000
a=fmtp:100 mode-set=2; max-red=0
a=rtpmap:101 AMR/8000
a=fmtp:101 mode-set=0; max-red=0
a=rtpmap:102 GSM-EFR/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:103 telephone-event/8000
a=ptime:20
a=maxptime:20
a=3gOoBTC

--BF106AA6F14C1CC2663A7F00
Content-Type:application/ISUP;base=itu-t92+;version=itu-t92+
Content-Disposition:signal;handling=required
Content-Transfer-Encoding:binary


<------------->
--- (20 headers 36 lines) ---
Sending to remote_SIP_IP:5060 (no NAT)
Sending to remote_SIP_IP:5060 (no NAT)
Using INVITE request as basis request - 2D3C3078FB3FE294ABB244D2@6443ffffffff
Found peer 'incoming' for '+96597834852' from remote_SIP_IP:5060
  == Using SIP RTP CoS mark 5
Looking for 99966 in default (domain )
sip_route_dump: route/path hop: <sip:AAQAAZK5DAAAvAAAAvQAAfHoK@remote_SIP_IP:5060;lr>

<--- Transmitting (no NAT) to remote_SIP_IP:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKA9i_Wi0CD1h6V7U7;received=remote_SIP_IP
Record-Route: <sip:AAQAAZK5DAAAvAAAAvQAAfHoK@remote_SIP_IP:5060;lr>
From: <tel:+96597834852>;tag=7dfBXeCeDeie8i5d
To: <tel:99966;phone-context=unknown>
Call-ID: 2D3C3078FB3FE294ABB244D2@6443ffffffff
CSeq: 1 INVITE
Server: DN_SIP_01
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uac
Contact: <sip:99966@my_SIP_IP:5060>
Content-Length: 0


<------------>
    -- Executing [99966@default:1] GotoIf("SIP/incoming-00000000", "0?dblookup") in new stack
    -- Executing [99966@default:2] Goto("SIP/incoming-00000000", "Rock_DN,99966,1") in new stack
    -- Goto (Rock_DN,99966,1)
    -- Executing [99966@Rock_DN:1] Goto("SIP/incoming-00000000", "noanswer_demo,s,1") in new stack
    -- Goto (noanswer_demo,s,1)
    -- Executing [s@noanswer_demo:1] Progress("SIP/incoming-00000000", "") in new stack
AST_CONTROL_PROGRESS | transmit_provisional_response | 183 Session Progress
::::: p->flags[1]:268447744 |SIP_PAGE2_CALL_ONHOLD:1572864 |SIP_PAGE2_CALL_ONHOLD_ONEDIR:1048576 |SIP_PAGE2_CALL_ONHOLD_INACTIVE:1572864
Audio is at 12850
Adding codec alaw to SDP
Adding codec ulaw to SDP
Adding codec gsm to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Transmitting (no NAT) to remote_SIP_IP:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKA9i_Wi0CD1h6V7U7;received=remote_SIP_IP
Record-Route: <sip:AAQAAZK5DAAAvAAAAvQAAfHoK@remote_SIP_IP:5060;lr>
From: <tel:+96597834852>;tag=7dfBXeCeDeie8i5d
To: <tel:99966;phone-context=unknown>;tag=as5b007325
Call-ID: 2D3C3078FB3FE294ABB244D2@6443ffffffff
CSeq: 1 INVITE
Server: DN_SIP_01
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uac
Contact: <sip:99966@my_SIP_IP:5060>
Content-Type: application/sdp
Require: timer
Content-Length: 289

v=0
o=DNIVR01 1453293019 1453293019 IN IP4 my_SIP_IP
s=DNIVR01
c=IN IP4 my_SIP_IP
t=0 0
m=audio 12850 RTP/AVP 8 0 3 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<------------>
    -- Executing [s@noanswer_demo:2] Monitor("SIP/incoming-00000000", "wav,testCall-201508251033") in new stack
    -- Executing [s@noanswer_demo:3] BackGround("SIP/incoming-00000000", "hello-world, n") in new stack
::::: early media session already activated
    -- <SIP/incoming-00000000> Playing 'hello-world.gsm' (language 'en')
::::: early media session already activated
::::: early media session already activated
.
.
.
::::: early media session already activated
::::: early media session already activated
    -- Executing [s@noanswer_demo:4] WaitExten("SIP/incoming-00000000", "1") in new stack
    -- Timeout on SIP/incoming-00000000, continuing...
    -- Executing [s@noanswer_demo:5] Playback("SIP/incoming-00000000", "hello-world, noanswer") in new stack
::::: early media session already activated
    -- <SIP/incoming-00000000> Playing 'hello-world.gsm' (language 'en')
::::: early media session already activated
::::: early media session already activated
.
.
.
::::: early media session already activated
::::: early media session already activated
    -- Executing [s@noanswer_demo:6] Wait("SIP/incoming-00000000", "1") in new stack
    -- Executing [s@noanswer_demo:7] Playback("SIP/incoming-00000000", "hello-world") in new stack
::::: p->flags[1]:268447744 |SIP_PAGE2_CALL_ONHOLD:1572864 |SIP_PAGE2_CALL_ONHOLD_ONEDIR:1048576 |SIP_PAGE2_CALL_ONHOLD_INACTIVE:1572864
Audio is at 12850
Adding codec alaw to SDP
Adding codec ulaw to SDP
Adding codec gsm to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (no NAT) to remote_SIP_IP:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKA9i_Wi0CD1h6V7U7;received=remote_SIP_IP
Record-Route: <sip:AAQAAZK5DAAAvAAAAvQAAfHoK@remote_SIP_IP:5060;lr>
From: <tel:+96597834852>;tag=7dfBXeCeDeie8i5d
To: <tel:99966;phone-context=unknown>;tag=as5b007325
Call-ID: 2D3C3078FB3FE294ABB244D2@6443ffffffff
CSeq: 1 INVITE
Server: DN_SIP_01
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uac
Contact: <sip:99966@my_SIP_IP:5060>
Content-Type: application/sdp
Require: timer
Content-Length: 289

v=0
o=DNIVR01 1453293019 1453293019 IN IP4 my_SIP_IP
s=DNIVR01
c=IN IP4 my_SIP_IP
t=0 0
m=audio 12850 RTP/AVP 8 0 3 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<------------>

<--- SIP read from UDP:remote_SIP_IP:5060 --->
ACK sip:99966@my_SIP_IP:5060 SIP/2.0
Content-Length:0
From:<tel:+96597834852>;tag=7dfBXeCeDeie8i5d
To:<tel:99966;phone-context=unknown>;tag=as5b007325
Via:SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKWb_hc0iY4Z8eV12U
Call-ID:2D3C3078FB3FE294ABB244D2@6443ffffffff
CSeq:1 ACK
Max-Forwards:70
Request-Disposition:no-fork

<------------->
--- (9 headers 0 lines) ---

<--- SIP read from UDP:remote_SIP_IP:5060 --->
INVITE sip:99966@my_SIP_IP:5060 SIP/2.0
Content-Length:188
From:<tel:+96597834852>;tag=7dfBXeCeDeie8i5d
To:<tel:99966;phone-context=unknown>;tag=as5b007325
Via:SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKUXD8i_jUhaadah75
Call-ID:2D3C3078FB3FE294ABB244D2@6443ffffffff
CSeq:2 INVITE
Max-Forwards:70
Record-Route:<sip:AAQAAZK5DAAAvAAAAvQAAfHoK@remote_SIP_IP:5060;lr>
Request-Disposition:no-fork
Session-Expires:1800;refresher=uac
Contact:sip:remote_SIP_IP:5060
Supported:timer
Allow:ACK,BYE,CANCEL,INFO,INVITE,OPTIONS,PRACK,UPDATE
P-Charging-Vector:icid-value=aZWWkCQrIoQZAAAAFg7MBWRDShY-;icid-generated-at=remote_SIP_IP;orig-ioi=remote_host
Content-Type:application/sdp
Content-Disposition:session;handling=required

v=0
o=- 0 1 IN IP4 remote_sdp_owner
s=-
c=IN IP4 remote_media_IP
t=0 0
m=audio 6222 RTP/AVP 8 101
b=AS:80
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=ptime:20
a=maxptime:20
<------------->
--- (17 headers 11 lines) ---
Sending to remote_SIP_IP:5060 (no NAT)
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - (alaw|ulaw|gsm), peer - audio=(alaw)/video=(nothing)/text=(nothing), combined - (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port remote_media_IP:6222

<--- Transmitting (no NAT) to remote_SIP_IP:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKUXD8i_jUhaadah75;received=remote_SIP_IP
Record-Route: <sip:AAQAAZK5DAAAvAAAAvQAAfHoK@remote_SIP_IP:5060;lr>
From: <tel:+96597834852>;tag=7dfBXeCeDeie8i5d
To: <tel:99966;phone-context=unknown>;tag=as5b007325
Call-ID: 2D3C3078FB3FE294ABB244D2@6443ffffffff
CSeq: 2 INVITE
Server: DN_SIP_01
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uac
Contact: <sip:99966@my_SIP_IP:5060>
Content-Length: 0


<------------>
::::: p->flags[1]:276836352 |SIP_PAGE2_CALL_ONHOLD:1572864 |SIP_PAGE2_CALL_ONHOLD_ONEDIR:1048576 |SIP_PAGE2_CALL_ONHOLD_INACTIVE:1572864
Audio is at 12850
Adding codec alaw to SDP
Adding codec ulaw to SDP
Adding codec gsm to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (no NAT) to remote_SIP_IP:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKUXD8i_jUhaadah75;received=remote_SIP_IP
Record-Route: <sip:AAQAAZK5DAAAvAAAAvQAAfHoK@remote_SIP_IP:5060;lr>
From: <tel:+96597834852>;tag=7dfBXeCeDeie8i5d
To: <tel:99966;phone-context=unknown>;tag=as5b007325
Call-ID: 2D3C3078FB3FE294ABB244D2@6443ffffffff
CSeq: 2 INVITE
Server: DN_SIP_01
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uac
Contact: <sip:99966@my_SIP_IP:5060>
Content-Type: application/sdp
Require: timer
Content-Length: 289

v=0
o=DNIVR01 1453293019 1453293020 IN IP4 my_SIP_IP
s=DNIVR01
c=IN IP4 my_SIP_IP
t=0 0
m=audio 12850 RTP/AVP 8 0 3 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<------------>

<--- SIP read from UDP:remote_SIP_IP:5060 --->
ACK sip:99966@my_SIP_IP:5060 SIP/2.0
Content-Length:0
From:<tel:+96597834852>;tag=7dfBXeCeDeie8i5d
To:<tel:99966;phone-context=unknown>;tag=as5b007325
Via:SIP/2.0/UDP remote_domain:5060;branch=z9hG4bK4.7c1d3236.404hC
Call-ID:2D3C3078FB3FE294ABB244D2@6443ffffffff
CSeq:2 ACK
Max-Forwards:70
Request-Disposition:no-fork

<------------->
--- (9 headers 0 lines) ---
::::: early media session already activated
Sent RTP packet to      remote_media_IP:6222 (type 08, seq 051695, ts 000160, len 000160)
    -- <SIP/incoming-00000000> Playing 'hello-world.gsm' (language 'en')
::::: early media session already activated
Sent RTP packet to      remote_media_IP:6222 (type 08, seq 051696, ts 000320, len 000160)
::::: early media session already activated
Sent RTP packet to      remote_media_IP:6222 (type 08, seq 051697, ts 000480, len 000160)
.
.
.
::::: early media session already activated
Sent RTP packet to      remote_media_IP:6222 (type 08, seq 051765, ts 011360, len 000160)
::::: early media session already activated
Sent RTP packet to      remote_media_IP:6222 (type 08, seq 051766, ts 011520, len 000160)

<--- SIP read from UDP:remote_SIP_IP:5060 --->
BYE sip:99966@my_SIP_IP:5060 SIP/2.0
Content-Length:6
From:<tel:+96597834852>;tag=7dfBXeCeDeie8i5d
To:<tel:99966;phone-context=unknown>;tag=as5b007325
Via:SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKBAVdUYUj7DC5.c1.
Call-ID:2D3C3078FB3FE294ABB244D2@6443ffffffff
CSeq:3 BYE
Max-Forwards:70
Request-Disposition:no-fork
Supported:timer
Reason:X.int ;reasoncode=0x00000000;add-info=0132.0001.0B2E
Reason:Q.850 ;cause=16
Content-Type:application/ISUP;base=itu-t92+;version=itu-t92+
Content-Disposition:signal;handling=required
Content-Transfer-Encoding:binary



<------------->
--- (15 headers 1 lines) ---
Sending to remote_SIP_IP:5060 (no NAT)
Scheduling destruction of SIP dialog '2D3C3078FB3FE294ABB244D2@6443ffffffff' in 32000 ms (Method: BYE)

<--- Transmitting (no NAT) to remote_SIP_IP:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKBAVdUYUj7DC5.c1.;received=remote_SIP_IP
From: <tel:+96597834852>;tag=7dfBXeCeDeie8i5d
To: <tel:99966;phone-context=unknown>;tag=as5b007325
Call-ID: 2D3C3078FB3FE294ABB244D2@6443ffffffff
CSeq: 3 BYE
Server: DN_SIP_01
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>
    -- Executing [h@noanswer_demo:1] Goto("SIP/incoming-00000000", "obd_example_hangup,1") in new stack
    -- Goto (noanswer_demo,obd_example_hangup,1)



Statistics : Posted by usmanbaiga • on Mon Aug 24, 2015 3:31 pm • Replies 5 • Views 293

Viewing all articles
Browse latest Browse all 7460

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>