[asterisk-users] Notify me when the call is answered

Eric Smith es at fruitcom.com
Thu Mar 17 07:52:51 CDT 2011


Hi

I want to have some signal when a call is answered.
I can watch the asterisk debug or logs and see when a call is answered 
of course but I want a sound notification.

I tried this:
[macro-notifymobile]
exten => s,1,Dial(SIP/foobar,10)

exten => _0031.,n,Dial(SIP/foobar2/${EXTEN},60,wM(notifymobile))

But this results in:

[Mar 17 13:41:46]     -- IAX2/4506-102 answered IAX2/4506-35
[Mar 17 13:41:46]     -- Executing [s at macro-notifymobile:1] Dial("IAX2/4506-102", "SIP/foobar|10") in new stack
[Mar 17 13:41:46]     -- Called foobar
[Mar 17 13:41:46]     -- IAX2/4506-102 requested special control 20, passing it to SIP/foobar-b760dd78
[Mar 17 13:41:46]     -- SIP/foobar-b760dd78 is ringing
[Mar 17 13:41:46]     -- IAX2/4506-102 requested special control 20, passing it to SIP/foobar-b760dd78

I think it is passing the call to the extension SIP/foobar (my wifi mobile device) which rings.
I want the call to stay connected to the original extension.

How would I achieve a notification this way or another way?

And is it possible to Dial() and only connect to your extension when someone answers the call?

-- 
- Eric Smith



More information about the asterisk-users mailing list