Re: [asterisk-users] ${MACRO_CONTEXT} for Subroutines
On Thu, Aug 20, 2015 at 10:52 AM, Bastian Schern m...@reventix.de wrote: Hello Everybody, Howdy in past times I used macros but since a while they are deprecated. So I replaced my macros with subroutines. In most cases this is really no problem. But in some rare cases I miss the macro channel variables (e.g. ${MACRO_CONTEXT}). https://wiki.asterisk.org/wiki/display/AST/Dialplan+Macros+Channel+Variables Is there something similar for subroutines? Due to the nature of GoSub() vs. Macro() there is no built in channel variable which carries that information with a GoSub(). Devs keep me honest here. If the subroutine needs to know what part of dialplan the channel came from I recommend sending the information as an ARG in the nested set of parenthesis when executing the GoSub() application. exten = _7XXX,1,GoSub(subDialer,begin,1(${CONTEXT})) [subDialer] exten = begin,1,Verbose(0, This subroutine was executed from the ${ARG1} context.) Kind regards Bastian -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Justin Hester Digium, Inc. · Technical Trainer 445 Jan Davis Drive NW · Huntsville, AL 35806 · USA ph: +1 256 428 6238 Check us out at: https://www.digium.com · http://asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] call rejected because extension not found in context 'internal
Howdy, Your sip.conf file looks fine for some testing, though I would recommend _not_ using an extension number to name a sip endpoint. Instead, name the sip endpoint something more descriptive of the device. [Linphone-01] [Linphone-02] for example. Then you'll want to configure extensions.conf to Dial() the sip endpoint whenever the extension is dialed. Justin Hester Digium, Inc. · Technical Trainer 445 Jan Davis Drive NW · Huntsville, AL 35806 · USA ph: +1 256 428 6238 Check us out at: http://digium.com · http://asterisk.org On Mon, Feb 3, 2014 at 5:45 AM, Raghav Goud raghavgou...@gmail.com wrote: Hi all, I want to two sip clients connect through Asterisk in local network for testing. My sip.conf file looks like this [general] context=internal allowguest=no allowoverlap=no bindport=5060 bindaddr=0.0.0.0 srvlookup=no disallow=all allow=ulaw alwaysauthreject=yes canreinvite=no nat=yes session-timers=refuse localnet=192.168.1.0/255.255.255.0 [7001] type=friend host=dynamic secret=123abcd context=internal [7002] type=friend host=dynamic secret=456abcd context=internal Am using linphone as sip client and create account on linphone with user name 7001 and 7002 7001 is running on 192.168.2.15:5060 7002 is running on 192.168.2.45:5060 when i try to call from 7002 to 7001 i specified sip:7001@192.168.2.15 it working fine as i know ip adress i specified it as url. if i dnt know the ipadress how can i call to 7001? i try to call sip:7001@192.168.2.20 it through call rejected because extension not found in context 'internal, error. How can call to sip id with out knowning ipadress where it is runnning? Any modification required for sip.conf file? Thanks, Raghav -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] callerid overwrite
Howdy, Before changing any configuration I would highly recommend reading through the entry in the sample file. Trust remote party ID may be set to 'no' for a very good reason on your PBX, please take care to understand why it should be changed before doing so. Before digging into that though, what does the CLI tell you if you do a NoOp() after having Set() the Caller ID function [1]? [1] Something like; exten = _9NXX,1,Set(CALLERID(name)=mycompanyinc) same = n,NoOp(The caller ID has been set to ${CALLERID(name)}) same = n,Dial(SIP/att/${EXTEN:1},80) Hope this helps. Justin Hester Digium, Inc. · Technical Trainer 445 Jan Davis Drive NW · Huntsville, AL 35806 · USA ph: +1 256 428 6238 Check us out at: http://digium.com · http://asterisk.org On Thu, Jan 30, 2014 at 5:29 PM, motty cruz motty.c...@gmail.com wrote: look like the issue continues, I am unable to overwrite callerid from sip.conf in extensions.conf, In sip.conf under [general] trustrpid = no should i change it to yes? Thanks On Tue, Jan 28, 2014 at 1:06 PM, motty cruz motty.c...@gmail.com wrote: Thank you for your reply, I updated extensions.conf file to reflect your suggestion, I will monitor Asterisk for any more issues, Thanks, On Tue, Jan 28, 2014 at 11:23 AM, Andres and...@telesip.net wrote: On 1/28/14, 1:55 PM, motty cruz wrote: Hi all, I'm having issues with overwrite caller id, when I call someone my caller id should be mycompanyinc but instead my id shows up as my extension number 101. this is what i have in sip.conf [101] type=friend context=sipphones call-limit=99 callerid=iuser 101 disallow=all allow=ulaw allow=alaw username=101 secret=Passwd dtmfmode=rfc2833 host=dynamic mailbox=101@default nat=yes canreinvite=no this is what i have in extensions.conf [outbound] exten = _91NXXNXX,1,Set(CALLERID(num)=mycompanyinc) This is how we have it and it works fine on Asterisk 1.8: Set(CALLERID(number)=insert your number here) exten = _91NXXNXX,2,Dial(SIP/att/${EXTEN:1},80) exten = _9NXX,1,Set(CALLERID(num)=mycompanyinc) exten = _9NXX,2,Dial(SIP/att/${EXTEN:1},80) any ideas? as this happens random, -- Technical Supporthttp://www.cellroute.net -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users