Audio Listen to Default Speaker/HeadPhone

Sep 11, 2014 at 8:04 AM
Dear All,

I was able to connect and originate calls using your sample codes. Any idea how I could output the answered calls to Default Speaker/Headset as well as Listen to calls via default speaker or headset?
Sep 11, 2014 at 1:46 PM
what you want to do cannot be done directly with asternet. call audio is handled by a phone, not by asterisk (except for playback of recordings or monitoring of cause)
to listen to calls, you can set up a custom extension on asterisk to chanspy calls and use asternet to call that custom ext.
hope this helps.
Marked as answer by skrusty on 9/13/2014 at 11:10 AM
Sep 18, 2014 at 6:10 AM
hi garysprice,

Thanks for directing me. Can you point me how to setup custom extension on asterisk to chanspy calls?
Do you have some source code I could play.. Appreciate your kind answer. thanks.
Sep 18, 2014 at 8:15 AM
Edited Sep 18, 2014 at 8:15 AM
this is not an asternet question. in future, please use asterisk forums.

anyhow, had my rant. here is your answer.

if your ext's are 4 digits long, you will use 4 X's. if different, change.

dial 47 and then the 4 digit ext.

include => custom-spy
exten => _47XXXX,1,Chanspy(SIP/${EXTEN:2},bq)
exten => _47XXXX,n,Hangup()