Src: https://www.tm.com.my/Office/Business/SME/Solutions/Pages/Multi-Line-SIP.aspx Happy to say that we’ve successfully set up Asterisk 11 or higher with TM’s Multi-Line SIP which basically uses IMS signaling on Huawei devices used by Telekom Malaysia. We had to modify chan_sip.c and parser files to support TEL: URI for INVITE messages. Currently, we have enabled it to support incoming INVITES only.
TM doesn’t require to send TEL: uri for outgoing calls and the usual SIP: uri is perfectly fine. There are several steps involved and i will blog about it later (when i have the time). Generally its 1) Getting the hack from here: http://forums.asterisk.org/viewtopic.php?f=1&t=76432 2) Adding one or two more TEL support in the parser file 3) Configure trunks and registration 4) Setup an incoming dialplan to chomp down parts of the SIP header to be used as CallerID and DID values respectively. 5) Enable ringing into all inbound routes We successfully tested incoming, outgoing, transfers using standard codecs. The audio quality is nearly as good as PRI tho sometimes, takes a bit longer to handshake the INVITE messages but its hardly noticeable. We might be able to send messages too over regular IP or SMS, i think that’s why the IMS is chosen in the first place, to enable multimedia over voip protocols. If you need help, write to us [email protected] and if you use Asterisk in a non-commercial environment, i will set it up for free
For more information on TM’s MLS: https://www.tm.com.my/Office/Business/SME/Solutions/Pages/Multi-Line-SIP.aspx Have a good one.
Now open the Dockerfile using your favorite editor and copy this into the file.
FROM "golang" COPY . . RUN go get -u github.com/gorilla/mux CMD ["go", "run", "main.go"]
Now let’s go through the line. First line is saying that we will be using image from official golang image in docker hub. This is basic image for our container.
What COPY does is it will copy file from current directory to the directory in the container. For more advance use case, the location might be different depending on the application design.
RUN is command that will be run in the container. Example above showing gorilla/mux package is being installed to our container.
CMD is the command the container executes by default when you launch the built image. So when we spin our container, it will execute main.go file.
Once Dockerfile been created, we can start building the container by using this command.
docker build -t go-restapi .
Docker build will start the building process in current directory. -t option is used for naming our container. Once done, we can start the container using this command.
docker run --rm -it -d -p 8000:8000 go-restapi
Use -d option to run it in background. The app will be available at
http://<host ip address>:8000.