Originate from local channel failing

Hi,

I’m trying to feed multiple ChanSpy applications into a single MeetMe conference call. I’m trying to link the output of a ChanSpy to the Meetme by originating a call between them, using a local channel. But so far without success. The problem is that I cannot get the originate to work if the channel used in it is a local channel leading to an extension with an application.

A simple testcase is originating from a Playback application to a SIP telephone. The relevant part of the extensions.conf is:

[tel]
exten => 8015,1,Playback(hello-world)

[rec]
exten => 8013,1,DIAL(SIP/8013)

The following CLI command, with verobsity set to 4:

originate local/8015@tel extension 8013@rec

results in 30 seconds of inactivity (that is: no output to the console) and than:

– Executing [8015@tel:1] Playback(“Local/8015@tel-92fa;2”, “demo-instruct”) in new stack
– <Local/8015@tel-92fa;2> Playing ‘demo-instruct.gsm’ (language ‘en’)
== Spawn extension (tel, 8015, 1) exited non-zero on ‘Local/8015@tel-92fa;2’

But it does not dial the 8013 extension.

If I try to use a call-file defining the same connection, it fails in a different way. It now immediately outputs to the console:

– Attempting call on local/8015@tel for 8013@rec:1 (Retry 1)
followed by the messages above, than, after 45 seconds:
NOTICE[18789]: pbx_spool.c:339 attempt_thread: Call failed to go through, reason (3) Remote end Rining
== Spawn extension (tel, 8015, 1) exited non-zero on ‘Local/8015@tel-4b42;2’

I’ve done some experimenting and found that it never works on my installation (Asterisk 1.6.2.5-0ubuntu1) if the channel used in the originate is a local channel leading to an application. I’ve tried the /n switch, but without success.

Solved the problem by moving on to a more recent version of Asterisk (1.8.7). The 1.6.2.5 one was bundled with Ubuntu.

Hello,

Does the ChanSpy originating work? I am trying to do the same you mentioned.

I like to spy on multiple connected Sip channels. E.g.
SIP/1, SIP/2, SIP/3
The audio output of all 3 channels should be thrown into the meetme conference 20000 that can be monitored by another sip client.

What I tried is:
Originate with channel “Local/20000@from-internal” spying on channel “SIP/41,q” quietly

And this seems to work. There is really a new participant in the meetme conference. But I cannot here anything been monitored.
What I’am doing wrong?
I am working on an Asterisk 1.8.9.1 system (Xorcom/Elastix) .

The originating is done by an AMI command as follows:
Action : Originate
Channel: Local/20000@from-internal
Application: ChanSpy
Data: SIP/41,q

The output of the CLI is:

-- Executing [20000@from-internal:1] Macro("Local/20000@from-internal-7217;2", "user-callerid,") in new stack
-- Executing [s@macro-user-callerid:1] Set("Local/20000@from-internal-7217;2", "AMPUSER=") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("Local/20000@from-internal-7217;2", "1?report") in new stack
-- Goto (macro-user-callerid,s,10)
-- Executing [s@macro-user-callerid:10] GotoIf("Local/20000@from-internal-7217;2", "0?continue") in new stack
-- Executing [s@macro-user-callerid:11] Set("Local/20000@from-internal-7217;2", "__TTL=64") in new stack
-- Executing [s@macro-user-callerid:12] GotoIf("Local/20000@from-internal-7217;2", "1?continue") in new stack
-- Goto (macro-user-callerid,s,19)
-- Executing [s@macro-user-callerid:19] Set("Local/20000@from-internal-7217;2", "CALLERID(number)=") in new stack
-- Executing [s@macro-user-callerid:20] Set("Local/20000@from-internal-7217;2", "CALLERID(name)=Mediatec.Asterisk.Manager") in new stack
-- Executing [s@macro-user-callerid:21] NoOp("Local/20000@from-internal-7217;2", "Using CallerID "Mediatec.Asterisk.Manager" <>") in new stack
-- Executing [20000@from-internal:2] Set("Local/20000@from-internal-7217;2", "MEETME_ROOMNUM=20000") in new stack
-- Executing [20000@from-internal:3] Set("Local/20000@from-internal-7217;2", "MAX_PARTICIPANTS=0") in new stack
-- Executing [20000@from-internal:4] Set("Local/20000@from-internal-7217;2", "MEETME_MUSIC=") in new stack
-- Executing [20000@from-internal:5] GotoIf("Local/20000@from-internal-7217;2", "0?USER") in new stack
-- Executing [20000@from-internal:6] Answer("Local/20000@from-internal-7217;2", "") in new stack

