Re: [asterisk-users] Teliax: where's the space in CALLERID(num) from?
sean darcy escribió: Jared Smith wrote: On Sat, 2009-06-06 at 21:24 +0200, Philipp Kempgen wrote: exten => s,n,Set(CALLERID(num)=${IF($[0${CALLERID(num)} > 140] ? ${MAINSTUB}${CALLERID(num)}:${MAINNUMBER} )} ) ^ ^ remove the trailing spaces You'll also want to remove any spaces from around the question mark (after your expression). Thanks. Now I have someone in the office, I messed around a bit. The only space that mattered was the last one. None of the spaces inside ${IF...} mattered. It makes sense since the parser must see Set(CID=in the IF clause>) Is there a way to test this remotely using "originate", or some other CLI command? sean If you have chan_oss (the console channel driver) loaded, you can do a CLI dial command, for example: dial extens...@context . After you see what happens with the call, you can hangup it with the CLI hangup command if the dialplan doesn't hangup it already. Also, if your PC or server has a well configured sound card and speakers, the console call would be heard too. Regards, -- Ing. Miguel Molina Grupo de Tecnología Millenium Phone Center ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Teliax: where's the space in CALLERID(num) from?
Jared Smith wrote: > On Sat, 2009-06-06 at 21:24 +0200, Philipp Kempgen wrote: >>> exten => s,n,Set(CALLERID(num)=${IF($[0${CALLERID(num)} > 140] ? >>> ${MAINSTUB}${CALLERID(num)}:${MAINNUMBER} )} ) >>^ ^ >> remove the trailing spaces > > You'll also want to remove any spaces from around the question mark > (after your expression). > > Thanks. Now I have someone in the office, I messed around a bit. The only space that mattered was the last one. None of the spaces inside ${IF...} mattered. It makes sense since the parser must see Set(CID=) Is there a way to test this remotely using "originate", or some other CLI command? sean ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Teliax: where's the space in CALLERID(num) from?
On Sat, 2009-06-06 at 21:24 +0200, Philipp Kempgen wrote: > > exten => s,n,Set(CALLERID(num)=${IF($[0${CALLERID(num)} > 140] ? > > ${MAINSTUB}${CALLERID(num)}:${MAINNUMBER} )} ) >^ ^ > remove the trailing spaces You'll also want to remove any spaces from around the question mark (after your expression). -- Jared Smith Training Manager Digium, Inc. ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Teliax: where's the space in CALLERID(num) from?
Philipp Kempgen wrote: > sean darcy schrieb: >> I'm having trouble setting callerid with teliax. I use a simple dial-out >> subroutine to set the callerid depending on the calling extension, and >> then dial out. Teliax is saying they're not seeing any callerid info. > >> exten => s,n,Set(CALLERID(num)=${IF($[0${CALLERID(num)} > 140] ? >> ${MAINSTUB}${CALLERID(num)}:${MAINNUMBER} )} ) >^ ^ > remove the trailing spaces I'll try that tomorrow. BTW, how can I test this remotely - that when no one is in the office. I tried at the CLI: originate SIP/178 extension 2024532...@longdistance but that just generated the response: -- Got SIP response 486 "Busy Here" back from 10.10.10.148 sean ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Teliax: where's the space in CALLERID(num) from?
sean darcy schrieb: > I'm having trouble setting callerid with teliax. I use a simple dial-out > subroutine to set the callerid depending on the calling extension, and > then dial out. Teliax is saying they're not seeing any callerid info. > exten => s,n,Set(CALLERID(num)=${IF($[0${CALLERID(num)} > 140] ? > ${MAINSTUB}${CALLERID(num)}:${MAINNUMBER} )} ) ^ ^ remove the trailing spaces > -- Executing [...@dialout:4] Set("SIP/178-081c52a0", > "CALLERID(num)=xxx178 ") in new stack > But when * sets the callerid in > s...@dialout:4 there's a trailing space > But CALLERID(num) does not start with a trailing space - see > s...@dialout:2, so concatenating it with the rest of the number shouldn't > create a space. Right? Philipp Kempgen -- AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998 Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de Videos of the AMOOCON VoIP conference 2009 -> http://www.amoocon.de -- ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Teliax: where's the space in CALLERID(num) from?
I'm having trouble setting callerid with teliax. I use a simple dial-out subroutine to set the callerid depending on the calling extension, and then dial out. Teliax is saying they're not seeing any callerid info. [DialOut] ; subroutine for dialing out. exten => s,1,NoOp(Context: DialOut called with outgoing number ${ARG1} ) exten => s,n,NoOp(${CALLERID(num)}) exten => s,n,GotoIf($[${CALLERID(num)} > 200]?dial-out) exten => s,n,Set(CALLERID(num)=${IF($[0${CALLERID(num)} > 140] ? ${MAINSTUB}${CALLERID(num)}:${MAINNUMBER} )} ) exten => s,n(dial-out),Dial(${First-Preferred-Out}/${ARG1}) ... Here's the CLI when dialing out: -- Executing [917yyyx...@longdistance:2] Gosub("SIP/178-081c52a0", "DialOut,s,1(917yyy)") in new stack -- Executing [...@dialout:1] NoOp("SIP/178-081c52a0", "Context: DialOut called with outgoing number 917yyy ") in new stack -- Executing [...@dialout:2] NoOp("SIP/178-081c52a0", "178") in new stack -- Executing [...@dialout:3] GotoIf("SIP/178-081c52a0", "0?dial-out") in new stack -- Executing [...@dialout:4] Set("SIP/178-081c52a0", "CALLERID(num)=xxx178 ") in new stack -- Executing [...@dialout:5] Dial("SIP/178-081c52a0", "IAX2/zz...@nyc.teliax.net/917yyy") in new stack Now I think the reason that teliax isn't seeing my callerid is that it's looking for a valid 10 digit number. But when * sets the callerid in s...@dialout:4 there's a trailing space(and yes, in real life I use an actual 10 digit number), so teliax is probably getting 11 characters as the callerid. But CALLERID(num) does not start with a trailing space - see s...@dialout:2, so concatenating it with the rest of the number shouldn't create a space. Right? sean ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users