Create a Custom SNMP OID On Linux - linux

I have built a prototype board for a raspberry pi, and I would like to create a custom snmp OID that I can talk to, that will give me feed back from my device.
I can get the value back from my device, but I'm not sure where to start with creating a custom OID, registering it and then updating it.
Has anyone got any good places to start, tutorials, example code etc.
Cheers
Luke

The official channel would be to register for a 'Private Enterprise Number' via this link:
http://pen.iana.org/pen/PenApplication.page
After the approval process, you'll receive an OID which you can further branch out and create entire sub-trees of OIDs.
That said, as an individual, you can probably make do with any valid OID for testing purposes.
The "Which OIDs should you use?" section from the following Apache Directory Service article is a useful read:
http://directory.apache.org/apacheds/1.5/31-add-your-first-elements-to-the-schema.html
A related question mentions a UUID approach to OID:
SNMP: Create custom OID

Related

freeswitch sip trunk not receiving inbound calls

my sip trunk provider has given me a user name sip123456 when I configure that siip trunk as a gateway, I can make calls out no problem but I cannot receive any inbound calls! Now I did a lot of investigation and I found out that the user name has to be set as the telephone number for inbound calls to work, is there any other ways to overcome that issue in freeswitch, as my SIP trunk provider is unwilling to change the user name to the matching telephone number?
For information I am unable to provide a log as the call does not even reach freeswitch, my provider does not wish to provide a trace, also this issue happens in Asterisk, and Fusionpbx too! Now to make sure that my findings were correct, I used a different provider with another client, which uses telephone number as the user name, and my configuration works on both incoming and outgoing. I'm sure you would say to dump the other SIP provider but my client wants to find a solution hence I am posting this question...
My sincere apologies for being unable to provide further information such as trace logs etc, but has anyone faced the same issue, if yes what other work around have you used?
I suggest you go to Call Detail Records and find which variable contains the number you called. You would then use that variable for the inbound routes. You can change a setting in Default Settings
Category: dialplan
Subcategory: destination
Type: text
Value: ${sip_to_user}
In this example I used sip_to_user your carrier may send the number that was dialed in that variable or they could send it another way. Either way find your phone number and use the correct variable name. If this setting doesn't exist then add it. Click on the 'Reload' button to make the changes take effect. Go to Dialplan -> Destinations and re-save your inbound destinations and it will rewrite the inbound routes for you with the new variable.
Best Regards, Mark J Crane - FusionPBX Creator

Branch.io: Extract custom value from link