== Spying on channel SIP/41-000000af
– Executing [20000@from-internal:7] Wait(“Local/20000@from-internal-7217;2”, “1”) in new stack
– Executing [20000@from-internal:8] Set(“Local/20000@from-internal-7217;2”, “MEETME_OPTS=q”) in new stack
– Executing [20000@from-internal:9] Goto(“Local/20000@from-internal-7217;2”, “STARTMEETME,1”) in new stack
– Goto (from-internal,STARTMEETME,1)
– Executing [STARTMEETME@from-internal:1] ExecIf(“Local/20000@from-internal-7217;2”, “0?Set(CHANNEL(musicclass)=)”) in new stack
– Executing [STARTMEETME@from-internal:2] Set(“Local/20000@from-internal-7217;2”, “GROUP(meetme)=20000”) in new stack
– Executing [STARTMEETME@from-internal:3] GotoIf(“Local/20000@from-internal-7217;2”, “0?MEETMEFULL,1”) in new stack
– Executing [STARTMEETME@from-internal:4] MeetMe(“Local/20000@from-internal-7217;2”, “20000,q,”) in new stack
== Parsing ‘/etc/asterisk/meetme.conf’: == Found
== Parsing ‘/etc/asterisk/meetme_additional.conf’: == Found
– Created MeetMe conference 1019 for conference ‘20000’

Whenn i kick the meetme participants in the CLI with the comman “meetme kick 20000 all” I get following CLi output:

== Setting global variable ‘MEETMEADMINSTATUS’ to ‘OK’
– Hungup ‘DAHDI/pseudo-1622504962’
– Executing [STARTMEETME@from-internal:5] Hangup(“Local/20000@from-internal-969d;2”, “”) in new stack
== Spawn extension (from-internal, STARTMEETME, 5) exited non-zero on ‘Local/20000@from-internal-969d;2’
– Executing [h@from-internal:1] Macro(“Local/20000@from-internal-969d;2”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“Local/20000@from-internal-969d;2”, “1?endmixmoncheck”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] NoOp(“Local/20000@from-internal-969d;2”, “End of MIXMON check”) in new stack
– Executing [s@macro-hangupcall:10] GotoIf(“Local/20000@from-internal-969d;2”, “1?nomeetmemon”) in new stack
– Goto (macro-hangupcall,s,15)
– Executing [s@macro-hangupcall:15] NoOp(“Local/20000@from-internal-969d;2”, “MEETME_RECORDINGFILE=”) in new stack
– Executing [s@macro-hangupcall:16] GotoIf(“Local/20000@from-internal-969d;2”, “1?noautomon”) in new stack
– Goto (macro-hangupcall,s,18)
– Executing [s@macro-hangupcall:18] NoOp(“Local/20000@from-internal-969d;2”, “TOUCH_MONITOR_OUTPUT=”) in new stack
– Executing [s@macro-hangupcall:19] GotoIf(“Local/20000@from-internal-969d;2”, “1?noautomon2”) in new stack
– Goto (macro-hangupcall,s,25)
– Executing [s@macro-hangupcall:25] NoOp(“Local/20000@from-internal-969d;2”, “MONITOR_FILENAME=”) in new stack
– Executing [s@macro-hangupcall:26] GotoIf(“Local/20000@from-internal-969d;2”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,29)
– Executing [s@macro-hangupcall:29] GotoIf(“Local/20000@from-internal-969d;2”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,32)
– Executing [s@macro-hangupcall:32] GotoIf(“Local/20000@from-internal-969d;2”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,34)
– Executing [s@macro-hangupcall:34] Hangup(“Local/20000@from-internal-969d;2”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 34) exited non-zero on ‘Local/20000@from-internal-969d;2’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘Local/20000@from-internal-969d;2’
== Done Spying on channel SIP/41-000000af

Why can I hear no audio from Sip channel SIP/41 in the meetme converence 20000?

Thank you very much for your help.

Another approach for monitoring a channel could be originating conferences with the help of local channels ( http://www.voip-info.org/wiki/view/Asterisk+local+channels).

SIP/1 ----> is connected with conference 20001
SIP/2 (Monitoring channel) -----> is connected with monitoring conference 20002

Now originate conferences 20001 with 20002 by an AMI or CLI command e.g.:
Action: Originate
Channel: Local/20000@from-internal
Extension: 20001

after that we are muting the monitoring conference local channel, so that it can not be heard in the 20001 conference.
On CLI this can be accomplished with: meetme mute 20001 <userId of the 20000 local channel>

Now we can connect multiple conferences with the monitoring conference and so “spying” or monitoring the dedicated channels.
Nicer would be if ChanSpy would support such a feature.

I try to post further cognitions, because I have no experiences yet regarding performance or other behaviours.