Capture incoming call origin number

Apr 30, 2013 at 3:35 PM
Greetings friends, I can help you determine how to get the home number of an incoming call to an extension.
Coordinator
Apr 30, 2013 at 5:05 PM
What version of asterisk are you using?
Apr 30, 2013 at 5:07 PM
Hi, Asterisk 1.8
Coordinator
May 1, 2013 at 8:55 AM
You will want to hook into the NewState event, and (as the framework doesn't currently support asterisk 1.8 directly) use the following:
e.Attributes["connectedlinenum"]
e.Attributes["connectedlinename"]
We will add properties for these in the next milestone, but you can access them using Attributes in the mean time.
May 2, 2013 at 6:13 PM
you have a more complete example, I could put together the code, thanks
May 7, 2013 at 12:48 AM
Edited May 7, 2013 at 12:51 AM
Greetings, as I run this code from asternet?:

s,1,Set(MyVar=${CALLERID(num)})

I really appreciate your help
Coordinator
May 7, 2013 at 9:46 AM
That's asterisk dialplan code, nothing to do with AsterNET.

If you want to read "MyVar" from AsterNET then you need to call
var myVar = GetVariable("MyVar");