we're facing a problem right now: We're using the SMS gateway feature from branch.io which simply does not work properly worldwide (e.g. Lituanian cell phones won't receive any messages at all).
Therefore i need a fallback method for people that cannot receive an SMS to their phone with the downloadlink in the Appstore. (The branch.io Links have an effect on the branding of our app)
The fallback is to let them use a voucher code which COULD be generated from a custom value that we store for each Link
This is an ordinary Link with its 2 custom values
The landing page http://learnmat.ch/spark7 opens in the browser and i'd like to be able to identify the SponsorID on the website so that i can return a voucher code that is suitable for the specific SponsorID of the Link.
Right now i've already integrated the Web SDK into the website.
Is that "reverse engineering of the SponsorID" possible based on the Link and the WebSDK integration?
I'd really appreciate your help!
Thank you,
Sven
Jackie from Branch here.
Our SMS page service supports international numbers but only if the number the SMS has to be delivered is in the same country the SMS is being sent from. Could you please make sure the sender is physically located in Lithuania? I'd also suggest creating your own Twilio integration if you want to bypass these restrictions we have on our system https://docs.branch.io/pages/web/text-me-the-app/#use-your-own-sms-service
Regarding your fallback method: you want to have users click on a Branch link that will open your website and based on the link data (sponsor ID), you want to provide them with unique voucher codes? If my assumption is correct, you can achieve this by custom event tracking and user identity tracking. (relevant docs: https://docs.branch.io/pages/dashboard/analytics/#user-value-attribution)
Hopefully, this helps. Let us know if you have additional questions about the info above, or about anything else related to integrating Branch.
Best,
Jackie Choi

Creating a conference on Asterisk using ARI with Node.js

I was given a task to create a conference in Asterisk using ARI with Node.js. The objective is create a conference room and send email invitations so people can click and enter de conference room. I also need a admin web interface to show who's talking, mute and some other things.
I don't have any experience in Asterisk. So I need some start point. Innitally I have to create a Channel and then add some SIP to it.
So taking this page as a base: https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Channels+REST+API
I have a configured test server and a sip number (852001). So I opened up Insomnia and create a POST request like this:
http://<serverip>:8088/ari/channels/400?endpoint=852001&extension=400
But allocation failed. So I thought that before I continue with this I have to make some concepts clear:
What do I need to create a conference room ? It's just create a channel or I have to create a bridge first ? What should be the right values in endpoint, extension or app fields ?
Is ARI URLs the best approach or it's better to use node.js's ari-client module ? I'm using urls because I couldn't get any working example on creating a conference with ari-client.
Any code examples on how I could do this would be greatly appreciated. Thanks.
Read Orelly's "Asterisk the future of telephony" as starting point.
ps but do it via ARI only seams like impossible even for expert. Anyway you need some dialplan.

How to properly set VoIP Innovations credentials in RestComm AMI?

I'm having troubles setting up the API username/password from VoIP Innovations in my RestComm AMI.
I've followed the steps described here but the AvailablePhoneNumbers api call returns an empty list.
Then I accessed the instance via ssh and checked for the restcomm.conf file in the standalone folder. My VoiceRSS key was there but the not the VI credentials. I spent some time looking at the other files in $RESTCOMM_HOME and I found one of particular interest: $RESTCOMM_HOME/bin/restcomm/autoconfig.d/config-restcomm.sh
In that file the configVoipInnovations method call was commented and even if it wasn't commented it requires a third argument (the VI endpoint ID, which I'm not sure if it refers to the VI Endpoint Group ID or something else) that wasn't mentioned in the link above.
I also tried editing $RESTCOMM_HOME/standalone/deployments/restcomm.war/WEB-INF/conf/restcomm.conf directly with
<voip-innovations>
<login>my VI Api username</login>
<password>my VI Api password</password>
<endpoint>my VI endpoint group id</endpoint>
<uri>https://backoffice.voipinnovations.com/api2.pl</uri>
</voip-innovations>
But it didn't seem to work. The AvailablePhoneNumbers still returned an empty list.
What am I missing?
#nbermudezs,
In order to send/received SMS you should register an SMS enabled DID. Unfortunately you cannot register such DID via the Admin UI (in contrast with voice DIDs). You should go to your VoipInnovations account dashboard and search for SMS enabled DIDs there. Register the SMS enabled DID of your choice first in VoipInnovations back office and then simply go to Restcomm Admin UI -> Numbers -> +Register Number. From the drop down menu choose US as Country, select the area code for the DID of your choice and in the Number field enter the actual number (without the area code in front of it) then click register. After that you should be able to send/receive SMS from/to your newly registered DID.
#nbermudezs,
Sorry that you are having problems configuring Restcomm for Voip Innovations. When you are using Restcomm AMI, it already comes pre-configured with a default (Demo) Voip Innovation account that will automatically provision DIDs and allow you to choose an Area Code in the United States. Because the configuration script will automatically default to the pre-configured Voip Innovations account, modifying the restcomm.xml file will not work work as expected. Did you try to provision DID using the Admin UI?
On the AMI, this is how to set your VI information
Go to the directory /opt/telestax/restcomm/current/bin/restcomm
edit the file restcomm.conf
Go to the section below and fill out your VI account details. The must be set to PROVISION_PROVIDER='VI'
# DID Provision provider variable declarations
PROVISION_PROVIDER='' # values: VI (VoipInnovation), BW (Bandwidth), NX (Nexmo), VB (Voxbone)
#Username and password for all supported DID provision providers
DID_LOGIN=''
DID_PASSWORD=''
# VoipInnovation Endpoint ID
DID_ENDPOINT=''
Save your changes
You must restart Restcomm as follows
restcomm_stop
restcomm_start

Getting DEVICE_STATE of a trunk user in Asterisk

I am new to Asterisk. We re working on an IVR project in University and we have some queues in queues.conf file. Some of our queue members are not registered in asterisk and we re calling them via trunk. But the problem is that we cant get the DEVICE_STATE information of these devices that is noıt registered in asterisk.
For example when we use Verbose function to see the state of a device; Verbose(${DEVICE_STATE(SIP/XXXX#10.0.0.2)}) it says the phone is INVALID.
But on the other hand we can call this phone via trunk. Is there any way to get the DEVICE_STATE of a phone which is not registered in asterisk and calling with trunk.
Thanks and Regards
you can not use DEVICE_STATE to make a call for external devices.
The short version is no, not that I am aware of. If the device is not registered, then Asterisk literally has no stateful information of the device. Therefore, until Asterisk has some reason to "talk to" the SIP device in question, it doesn't even know if it's on the network. A few quick Google searches didn't even show a way to do a pre-call SIP status enquiry.
Recommended Reading:
https://wiki.asterisk.org/wiki/display/AST/Function_DEVICE_STATE
http://asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/usingCustomDeviceStates.html

Resources