[asterisk-users] Playback with noanswer in AGI
Zohair Raza
engineerzuhairraza at gmail.com
Tue Feb 7 03:09:12 CST 2012
Sammy,
Problem is at phones, with a linksys phone it works but with eyebeam and
fanvill it doesn't
Maybe they don't support early media.
I think i will have to stick with ResetCDR and that will be okay now as
I've modified the code for that
Thank you
Regards,
Zohair Raza
On Tue, Feb 7, 2012 at 12:09 PM, Zohair Raza
<engineerzuhairraza at gmail.com>wrote:
> Hi Sammy,
>
> Thanks for input.
>
> I have an eyebeam softphone registered with Asterisk 1.8.6 locally and
> from agi, I pass this
>
> $filetoplay = 'congestion';
> $agi->exec("Progress");
> $agi->exec("Playback $filetoplay,noanswer");
>
> Have tried putting file in .gsm and .wav formats, I hear ringing tone
> instead of playback
>
> Please have a look at sip-trace
>
> <--- SIP read from UDP:176.249.0.50:8721 --->
> INVITE sip:100 at 176.249.0.77 SIP/2.0
> To: <sip:100 at 176.249.0.77>
> From: Zohair<sip:1000 at 176.249.0.77>;tag=7f222672
> Via: SIP/2.0/UDP 176.249.0.50:8721
> ;branch=z9hG4bK-d87543-521938753-1--d87543-;rport
> Call-ID: 2932f90ef302332b
> CSeq: 2 INVITE
> Contact: <sip:1000 at 176.249.0.50:8721>
> Max-Forwards: 70
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
> SUBSCRIBE, INFO
> Content-Type: application/sdp
> User-Agent: eyeBeam release 3006o stamp 17551
> Authorization: Digest
> username="1000",realm="asterisk",nonce="2abce759",uri="
> sip:100 at 176.249.0.77
> ",response="c1a2dbcf1b51d839521b1ee848bea055",algorithm=MD5
> Content-Length: 269
>
> v=0
> o=- 4333518 4333604 IN IP4 176.249.0.50
> s=eyeBeam
> c=IN IP4 176.249.0.50
> t=0 0
> m=audio 6506 RTP/AVP 100 6 0 8 3 18 5 101
> a=alt:1 1 : 119610F1 000000B3 176.249.0.50 6506
> a=fmtp:101 0-15
> a=rtpmap:100 speex/16000
> a=rtpmap:101 telephone-event/8000
> a=sendrecv
> <------------->
> --- (13 headers 11 lines) ---
> Sending to 176.249.0.50:8721 (no NAT)
> sing INVITE request as basis request - 2932f90ef302332b
> Found peer '1000' for '1000' from 176.249.0.50:8721
> == Using SIP RTP CoS mark 5
> Found RTP audio format 100
> Found RTP audio format 6
> Found RTP audio format 0
> Found RTP audio format 8
> Found RTP audio format 3
> Found RTP audio format 18
> Found RTP audio format 5
> Found RTP audio format 101
> Found audio description format speex for ID 100
> Found audio description format telephone-event for ID 101
> Capabilities: us - 0xc (ulaw|alaw), peer - audio=0x20000012e
> (gsm|ulaw|alaw|adpcm|g729|speex16)/video=0x0 (nothing)/text=0x0 (nothing),
> combined - 0xc (ulaw|alaw)
> Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1
> (telephone-event|), combined - 0x1 (telephone-event|)
> Peer audio RTP is at port 176.249.0.50:6506
> Looking for 100 in default (domain 176.249.0.77)
> list_route: hop: <sip:1000 at 176.249.0.50:8721>
>
> <--- Transmitting (no NAT) to 176.249.0.50:8721 --->
> SIP/2.0 100 Trying
> Via: SIP/2.0/UDP 176.249.0.50:8721
> ;branch=z9hG4bK-d87543-521938753-1--d87543-;received=176.249.0.50;rport=8721
> From: Zohair<sip:1000 at 176.249.0.77>;tag=7f222672
> To: <sip:100 at 176.249.0.77>
> Call-ID: 2932f90ef302332b
> CSeq: 2 INVITE
> Server: Asterisk PBX 1.8.0
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
> PUBLISH
> Supported: replaces, timer
> Contact: <sip:100 at 176.249.0.77:5060>
> Content-Length: 0
>
>
> <------------>
> -- Executing [100 at default:1] AGI("SIP/1000-00000019", "agi.php,DID")
> -- Launched AGI Script /var/lib/asterisk/agi-bin/agi.php
> -- AGI Script Executing Application: (Progress) Options: ()
> Audio is at 5060
> Adding codec 0x4 (ulaw) to SDP
> Adding codec 0x8 (alaw) to SDP
> Adding non-codec 0x1 (telephone-event) to SDP
>
> <--- Transmitting (no NAT) to 176.249.0.50:8721 --->
> SIP/2.0 183 Session Progress
> Via: SIP/2.0/UDP 176.249.0.50:8721
> ;branch=z9hG4bK-d87543-521938753-1--d87543-;received=176.249.0.50;rport=8721
> From: Zohair<sip:1000 at 176.249.0.77>;tag=7f222672
> To: <sip:100 at 176.249.0.77>;tag=as01491743
> Call-ID: 2932f90ef302332b
> CSeq: 2 INVITE
> Server: Asterisk PBX 1.8.0
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
> PUBLISH
> Supported: replaces, timer
> Contact: <sip:100 at 176.249.0.77:5060>
> Content-Type: application/sdp
> Content-Length: 258
>
> v=0
> o=root 1225456982 1225456982 IN IP4 176.249.0.77
> s=Asterisk PBX 1.8.0
> c=IN IP4 176.249.0.77
> t=0 0
> m=audio 15918 RTP/AVP 0 8 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=ptime:20
> a=sendrecv
>
> <------------>
> -- AGI Script Executing Application: (Playback) Options:
> (congestion,noanswer)
> -- <SIP/1000-00000019> Playing 'congestion.slin' (language 'en')
> -- <SIP/1000-00000019>AGI Script agi.php completed, returning 0
>
>
> Regards,
> Zohair Raza
>
>
> On Tue, Feb 7, 2012 at 11:38 AM, Sammy Govind <govoiper at gmail.com> wrote:
>
>> Hey Danny,
>>
>> I've this thing exactly running and working as Zohair mentioned! i.e I do
>> not answer() the call rather put a progress() and soon after that playing
>> back the sound file from playback with noanswer and then I get the file
>> streaming as 183-Session progress file.
>>
>> I do understand that playing any sound file before establishing any audio
>> session between two end point will result in no-adio from playback() BUT
>> the combination of progress() and playback(,noanswer) works fine for me.
>>
>> What I think the issue could be for Zohair is that its
>> requesting/incoming session(carrier) isn't allowing the 183-Session
>> progress.
>>
>> Zohair can you do a SIP trace for this particular call along with the
>> dialplan executing for it!?
>>
>> Regards,
>> Sammy.
>>
>>
>> On Tue, Feb 7, 2012 at 11:55 AM, Zohair Raza <
>> engineerzuhairraza at gmail.com> wrote:
>>
>>> Thanks for this explanation Dany!
>>>
>>> Regards,
>>> Zohair Raza
>>>
>>>
>>> On Mon, Feb 6, 2012 at 10:11 PM, Danny Nicholas <danny at debsinc.com>wrote:
>>>
>>>> You are mis-understanding the concept – the noanswer option is playing
>>>> the file as you requested, but since you aren’t answering the call, no
>>>> channel is established to actually present the sound to you.****
>>>>
>>>> ** **
>>>>
>>>> *From:* asterisk-users-bounces at lists.digium.com [mailto:
>>>> asterisk-users-bounces at lists.digium.com] *On Behalf Of *Zohair Raza
>>>> *Sent:* Monday, February 06, 2012 12:06 PM
>>>> *To:* Asterisk Users Mailing List - Non-Commercial Discussion
>>>> *Subject:* [asterisk-users] Playback with noanswer in AGI****
>>>>
>>>> ** **
>>>>
>>>> Hi All, ****
>>>>
>>>> ** **
>>>>
>>>> I want to play a file in agi but dont want to answer the call****
>>>>
>>>> ** **
>>>>
>>>> I am dialing through sip phone and running asterisk 1.8.6,****
>>>>
>>>> ** **
>>>>
>>>> I tried following with no luck****
>>>>
>>>> ** **
>>>>
>>>> $agi->exec("Progress");****
>>>>
>>>> $agi->exec("Playback $filetoplay,noanswer");****
>>>>
>>>> $agi->hangup();****
>>>>
>>>> ** **
>>>>
>>>> When I dial I can't hear the audio but if I answer the call or remove
>>>> noanswer argument I can hear the audio.****
>>>>
>>>> ** **
>>>>
>>>> phpAGI's stream_file didn't help either. ****
>>>>
>>>> ** **
>>>>
>>>> I ended up with ResetCDR() before hangup to reset billsec, duration and
>>>> disposition but don't want to do it this way.****
>>>>
>>>> ** **
>>>>
>>>> What could be the problem?****
>>>>
>>>> ** **
>>>>
>>>> From Voip-info.org :****
>>>>
>>>> *noanswer*: Play the sound file, but don't answer the channel first
>>>> (if hasn't been answered already). Not all channels support playing
>>>> messages while still on hook.****
>>>>
>>>> ** **
>>>>
>>>> Is it because the channel is not supported?****
>>>>
>>>> ** **
>>>>
>>>> ** **
>>>>
>>>> Regards,****
>>>>
>>>> Zohair Raza****
>>>>
>>>> ** **
>>>>
>>>> ** **
>>>>
>>>> --
>>>> _____________________________________________________________________
>>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>>> http://www.asterisk.org/hello
>>>>
>>>> asterisk-users mailing list
>>>> To UNSUBSCRIBE or update options visit:
>>>> http://lists.digium.com/mailman/listinfo/asterisk-users
>>>>
>>>
>>>
>>> --
>>> _____________________________________________________________________
>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>>> http://www.asterisk.org/hello
>>>
>>> asterisk-users mailing list
>>> To UNSUBSCRIBE or update options visit:
>>> http://lists.digium.com/mailman/listinfo/asterisk-users
>>>
>>
>>
>> --
>> _____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>> http://www.asterisk.org/hello
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120207/a41e0820/attachment.htm>
More information about the asterisk-users
mailing list