Showing posts with label voip. Show all posts
Showing posts with label voip. Show all posts

Monday, December 5, 2022

VOLTS - framework for testing VoIP deployments

 Last year I was working on VOLTS - framework I'm using for testing VoIP deployments in automated way. 

Right now it combines tools like voip_patrol and sipp in one tool with some extra features like database write/delete and media file check.

Not to repeat here all README, two links - github and the following video will tell it all.



 


Do you test your deployments?

Friday, October 15, 2021

Functional testing of VoIP infrastructure

 Sometimes, it's really hard to test VoIP infrastructure in an automated way. The usual way of testing any telco system is to take a phone, make some calls and that's it. Maybe to look at the logs. 

Some of the engineers going further and using famous SIPP, which is quite good in testing low-level SIP, but really could be a pain in some closer-to-world scenarios.

Another approach is to write some scripts and automating Asterisk or FreeSWITCH to do some test calls. And it's a good approach, but sometimes writing something simple could take a lot of time. And attention.

But there is one more way - use standalone SIP libraries like baresip or pjsip and control them via API or CLI.

Exactly this way was taken by Julien Chavanton in his voip_patrol project. After a short time of playing around with it, I can say it's a really good combination of simplicity of things it can test and a way it's configuring.

In my current position, I'm dealing mostly with opus/SRTP media (in DTLS-SRTP flavor) and I was able to add support of this  to voip_patrol (in this branch) and it's working well with rtpengine provided SRTP.

And here is just an example of voip_patrol scenario to register TLS endpoint, make a call with SRTP and catch it back. So, a simple register-call test as a good starting point for more complex scenarios. 

 

<config>
  <actions>
  <action type="codec" disable="all"/>
    <action type="codec" enable="pcma" priority="250"/>
    <action type="codec" enable="pcmu" priority="249"/>
    <action type="register" label="Register 88881"
            transport="tls"
            account="88881"
            username="88881"
            password="XXXXX"
            registrar="XXXXX"
            realm="XXXXX"
            expected_cause_code="200"
            srtp="dtls,sdes,force"
    />
    <action type="wait" complete="true"/>
    <action type="accept" label="Receive all calls"
            account="default"
            hangup="10"
            code="200" reason="OK"
            transport="tls"
            srtp="dtls,sdes,force"
    />
    <action type="call" label="Call to 88881"
            transport="tls"
            expected_cause_code="200"
            caller="88882@XXXXX"
            callee="88881@XXXXX"
            from="sip:88882@XXXXX"
            to_uri="88881@XXXXX"
            max_duration="20" hangup="16"
            username="88882"
            password="XXXXX"
            realm="XXXXX"
            rtp_stats="true"
            max_ringing_duration="15"
            srtp="dtls,force"
            play="/git/voip_patrol/voice_ref_files/reference_8000_12s.wav"
    />
    <action type="wait" complete="true"/>
  </actions>
</config>

 

For more advanced, I suggest to look on issues [1, 2] on GitHub, where author expands some concepts.

And as a good quickstart - video from author


UPDATE: Based on this tool, templating and reporting suite VOLTS was created. Stay tuned for more cool features to come!

Wednesday, April 11, 2018

FreeSwitch - call through registered extension

Sometimes with SIP PBX you have a trunk, that registers on PBX. Most common example - various gateways.
Asterisk has a simple solution for this (as in Asterisk difference between trunk and extension is more cosmetic, than functional), but FreeSWITCH uses concept of gateways.

But it's a very powerful system. So we will make bridge statement by ourselves.

Adoption for FusionPBX.

condition - destination_number - ^(\d{10,20})$
action - set - reged_ext=username_of_extension
action - set - num_to_dial=$1
action - bridge - {absolute_codec_string='${outbound_codec_prefs}'}${regex(${sofia_contact(${reged_ext}@${domain_name})}|(^\w+/\w+)/|%1)}/sip:${num_to_dial}@${regex(${sofia_contact(${reged_ext}@${domain_name})}|(\d+.\d+.\d+.\d+:\d+.*)|%1)}


Original source (rus)

Monday, March 14, 2016

Telecom and VoIP for non-specialists. Part 1.

Hello to all!
One of mine friends suggests me to start a series of articles about telecom, PBXes and other stuff I work with. For a non-telecom boys and girls. So, why not?

And I’d like to start with a disclaimer. All you will read here is not «last and final truth». It’s just mine point of view on things I work with. I work mostly with SMB market, so if you come and ask something about large distributed call-centres with tons of queues and agents, and reports… I know basics of telecom and using this knowledge I can answer how to build this. But honestly - I like to be more close to ground. Reason - you speak to people more, than to machines. And all this «bloody enterprise» things make me feel like a hamster in a ball. Endless reports, numbers, conversions… Boring. Much more interesting to work with SMB. And easier, of course. And - no possible to work for something really heavy all alone. That’s may be the real reason. So, back to disclaimer, all here is my own opinion. Can be right, can be wrong, but based on experience. If you think I’m wrong somewhere - you’re welcome to comments :) Also, english - is not my native, so there would be errors, but hope, everybody can catch main idea.

Let’s start than with little dive-in.
History of telecom starts earlier, than history of computers and IT. And for many years computers and telecom industry was close, but really not the same, like nowadays. They have separate standards, separate networks, different ideology.
And ok, let’s narrow a bit our field of view and talk about PBX’es. What PBX is? Normally you see a phone on your work desk or home. You know, if you dial a number, you can talk to person you’ve dialed. But how your phone is connected to other’s? It’s done via PBX.
First PBX’es was actually alive girls who manually switches wires from one jack to another. Actually, «jack» connector is from these times. Later girls were replaced by electrical mechanics. If you are old enough or live in some god’s forgotten place with telephone, you can remember disk phones or when you push buttons on your phones, you can hear «ticks» depends on digit dialed. That is actually commands to PBX mechanism.
Next big era is fully digital. You may heard ISDN abbreviation. That’s it. Still alive and well. But, modern system use 10-20% of this standard. ISDN was designed not only a voice carrying network, but data also. But, for data it was really expensive and data was moved to other networks. That’s why sometimes ISDN is decoded as It Still Does Nothing ;)

That’s it for now. Muse had left me. In next part we will talk about nowadays.