$ 0 0 chan_sip.c --> sip_write() --> case AST_FRAME_VOICE:i have added following lines to debugCode: 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.0Content-Length:1060From:<tel:+96597834852>;tag=7dfBXeCeDeie8i5dTo:<tel:99966;phone-context=unknown>Via:SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKA9i_Wi0CD1h6V7U7Call-ID:2D3C3078FB3FE294ABB244D2@6443ffffffffCSeq:1 INVITEMax-Forwards:70Route:<sip:my_SIP_IP:5060;lr>Record-Route:<sip:AAQAAZK5DAAAvAAAAvQAAfHoK@remote_SIP_IP:5060;lr>Request-Disposition:no-forkP-Asserted-Identity:<sip:+96597834852@remote_host;user=phone>,<tel:+96597834852>Session-Expires:1800;refresher=uacContact:sip:remote_SIP_IP:5060Supported:100rel,timerAllow:ACK,BYE,CANCEL,INFO,INVITE,OPTIONS,PRACK,UPDATEP-Charging-Vector:icid-value=aZWWkCQrIoQZAAAAFg7MBWRDShY-;icid-generated-at=remote_SIP_IP;orig-ioi=remote_hostP-Early-Media:supportedContent-Type:multipart/mixed;boundary=BF106AA6F14C1CC2663A7F00MIME-Version:1.0--BF106AA6F14C1CC2663A7F00Content-Type:application/sdpContent-Disposition:session;handling=requiredv=0o=- 0 0 IN IP4 remote_sdp_owners=-c=IN IP4 remote_media_IPt=0 0m=audio 6222 RTP/AVP 96 97 98 99 100 101 102 8 103b=AS:80a=rtpmap:96 AMR/8000a=fmtp:96 mode-set=0,2,4,7; mode-change-period=2; mode-change-neighbor=1; max-red=0a=rtpmap:97 AMR/8000a=fmtp:97 mode-set=7; max-red=0a=rtpmap:98 AMR/8000a=fmtp:98 mode-set=0,2; mode-change-period=2; mode-change-neighbor=1; max-red=0a=rtpmap:99 AMR/8000a=fmtp:99 mode-set=4; max-red=0a=rtpmap:100 AMR/8000a=fmtp:100 mode-set=2; max-red=0a=rtpmap:101 AMR/8000a=fmtp:101 mode-set=0; max-red=0a=rtpmap:102 GSM-EFR/8000a=rtpmap:8 PCMA/8000a=rtpmap:103 telephone-event/8000a=ptime:20a=maxptime:20a=3gOoBTC--BF106AA6F14C1CC2663A7F00Content-Type:application/ISUP;base=itu-t92+;version=itu-t92+Content-Disposition:signal;handling=requiredContent-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@6443ffffffffFound peer 'incoming' for '+96597834852' from remote_SIP_IP:5060 == Using SIP RTP CoS mark 5Looking 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 TryingVia: SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKA9i_Wi0CD1h6V7U7;received=remote_SIP_IPRecord-Route: <sip:AAQAAZK5DAAAvAAAAvQAAfHoK@remote_SIP_IP:5060;lr>From: <tel:+96597834852>;tag=7dfBXeCeDeie8i5dTo: <tel:99966;phone-context=unknown>Call-ID: 2D3C3078FB3FE294ABB244D2@6443ffffffffCSeq: 1 INVITEServer: DN_SIP_01Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGESupported: replaces, timerSession-Expires: 1800;refresher=uacContact: <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 stackAST_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 12850Adding codec alaw to SDPAdding codec ulaw to SDPAdding codec gsm to SDPAdding non-codec 0x1 (telephone-event) to SDP<--- Transmitting (no NAT) to remote_SIP_IP:5060 --->SIP/2.0 183 Session ProgressVia: SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKA9i_Wi0CD1h6V7U7;received=remote_SIP_IPRecord-Route: <sip:AAQAAZK5DAAAvAAAAvQAAfHoK@remote_SIP_IP:5060;lr>From: <tel:+96597834852>;tag=7dfBXeCeDeie8i5dTo: <tel:99966;phone-context=unknown>;tag=as5b007325Call-ID: 2D3C3078FB3FE294ABB244D2@6443ffffffffCSeq: 1 INVITEServer: DN_SIP_01Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGESupported: replaces, timerSession-Expires: 1800;refresher=uacContact: <sip:99966@my_SIP_IP:5060>Content-Type: application/sdpRequire: timerContent-Length: 289v=0o=DNIVR01 1453293019 1453293019 IN IP4 my_SIP_IPs=DNIVR01c=IN IP4 my_SIP_IPt=0 0m=audio 12850 RTP/AVP 8 0 3 101a=rtpmap:8 PCMA/8000a=rtpmap:0 PCMU/8000a=rtpmap:3 GSM/8000a=rtpmap:101 telephone-event/8000a=fmtp:101 0-16a=ptime:20a=maxptime:150a=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 12850Adding codec alaw to SDPAdding codec ulaw to SDPAdding codec gsm to SDPAdding non-codec 0x1 (telephone-event) to SDP<--- Reliably Transmitting (no NAT) to remote_SIP_IP:5060 --->SIP/2.0 200 OKVia: SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKA9i_Wi0CD1h6V7U7;received=remote_SIP_IPRecord-Route: <sip:AAQAAZK5DAAAvAAAAvQAAfHoK@remote_SIP_IP:5060;lr>From: <tel:+96597834852>;tag=7dfBXeCeDeie8i5dTo: <tel:99966;phone-context=unknown>;tag=as5b007325Call-ID: 2D3C3078FB3FE294ABB244D2@6443ffffffffCSeq: 1 INVITEServer: DN_SIP_01Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGESupported: replaces, timerSession-Expires: 1800;refresher=uacContact: <sip:99966@my_SIP_IP:5060>Content-Type: application/sdpRequire: timerContent-Length: 289v=0o=DNIVR01 1453293019 1453293019 IN IP4 my_SIP_IPs=DNIVR01c=IN IP4 my_SIP_IPt=0 0m=audio 12850 RTP/AVP 8 0 3 101a=rtpmap:8 PCMA/8000a=rtpmap:0 PCMU/8000a=rtpmap:3 GSM/8000a=rtpmap:101 telephone-event/8000a=fmtp:101 0-16a=ptime:20a=maxptime:150a=sendrecv<------------><--- SIP read from UDP:remote_SIP_IP:5060 --->ACK sip:99966@my_SIP_IP:5060 SIP/2.0Content-Length:0From:<tel:+96597834852>;tag=7dfBXeCeDeie8i5dTo:<tel:99966;phone-context=unknown>;tag=as5b007325Via:SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKWb_hc0iY4Z8eV12UCall-ID:2D3C3078FB3FE294ABB244D2@6443ffffffffCSeq:1 ACKMax-Forwards:70Request-Disposition:no-fork<------------->--- (9 headers 0 lines) ---<--- SIP read from UDP:remote_SIP_IP:5060 --->INVITE sip:99966@my_SIP_IP:5060 SIP/2.0Content-Length:188From:<tel:+96597834852>;tag=7dfBXeCeDeie8i5dTo:<tel:99966;phone-context=unknown>;tag=as5b007325Via:SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKUXD8i_jUhaadah75Call-ID:2D3C3078FB3FE294ABB244D2@6443ffffffffCSeq:2 INVITEMax-Forwards:70Record-Route:<sip:AAQAAZK5DAAAvAAAAvQAAfHoK@remote_SIP_IP:5060;lr>Request-Disposition:no-forkSession-Expires:1800;refresher=uacContact:sip:remote_SIP_IP:5060Supported:timerAllow:ACK,BYE,CANCEL,INFO,INVITE,OPTIONS,PRACK,UPDATEP-Charging-Vector:icid-value=aZWWkCQrIoQZAAAAFg7MBWRDShY-;icid-generated-at=remote_SIP_IP;orig-ioi=remote_hostContent-Type:application/sdpContent-Disposition:session;handling=requiredv=0o=- 0 1 IN IP4 remote_sdp_owners=-c=IN IP4 remote_media_IPt=0 0m=audio 6222 RTP/AVP 8 101b=AS:80a=rtpmap:8 PCMA/8000a=rtpmap:101 telephone-event/8000a=ptime:20a=maxptime:20<------------->--- (17 headers 11 lines) ---Sending to remote_SIP_IP:5060 (no NAT)Found RTP audio format 8Found RTP audio format 101Found audio description format PCMA for ID 8Found audio description format telephone-event for ID 101Capabilities: 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 TryingVia: SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKUXD8i_jUhaadah75;received=remote_SIP_IPRecord-Route: <sip:AAQAAZK5DAAAvAAAAvQAAfHoK@remote_SIP_IP:5060;lr>From: <tel:+96597834852>;tag=7dfBXeCeDeie8i5dTo: <tel:99966;phone-context=unknown>;tag=as5b007325Call-ID: 2D3C3078FB3FE294ABB244D2@6443ffffffffCSeq: 2 INVITEServer: DN_SIP_01Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGESupported: replaces, timerSession-Expires: 1800;refresher=uacContact: <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 12850Adding codec alaw to SDPAdding codec ulaw to SDPAdding codec gsm to SDPAdding non-codec 0x1 (telephone-event) to SDP<--- Reliably Transmitting (no NAT) to remote_SIP_IP:5060 --->SIP/2.0 200 OKVia: SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKUXD8i_jUhaadah75;received=remote_SIP_IPRecord-Route: <sip:AAQAAZK5DAAAvAAAAvQAAfHoK@remote_SIP_IP:5060;lr>From: <tel:+96597834852>;tag=7dfBXeCeDeie8i5dTo: <tel:99966;phone-context=unknown>;tag=as5b007325Call-ID: 2D3C3078FB3FE294ABB244D2@6443ffffffffCSeq: 2 INVITEServer: DN_SIP_01Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGESupported: replaces, timerSession-Expires: 1800;refresher=uacContact: <sip:99966@my_SIP_IP:5060>Content-Type: application/sdpRequire: timerContent-Length: 289v=0o=DNIVR01 1453293019 1453293020 IN IP4 my_SIP_IPs=DNIVR01c=IN IP4 my_SIP_IPt=0 0m=audio 12850 RTP/AVP 8 0 3 101a=rtpmap:8 PCMA/8000a=rtpmap:0 PCMU/8000a=rtpmap:3 GSM/8000a=rtpmap:101 telephone-event/8000a=fmtp:101 0-16a=ptime:20a=maxptime:150a=sendrecv<------------><--- SIP read from UDP:remote_SIP_IP:5060 --->ACK sip:99966@my_SIP_IP:5060 SIP/2.0Content-Length:0From:<tel:+96597834852>;tag=7dfBXeCeDeie8i5dTo:<tel:99966;phone-context=unknown>;tag=as5b007325Via:SIP/2.0/UDP remote_domain:5060;branch=z9hG4bK4.7c1d3236.404hCCall-ID:2D3C3078FB3FE294ABB244D2@6443ffffffffCSeq:2 ACKMax-Forwards:70Request-Disposition:no-fork<------------->--- (9 headers 0 lines) --- ::::: early media session already activatedSent 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 activatedSent RTP packet to remote_media_IP:6222 (type 08, seq 051696, ts 000320, len 000160) ::::: early media session already activatedSent RTP packet to remote_media_IP:6222 (type 08, seq 051697, ts 000480, len 000160)... ::::: early media session already activatedSent RTP packet to remote_media_IP:6222 (type 08, seq 051765, ts 011360, len 000160) ::::: early media session already activatedSent 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.0Content-Length:6From:<tel:+96597834852>;tag=7dfBXeCeDeie8i5dTo:<tel:99966;phone-context=unknown>;tag=as5b007325Via:SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKBAVdUYUj7DC5.c1.Call-ID:2D3C3078FB3FE294ABB244D2@6443ffffffffCSeq:3 BYEMax-Forwards:70Request-Disposition:no-forkSupported:timerReason:X.int ;reasoncode=0x00000000;add-info=0132.0001.0B2EReason:Q.850 ;cause=16Content-Type:application/ISUP;base=itu-t92+;version=itu-t92+Content-Disposition:signal;handling=requiredContent-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 OKVia: SIP/2.0/UDP remote_domain:5060;branch=z9hG4bKBAVdUYUj7DC5.c1.;received=remote_SIP_IPFrom: <tel:+96597834852>;tag=7dfBXeCeDeie8i5dTo: <tel:99966;phone-context=unknown>;tag=as5b007325Call-ID: 2D3C3078FB3FE294ABB244D2@6443ffffffffCSeq: 3 BYEServer: DN_SIP_01Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGESupported: replaces, timerContent-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