* You are viewing the archive for the ‘Asterisk Tips’ Category

Asterisk: Receiving Incoming SMS On Analog or ISDN Landline

The way to tell if an incoming call is an SMS call or a voice call when receiving incoming SMS on an Analog or ISDN line in Asterisk is by reading the callerid.

Normally there is only one Short Message Service Center (SMS Center) which can send you SMS on a fixed line. By looking at its callerId you can know if it is an SMS call.

In the mobile world, nevertheless, we can not consider an SMS as a call, and the cellphone won’t send a SMS directly to the landline phone. What it will do is to hand the SMS to the carrier used by the mobile SMSC, which then will hand it over the SMSC used by the landline carrier.

Asterisk: How To Create A coredump

In order to create a coredump in Asterisk you must compile it with “DEBUG_THREADS” and “DONT_OPTIMIZE” options turned on, remember to start it with:

# /bin/bash /usr/sbin/safe_asterisk

Se the Asterisk start script coredump-dir (DUMPDROP) as you prefer (the default is /tmp).

Now, send a kill -6 signal to the Asterisk process. That should produce a coredump. Don’t forget to read doc/backtrace.txt

Thanks for reading.

 

Asterisk: Monitoring Your E1 or T1 With Nagios

E1 monitoring/T1 monitoring is a need that we have on a daily basis because the client’s business depends on it. Here you have an interesting script in PERL that will allow you to monitor your E1/T1 with Nagios. Passing the name of the port as an argument will allow you to use it even if it is not yet connected to a telco. Using the Nagios Remote Plugin Executor on the Asterisk server you can execute it. Additionally, it will report bad ports to you in order to avoid the guessing process.

 E1/T1 monitoring script in Asterisk

(more…)

Unable To Create Channel Of Type ‘SIP’ (cause 20 – Subscriber Absent)

I’m using Cicso – Linksys SPA3102 to connect to asterisk. I have followed the official user manual and the blog post here http://www.skelleton.net/2012/08/02/linksys-spa-3102/

When I call an extension say 225 from the analog phone, I can get the IVR I have setup in my dialplan. But when I Call the analog phone extension using a sip phone I get the following error message:

“Unable to create channel of type ‘SIP’ (cause 20 – Subscriber absent)” which usually means that the SIP device hasn’t registered yet. If you are having RTP problems, get sure that uuid-devel and libuuid-devel are installed.

Also note that type=friend should normally be type=peer in this context and for security reasons, it is not advisable to use an extension number as a SIP resource name.

T38 Fax Detection Using g729 and Asterisk VoIP Software

Using T.38 termination with Eutelia provider could present a scenario where you can receive faxes using g729, but not being able to receive it, even if you are able to receive it while using  alaw. This makes you to start suspecting of your VoIP Software.

It might be the case that the remote endpoint, Eutelia, will need to detect the Fax Tones and send the T.38 ReINVITE to you, they may not have T.38 enabled. If that’s the case, your Asterisk installation will need to detect the Fax Tones so as to make the decision the incoming call is a fax and then switch to the fax extension. For Asterisk to detect the Fax Tones you will need to set faxdetect to either yes or cng, you will also require using alaw or ulaw codec.

It might be suggested that you configure your incoming calls from Eutelia to go directly to the fax receive function whilst having the g729 codec enabled, I expect you will then see T.38 re-invite come from Asterisk. (more…)

Asterisk and OpenVPN + SIP configuration

These are the instructions to configure OpenVPN + SIP configuration, based on a brainstorming discussion of the Asterisk Users Mailing List.

The server is running on a uClinux appliance, with /dev/net/tun, and OpenVPN is 2.0.9. The clients will be Windows hosts connecting through Ethernet in hotels or public wifi hotspots.

1. Install OpenVPN on Asterisk server. On appliance, there’s only a single binary /bin/openvpn, and configuration files are in /etc/openvpn/.

To be positive SIP/RTP packets go through the OpenVPN tunnel, make sure the firewall in front of the OpenVPN/Asterisk server only has OpenVPN port open (default: UDP 1194).

2. On client, from http://www.openvpn.net, download and install OpenVPN for Windows, which includes Service + GUI

3. If using an appliance with just the openvpn binary, use a workstation to install the OpenVPN package and create certificates + keys: apt-get install openvpn (more…)