forking CDR could help Ricardo.<br><br><div><span class="gmail_quote">On 12/15/06, <b class="gmail_sendername">Ricardo Martins</b> <<a href="mailto:rpoppi77@gmail.com">rpoppi77@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi John, Iīm very interested into this call forwarding capabilities and<br>I solved this problem filtering on the web-script (in my case, php) the<br>number the user can intert on the database. (I know itīs not an asterisk
<br>solution).<br><br>There is an issue that I couldnīt handle. When I forward the call, I<br>want to charge the user that the call was made FOR. How are you dealing<br>with that? Going direct to the point, I just need to know - a tip would
<br>be apreciated either - how to translate/replace the FROM field of the<br>forwarded call.<br><br>Rgds, Ricardo.<br><br><br>John French wrote:<br><br>>I'm simply trying to forward calls to users who have the call forwarding
<br>>feature enabled (FWD Status and FWD Ph Number kept in the astDB). The<br>>problem is that I want users to be able to forward calls to numbers that<br>>they would normally be allowed to dial within their own context. (I
<br>>don't want a local call only person forwarding to a long dist number,<br>>for example.) I'm able to get the channel context for SIP devices but<br>>not for IAX or Zap Devices. I need some pointers on getting IAXPEER to
<br>>work and how to handle getting the ZAP context info. If there's an<br>>easier way, I'm all ears. Thanks.<br>><br>>; #####################Set Some Variables####################<br>>exten => s,1,Set(DEVICE=${ARG1}) ;i.e. SIP/johns_phone
<br>>exten => s,n,Set(Protocol=${CUT(DEVICE,/,1)}) ;Parse out SIP<br>>exten => s,n,Set(Phone=${CUT(DEVICE,/,2)}) ;Parse out johns_phone<br>><br>>;Stuff omitted for some amout of brevity....<br>><br>>; #####################Make Forward Calls######################
<br>>; We only want people to be able to forward to numbers they could<br>>normally call<br>>; We'll have to somehow get their dialing contexts from the channel conf<br>>files.<br>>exten => s,n(Forward),NoOp()
<br>><br>>exten => s,n,GotoIf($["${Protocol}" = "SIP"]?SIPDev)<br>>exten => s,n,GotoIf($["${Protocol}" = "IAX2"]?IAXDev)<br>>exten => s,n,Goto(ZapDev)<br>><br>
>;ok, they are an IAX device so use IAXPEER<br>>exten =><br>>s,n(IAXDev),Set(CalledUsersContext=${IAXPEER(${Phone}:context)})<br>>exten => s,n,Goto(dial_time)<br>><br>>;ok, they are an SIP device so use SIPPEER
<br>>exten =><br>>s,n(SIPDev),Set(CalledUsersContext=${SIPPEER(${Phone}:context)})<br>>exten => s,n,Goto(dial_time)<br>><br>>;ok, they are an Zap device so use... Uhhhhh.<br>>exten => s,n(ZapDev),NoOp( I have no clue how to get the zap channel's
<br>>context...)<br>><br>>exten => s,n(dial_time),NoOp(======================> Chan Type<br>>${Protocol})<br>>exten => s,n,NoOp(======================> Chan Name ${Phone})<br>>exten => s,n,NoOp(======================> Channel User's context
<br>>${CalledUsersContext})<br>>exten => s,n,Dial(Local/${FWDNumber}@${CalledUsersContext}/n)<br>><br>><br>>Results at console on verbosity 9:<br>>SIPPEER() Works as advertised when I dial a SIP phone which has been
<br>>call forwarded<br>> -- Executing NoOp("Zap/1-1", "======================> Chan Type<br>>SIP") in new stack<br>> -- Executing NoOp("Zap/1-1", "======================> Chan Name
<br>>jf_linksys") in new stack<br>> -- Executing NoOp("Zap/1-1", "======================> Channel Users<br>>context longdistance_users") in new stack<br>> -- Executing Dial("Zap/1-1", "
Local/5551212@longdistance_users/n")<br>>in new stack<br>><br>>IAXPEER() Seems to be broken or I don't know how to use it properly.<br>> -- Executing NoOp("SIP/jf_linksys-08f20548",<br>>"======================> Chan Type IAX2") in new stack
<br>> -- Executing NoOp("SIP/jf_linksys-08f20548",<br>>"======================> Chan Name johns_pc") in new stack<br>> -- Executing NoOp("SIP/jf_linksys-08f20548",<br>>"======================> Channel Users context ") in new stack
<br>> -- Executing Dial("SIP/jf_linksys-08f20548", "Local/5551212@/n") in<br>>new stack<br>>_______________________________________________<br>>--Bandwidth and Colocation provided by <a href="http://Easynews.com">
Easynews.com</a> --<br>><br>>asterisk-users mailing list<br>>To UNSUBSCRIBE or update options visit:<br>> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users
</a><br>><br>><br>><br><br>_______________________________________________<br>--Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:
<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br>