[Asterisk-Users] flashing zap using macro
MJ
mike.jennings at charter.net
Sat Jan 22 19:22:08 MST 2005
Should I take out the CallERIDNUM? The following is where I got my config.
http://lists.digium.com/pipermail/asterisk-users/2004-July/056878.html
Not in any way a good solution, but what I've done is create an extension
that flashs the line, and then returns the call to my sip phone. For
example:
[app-flash]
exten => _*4.,1,macro(test,${EXTEN:2},${CALLERIDNUM})
[macro-test]
exten => s,1,Answer
exten => s,3,Flash
exten => s,3,Dial(SIP/${ARG2},30,t)
exten => s,4,Dial(SIP/${ARG1},30,t)
exten => s,t,Hangup
exten => s,i,Hangup
exten => s,h,Hangup
Then if you're on a call through the Zap line, and transfer the call to
*4xxxx, it will flash the line and return it to xxxx SIP extension. I've
been trying to get it to auto-detect the SIP extension to return it to, but
callerid is different depending on if the call is incoming or outgoing
through the Zap.
Again, not good.. but works in a home environment. I think we'll need
in-call triggers to do anything better.
_____
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Lyle Giese
Sent: Saturday, January 22, 2005 8:13 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] flashing zap using macro
As Eric pointed out you have priority 3 listed twice here, but from the
debug output I am guessing that's a typo. but in the second priority 3 line,
I think ${ARG2} is being replaced by ${CALLERIDNUM} where he wants $EXTEN
instead.
I don't think you need to dial your SIP extension back either. You already
have a channel up between that Zap and your SIP. I am not sure how you get
back to that orginal connection in this situation, but your SIP is busy as
it asked for this macro via *43016.
Lyle
[sip]
exten => _*4.,1,macro(test,${EXTEN:2},${CALLERIDNUM})
[macro-test]
exten => s,1,Answer
exten => s,2,Flash
exten => s,3,Dial(SIP/${ARG1},30,t)
exten => s,4,Dial(SIP/${ARG1},30,t) ; this line looks redundant
exten => s,t,Hangup
exten => s,i,Hangup
exten => s,h,Hangup
----- Original Message -----
From: MJ <mailto:mike.jennings at charter.net>
To: asterisk-users at lists.digium.com
Sent: Saturday, January 22, 2005 7:53 PM
Subject: [Asterisk-Users] flashing zap using macro
I'm having problems using the following.
[sip]
exten => _*4.,1,macro(test,${EXTEN:2},${CALLERIDNUM})
[macro-test]
exten => s,1,Answer
exten => s,3,Flash
exten => s,3,Dial(SIP/${ARG2},30,t)
exten => s,4,Dial(SIP/${ARG1},30,t)
exten => s,t,Hangup
exten => s,i,Hangup
exten => s,h,Hangup
I know I must be missing something simple, but here is the output from
dialing my home, answering the call, making another call to my home in order
to do a callwaiting transfer, doing a # and a *43016 (3016 is the sip number
I'm answering the Zap channel on). I am using an analog phone off of a
Cisco ATA186 for extension 3016. I replaced the number I was dialing from
into my home with 5555551212.
astera*CLI>
-- Starting simple switch on 'Zap/1-1'
-- Executing Wait("Zap/1-1", "1") in new stack
-- Executing Answer("Zap/1-1", "") in new stack
-- Executing DigitTimeout("Zap/1-1", "5") in new stack
-- Set Digit Timeout to 5
-- Executing ResponseTimeout("Zap/1-1", "10") in new stack
-- Set Response Timeout to 10
-- Executing Dial("Zap/1-1", "SIP/3014&SIP/3016&SIP/3017|35|tr") in new
stack
-- Called 3014
-- Called 3016
-- Called 3017
-- SIP/3017-2016 is ringing
-- SIP/3016-4a65 is ringing
-- SIP/3014-4269 is ringing
-- SIP/3016-4a65 answered Zap/1-1
Jan 22 19:18:25 NOTICE[524306]: rtp.c:280 process_rfc3389: RFC3389 support
incomplete. Turn off on client if possible
-- Started music on hold, class 'default', on Zap/1-1
-- Playing 'pbx-transfer' (language 'en')
-- Stopped music on hold on Zap/1-1
-- Executing Macro("Zap/1-1", "test|3016|5555551212") in new stack
-- Executing Answer("Zap/1-1", "") in new stack
-- Executing Flash("Zap/1-1", "") in new stack
-- Flashed channel Zap/1-1
-- Executing Dial("Zap/1-1", "SIP/5555551212|30|t") in new stack <-----
$ARG2 is $CALLERIDNUM
Jan 22 19:18:48 WARNING[524306]: chan_sip.c:1114 create_addr: No such host:
5555551212
Jan 22 19:18:48 NOTICE[524306]: app_dial.c:673 dial_exec: Unable to create
channel of type 'SIP'
== Everyone is busy at this time
-- Executing Dial("Zap/1-1", "SIP/3016|30|t") in new stack
-- Called 3016
-- Got SIP response 486 "Busy Here" back from 192.168.0.232
-- SIP/3016-f677 is busy
== Everyone is busy at this time
-- Executing Hangup("Zap/1-1", "") in new stack
== Spawn extension (macro-test, s, 5) exited non-zero on 'Zap/1-1' in
macro 'test'
== Spawn extension (sip, *43016, 1) exited non-zero on 'Zap/1-1'
-- Hungup 'Zap/1-1'
-- Starting simple switch on 'Zap/1-1'
Jan 22 19:18:58 NOTICE[540690]: chan_zap.c:4765 ss_thread: Got event 2
(Ring/Answered)...
-- Executing Wait("Zap/1-1", "1") in new stack
-- Executing Answer("Zap/1-1", "") in new stack
-- Executing DigitTimeout("Zap/1-1", "5") in new stack
-- Set Digit Timeout to 5
-- Executing ResponseTimeout("Zap/1-1", "10") in new stack
-- Set Response Timeout to 10
-- Executing Dial("Zap/1-1", "SIP/3014&SIP/3016&SIP/3017|35|tr") in new
stack
-- Called 3014
-- Called 3016
-- Called 3017
-- SIP/3017-3574 is ringing
-- SIP/3016-7c06 is ringing
-- SIP/3014-9193 is ringing
-- SIP/3016-7c06 answered Zap/1-1
== Spawn extension (default, s, 5) exited non-zero on 'Zap/1-1'
-- Hungup 'Zap/1-1'
astera*CLI>
_____
_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
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/20050122/c11cab94/attachment.htm
More information about the asterisk-users
mailing list