# Monitor() problem

**URL:** <https://community.asterisk.org/t/monitor-problem/30157>\
**Category:** Asterisk Support\
**Created:** [January 5, 2010, 12:47pm UTC](https://community.asterisk.org/t/monitor-problem/30157 "2010-01-05T12:47:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![seabro](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@seabro](https://community.asterisk.org/u/seabro)\
**Post date:** [January 5, 2010, 12:47pm UTC](https://community.asterisk.org/t/monitor-problem/30157/1 "2010-01-05T12:47:30Z")

</div>

Hi,

When I place a call using Asterisk Desktop Assistant (ADA), the Monitor() function is only recording the first leg of the call. i.e. When my local extension is called by Asterisk.

The recording then seems to end, then the call continues to the destination.

Here is an excerpt from the log. Any ideas how I can record the call when using ADA?

Jan 5 13:01:11 VERBOSE[13666] logger.c: – Executing SetCallerID(“Local/666@ada-c0c2,1”, “XXXXXXXXXXX”) in new stack  
Jan 5 13:01:11 VERBOSE[13666] logger.c: – Executing NoOp(“Local/666@ada-c0c2,1”, “testingtesting123”) in new stack  
Jan 5 13:01:11 VERBOSE[13666] logger.c: – Executing Monitor(“Local/666@ada-c0c2,1”, “|20100105-130111-EXT666-XXXXXXXXXXX|m”) in new stack  
Jan 5 13:01:11 VERBOSE[13666] logger.c: – Executing NoOp(“Local/666@ada-c0c2,1”, “666”) in new stack  
Jan 5 13:01:11 VERBOSE[13666] logger.c: – Executing Dial(“Local/666@ada-c0c2,1”, “IAX2/gradwell-out/XXXXXXXXXXX”) in new stack  
Jan 5 13:01:11 VERBOSE[13666] logger.c: – Called gradwell-out/XXXXXXXXXXX  
Jan 5 13:01:13 VERBOSE[13666] logger.c: – IAX2/gradwell-out-4 is making progress passing it to SIP/666-08e988f0  
Jan 5 13:01:17 VERBOSE[13666] logger.c: – IAX2/gradwell-out-4 answered SIP/666-08e988f0  
Jan 5 13:01:22 VERBOSE[13666] logger.c: – Hungup 'IAX2/gradwell-out-4’  
Jan 5 13:01:22 VERBOSE[13666] logger.c: == Spawn extension (ada, XXXXXXXXXXX, 5) exited non-zero on ‘SIP/666-08e988f0’

A file is created by monitor() but it is always 1K in size. If you dial direct from the handset recordings work fine.

Thanks,

Sean

---

<div class="post-metadata">

**Author:** ![ianplain](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ianplain/32/1776_2.png) [@ianplain](https://community.asterisk.org/u/ianplain)\
**Post date:** [January 5, 2010, 5:05pm UTC](https://community.asterisk.org/t/monitor-problem/30157/2 "2010-01-05T17:05:36Z")

</div>

Hi

When using ADA the call is not from you handset so to speak.

its made by manager, what does your ADA dialplan looklike ?

Ian

---

<div class="post-metadata">

**Author:** ![seabro](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@seabro](https://community.asterisk.org/u/seabro)\
**Post date:** [January 5, 2010, 6:58pm UTC](https://community.asterisk.org/t/monitor-problem/30157/3 "2010-01-05T18:58:39Z")

</div>

Hi Ian,

Thanks for your reply.

In the ada context contains one of these for each extension  
exten =\> 123,1,Dial(SIP/123,5)  
then  
include =\> main

main looks like

[main]  
exten =\> \_0[012578].,1,SetCallerID(01XXXXXXXXX)  
exten =\> \_0[012578].,n,NoOp(“TESTING TESTING 123”)  
exten =\> \_0[012578].,n,NoOp(${CHANNEL:6:3})  
exten =\> \_0[012578].,n,Monitor(|${TIMESTAMP:4:9}-EXT${CHANNEL:6:3}-${EXTEN}|m)  
exten =\> \_0[012578].,n,Dial(IAX2/gradwell-out/${EXTEN})  
exten =\> \_0[012578].,n,Hangup()

It seems to work on my own machine which is 1.6.0.15 but not on this one which is a customers server running 1.2.24

I guess an upgrade is needed? What you think?

Thanks,  
Sean

---

<div class="post-metadata">

**Author:** ![ianplain](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ianplain/32/1776_2.png) [@ianplain](https://community.asterisk.org/u/ianplain)\
**Post date:** [January 5, 2010, 10:05pm UTC](https://community.asterisk.org/t/monitor-problem/30157/4 "2010-01-05T22:05:08Z")

</div>

Hi

The verbose output doesn’t match the dialplan you posted, if you are usingh local channels then you need the /n option on them so they don’t release.

As to an upgrad got up to 1.4 I suppose as 1.6 isnt a LTS release 1.8 is due later this year

Ian

---

<div class="post-metadata">

**Author:** ![seabro](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@seabro](https://community.asterisk.org/u/seabro)\
**Post date:** [January 6, 2010, 9:28pm UTC](https://community.asterisk.org/t/monitor-problem/30157/5 "2010-01-06T21:28:17Z")

</div>

Thanks again for the response Ian.

The discrepancy between dialplan and log is because I was making various changes all day to attempt to get it to work. Following your post I did alot of reading about the ‘local’ channel and the \n does seem very relevant. However, I can’t see how I could implement it as it looks like where I would put it is part of what ADA sends to the AMI.

Thankfully, the problem does not exist when I try on version 1.6 so I am hoping that upgrading the customer from 1.2.24 to 1.4.28 will resolve it… I am upgrading now, then I will fix all the broken stuff, then I will try it and report back.

thanks again for your help!

seabro

---

<div class="post-metadata">

**Author:** ![ianplain](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ianplain/32/1776_2.png) [@ianplain](https://community.asterisk.org/u/ianplain)\
**Post date:** [January 6, 2010, 10:06pm UTC](https://community.asterisk.org/t/monitor-problem/30157/6 "2010-01-06T22:06:41Z")

</div>

Hi

Have you defined in ADA a local channel ?

Ian

---

<div class="post-metadata">

**Author:** ![seabro](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@seabro](https://community.asterisk.org/u/seabro)\
**Post date:** [January 6, 2010, 10:19pm UTC](https://community.asterisk.org/t/monitor-problem/30157/7 "2010-01-06T22:19:50Z")

</div>

[quote=“ianplain”]Hi

Have you defined in ADA a local channel ?

Ian[/quote]

Where would I do that Ian?

In the ADA software I am only asked for username and password and server address.

---

<div class="post-metadata">

**Author:** ![seabro](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@seabro](https://community.asterisk.org/u/seabro)\
**Post date:** [January 7, 2010, 9:28am UTC](https://community.asterisk.org/t/monitor-problem/30157/8 "2010-01-07T09:28:21Z")

</div>

Upgrade went OK, ADA started acting very differently, seemed to be giving varying results after restart (well it is beta I guess), then I went to Nojee (the client had been asking for it) and it worked like a charm so I’ll leave it there!
