Naomi Rosenberg
2011-Apr-08 09:57 UTC
[asterisk-users] Variable inheritance with dialplan command Originate
Hi, I would have thought that when spawning a channel using the Originate() dialplan command, variables prefixed with two underscores would be preserved. However this does not work in the following case. Dialplan code: [intern] exten => 200,1,Set(__myvar="foo") exten => 200,n,Originate(Local/123 at test_orig,exten,dummy) [test_orig] exten => 123,1,NoOp(${myvar}) exten => 123,n,Hangup() [dummy] /end dialplan code. Console output: -- Executing [200 at intern:1] Set("SIP/200-00000018", "__myvar="foo"") in new stack -- Executing [200 at intern:2] Originate("SIP/200-00000018", "Local/123 at test_orig,exten,dummy") in new stack -- Executing [123 at test_orig:1] NoOp("Local/123 at test_orig-cbab;2", "") in new stack -- Executing [123 at test_orig:2] Hangup("Local/123 at test_orig-cbab;2", "") in new stack /end console output. This is in Asterisk 1.8.3. Is this expected behaviour or a bug, or am I just confused? I would appreciate your thoughts on the matter. Thank you, Naomi
Sherwood McGowan
2011-Apr-08 15:35 UTC
[asterisk-users] Variable inheritance with dialplan command Originate
On 4/8/2011 4:57 AM, Naomi Rosenberg wrote:> Hi, > > I would have thought that when spawning a channel using the Originate() dialplan command, variables prefixed with two underscores would be preserved. > > However this does not work in the following case. > > Dialplan code: > > [intern] > exten => 200,1,Set(__myvar="foo") > exten => 200,n,Originate(Local/123 at test_orig,exten,dummy) > > [test_orig] > exten => 123,1,NoOp(${myvar}) > exten => 123,n,Hangup() > > [dummy] > > /end dialplan code. > > Console output: > > -- Executing [200 at intern:1] Set("SIP/200-00000018", "__myvar="foo"") in new stack > -- Executing [200 at intern:2] Originate("SIP/200-00000018", "Local/123 at test_orig,exten,dummy") in new stack > -- Executing [123 at test_orig:1] NoOp("Local/123 at test_orig-cbab;2", "") in new stack > -- Executing [123 at test_orig:2] Hangup("Local/123 at test_orig-cbab;2", "") in new stack > > > /end console output. > > This is in Asterisk 1.8.3. > > Is this expected behaviour or a bug, or am I just confused? I would appreciate your thoughts on the matter. > > Thank you, > > NaomiI believe that it's expected behavior because you're not creating a "child" channel, you're originating a different set. Try using Dial instead of Originate, and you'll get the inheritance behavior you expected. -- Sherwood McGowan <sherwood.mcgowan at gmail.com> Carrier, ITSP, Call Center, and PBX Solutions Consultant
Naomi Rosenberg
2011-Apr-13 10:14 UTC
[asterisk-users] Variable inheritance with dialplan command Originate
Hi> I believe I made one mistake in my example, I don't use a call to Queue > in my local channel without a partner channel (the customer). I'll > revisit this later today when I have some time, I'll be glad to help you > if I can recall the right solution :)That would explain it. I wonder if we can get it working. Originate turned out to have its own issues (mysteriously hanging itself up after 30 seconds) and preesently my workaround involves an AGI script that writes and copies a call file. Ouch! Naomi
Albert
2011-Apr-13 10:48 UTC
[asterisk-users] accessing currents calls from outside asterisk
Hi, I am working on integration of 2 systems: asterisk and messaging platform. What I need is to access somehow information about current calls. Should I do it over AMI ? I need to be able to perform those 2 actions: - How can I obtain msisdns of current calls ? - How to hangup one of current calls ? Thanks for your help guys! Regards, Albert -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110413/b0097809/attachment.htm>
Pezhman Lali
2011-Apr-15 19:31 UTC
[asterisk-users] accessing currents calls from outside asterisk
yes, ami is your unique answer. what is msisdns ? On Wed, Apr 13, 2011 at 3:18 PM, Albert <alberton at wp.pl> wrote:> Hi, > > I am working on integration of 2 systems: asterisk and messaging platform. > What I need is to access somehow information about current calls. Should I > do it over AMI ? > > I need to be able to perform those 2 actions: > - How can I obtain msisdns of current calls ? > - How to hangup one of current calls ? > > Thanks for your help guys! > > Regards, > Albert > > -- > _____________________________________________________________________ > -- 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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110416/0eeeccea/attachment.htm>
virendra bhati
2011-Apr-18 07:16 UTC
[asterisk-users] accessing currents calls from outside asterisk
Hi *MSISDN* is a number uniquely identifying a subscription in a GSM<http://en.wikipedia.org/wiki/GSM>or a UMTS <http://en.wikipedia.org/wiki/UMTS> mobile network. On Sat, Apr 16, 2011 at 1:01 AM, Pezhman Lali <lopl at lopl.net> wrote:> yes, ami is your unique answer. > what is msisdns ? > > On Wed, Apr 13, 2011 at 3:18 PM, Albert <alberton at wp.pl> wrote: > >> Hi, >> >> I am working on integration of 2 systems: asterisk and messaging platform. >> What I need is to access somehow information about current calls. Should I >> do it over AMI ? >> >> I need to be able to perform those 2 actions: >> - How can I obtain msisdns of current calls ? >> - How to hangup one of current calls ? >> >> Thanks for your help guys! >> >> Regards, >> Albert >> >> -- >> _____________________________________________________________________ >> -- 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 >-- ----- Thanks and regards Virendra Bhati +91-9172341457 Asterisk Engineer -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110418/60b08831/attachment.htm>
virendra bhati
2011-Apr-18 07:21 UTC
[asterisk-users] accessing currents calls from outside asterisk
Hi,* How can I obtain msisdns of current calls ?* Get first 4 digits with cut function of asterisk then cross check with database by odbc connection then you will get the MSISDN details. MSISDN list will be provided my govt of all country. So make your local database to cross check. On Sat, Apr 16, 2011 at 1:01 AM, Pezhman Lali <lopl at lopl.net> wrote:> yes, ami is your unique answer. > what is msisdns ? > > On Wed, Apr 13, 2011 at 3:18 PM, Albert <alberton at wp.pl> wrote: > >> Hi, >> >> I am working on integration of 2 systems: asterisk and messaging platform. >> What I need is to access somehow information about current calls. Should I >> do it over AMI ? >> >> I need to be able to perform those 2 actions: >> - How can I obtain msisdns of current calls ? >> - How to hangup one of current calls ? >> >> Thanks for your help guys! >> >> Regards, >> Albert >> >> -- >> _____________________________________________________________________ >> -- 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 >-- ----- Thanks and regards Virendra Bhati +91-9172341457 Asterisk Engineer -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110418/e771dd1e/attachment.htm>