I am using Asterisk & java application for voip project in centos.
Now i am trying to use open source softphone on same machine where asterisk present. I try pjsua but when ever asterisk on pjsua not work & when ever asterisk stop pjsua works...
Now i am also trying to find out in Asterisk there is App-Konference..is there way to fetch audio coming from 1 sip phone to asterisk & we can send it. like softphone do?
Means person who handle asterisk server he also talk with other sip phones...
Is this possible?
You need to change the port pjsua is listening on. Asterisk is listening on udp 5060 and your phone wants to listen on the same port.
Change the port to 5061 and you will be fine.
I do not understand the sacond part of your question.
What do you want to do exactely?
Related
I'm working with Asterisk 14.7.6 and Freepbx 14.0.13.23 in a ec2 instance on AWS
At this moment I have a sip trunk with 3CX server working, I need to make another one with the same one.
I have had an idea of add another NIC in the asterisk and add externip parameter in the sip.conf file to add anocher sip trunk and I did it. When I puted sip show peers in the asterisk console, it shows "Status OK (100 ms)" but in 3CX the traffic incoming was from the first trunk.
It's possible create this kind of sip trunk? or I need to launch another machine create a kind of bridge between my asterisk and 3CX?
Thanks,
Only way do that without starting second INSTANCE of asterisk is use chan_pjsip or combination of chan_pjsip+chan_sip.
For first variant you should do multiple endpoints entity. For second just put one channel on one ip, second on other ip.
You also can start more than one asterisk process on host by using
asterisk -C asterisk_config.conf
Long time Asterisk user but fairly new to OpenSIPs. I have a SIP phone working with audio both directions when registering to and receiving calls directly from Asterisk. The same phone works with 2 way audio if I register to OpenSIPs and receive a call from OpenSIPs but only IF the call originated from somewhere OTHER than our Asterisk server.
Example that works:
Call from PSTN > OpenSIPs > SIP Phone (registered to OpenSIPs)
Call from PSTN > Asterisk > SIP Phone (registered to Asterisk)
Example that does NOT work, one way audio issues:
Call from PSTN > Asterisk > OpenSIPs > SIP Phone (registered to OpenSIPs)
I am trying to offload all our registrations from Asterisk to OpenSIPs but when we pass the call from Asterisk to OpenSIPs the call goes to the phone registered to OpenSIPs but has one way audio.
Don't believe it to be a firewall issue because we have tested while firewalls on both Asterisk and OpenSIPs are off.
Have tested many theories but, I'm at a loss at this point, out of ideas. I thought I would ask the smart folks here.
Thanks in advance for any help.
I fixed this by setting nat=yes in the sip.conf on Asterisk server under the configuration for the OpenSIPs server.
I noticed that when I tested on a newer version of Asterisk I got better errors in the Asterisk console. I noticed Asterisk was trying to send the RTP to the private LAN IP of the endpoint (my sip phone) instead of the public IP of my internet connection where the phone is located. Not sure why it was trying to do that. I am wondering if OpenSIPs needs to be modified. Was puzzles me is that I have NEVER had to set nat=yes on Asterisk when sending calls to servers with static public IP. In this case I am sending calls to an extension like 456#xxx.xxx.xxx.xxx where xxx is the public static IP of my OpenSIPs server so, no NAT involved there. The NAT comes into play when the call is sent to the endpoint which is behind a NAT. Makes no sense to me why I should have to set nat=yes to make this work but, this was an immediate fix. Will research more later, might need a change on the OpenSIPs side instead of nat=yes on the Asterisk side.
I am using PJSIP for a SIP application and have the following problem. When I register via UDP with register URI "sip:test#172.31.5.153:5060" the register works fine. When a SipPhone calls via UDP it works fine but when the SoftPhone calls via TCP the application answers with a SIP OK where the "transport=tcp" param is missing in the contact of the SIP OK and so the Softphone declines the call. Does anybody knwos this problem and knows a easy solution? Thanks
The behaviour you described sounds like it could be perfectly "valid" sip proxy behaviour as defined in the SIP RFC depending on what the proxy supports against what you have setup in pjsip.
My guess is that you didn't setup the UDP transport correctly in pjsip setup?
What you have to remember is that the proxy is perfectly valid to send NEW dialog messages to the "contact" address.
Normally you have to setup both a UDP and TCP transport for pjsip even with using UDP by default because the SIP message size can get too big for UDP and have to use a TCP connection.
If you want to always connect via TCP you must add ";tansport=tcp" in the account pjsua_acc_config::id field where you setup the sip address for the account.
I would also recommend that if the pjsip client is connect via the internet via a NAT that you also turn on rport support (and hope that the proxy server support rport correctly) as it may be impossible for the sip server to create a TCP/UDP connection back to you when you are behind a NAT.
I am having some trouble with my asterisk install hanging up calls.
Initially I was having no audio on my calls so I opened up the ports to my gsu gateway which is on a different network then my asterisk box. I opened up the port on the gsm gateway side with is behind not and that resolved the audio issues
Now the issue is that asterisk drops the calls. I have checked and the rtp packets stream is only sending packets and doesn't seem to be getting anything back.
The asterisk box is hosted on vultr with Ubuntu server.
Any idea on whats going on?
Hangup in 10-12 seconds after call started usually issued by incorrect nat settings. Asterisk can't send back response to softphone/hardphone and hangup line(it think no internet connection to device).
See http://www.voip-info.org/wiki/view/Asterisk+SIP+NAT+solutions
In your case it also can be firewall or bad virtualization setup.
my setup would look like this:
ubunutu linux pc running Asterisk Server
analog phone connected to the VOIP ATA adapter
VOIP ATA adapter connected to Asterisk Server via Ethernet
I have only found information about setting up an extension within the Asterisk Server for the ATA. Here the SIP account for the phone is configured within Asterisk, it becomes clear to me that the Asterisk Server needs to be powered on at all times, otherwise the ATA won't be able to send/receive any phone calls.
My Question
Is it possible to let the ATA adapter store and manage the SIP accounts while the Asterisk Server monitors incoming calls (I need the called id) and also can send a desired phone number to the ATA to initiate an outgoing call. With this even if the Asterisk Server is powered down the user still is able to make/receive calls via the ATA adapter using the analog phone. If this is possible, could you please give me a reference or hint how to setup the Asterisk extension for this situation?
If you have linksys adapters, you can create dialplan on adapters to callout directly other adapter(with static ip) in case if server is down.
On most adapters you can use backup proxy if primary proxy failed
Thats all.
In most case if your server is down, you have no phone service