Issue with outside calls using a SIP trunk through a SIP device

Hi Everyone,

I cannot make outside calls through a SIP trunk.
My network is like this:
Asterisk -> network switch -> SIP device (from VoIP provider contaning a number of external SIP lines).

Let us say that’s the Asterisks IP is a.a.a.a and SIP device IP=a.a.a.b, SIP server IP=c.c.c.c and DTMF=Inband.

I did configure a SIP and PjSIP trunks also the outgoing routs but still, I can’t make external calls.

Q1: Which trunk I should use SIP or PjSIP?
Q2: What is the correct config for the trunk?
Q3: How to set the Direct Outward Dialing (DoD)?

Looking forward to your help.

You’ll need to describe and show what actually happens when you attempt, and the configuration.

Hi jcolp,

  • Current config for the sip trunk
    type=peer
    host=c.c.c.c
    bindport=5060
    gateway=a.a.a.b
    dtmfmode=rfc2833
    nat=yes

On CLI it shows its online.

When I make the call to 9xxxxxxxxxx there is no tone and says “the number is not answering” but the call didn’t go through.

If you’re using FreePBX for configuration, then I’d suggest using the FreePBX community site instead for assistance. Most individuals here do file configuration of Asterisk instead, which is different.

We don’t support GUIs here, so please provided configurations as text files.

bindport, on chan_sip, cannot be used for an individual peer; it must be in the general section.

Why do you believe you need to set nat=force_rport, comedia, when you haven’t mentioned any NAT, and your configuration doesn’t have the external address information needed to support Astierisk behind NAT? (You’ve used a deprecated way of specifying these options.)

Do you really have a SIP proxy at a.a.a.b? Or is this just an IP gateway?

You don’t appear to have any registration information for chan_sip, but, if I’ve deciphered the GUI correctly, you do for pjsip.

You have an outbound proxy in the chan_sip configuration, but not the pjsip one.

You don’t appear to have any NAT workarounds in your pjsip configuration.

“the number is not answering” but the call didn’t go through.

This message is not a standard behavour of Asterisk. I presume it is generated by code provided as part of your GUI; you need to get support from the GUI community, e.g. https://community.freepbx.org, for FreePBX.

For the avoidance of doubt, you should not configure pjsip and sip at the same time, unless they are bound to different port numbers or interfaces.

Thank you @david551

[quote=“david551, post:6, topic:85395”]
We don’t support GUIs here, so please provided configurations as text files.
[/quote] No problem what files you want me to post?

[quote=“david551, post:6, topic:85395”]
Why do you believe you need to set nat=force_rport, comedia, when you haven’t mentioned any NAT, and your configuration doesn’t have the external address information needed to support Astierisk behind NAT?
[/quote] I used many different configurations for testing thats why.

Do you really have a SIP proxy at a.a.a.b? Or is this just an IP gateway? Yes its same as the SIP server address witch is c.c.c.c
a.a.a.b is the device ip.

[quote=“david551, post:6, topic:85395”]
For the avoidance of doubt, you should not configure pjsip and sip at the same time, unless they are bound to different port numbers or interfaces.
[/quote] I’m not using booth at the same time I disable one of them during testing.

I don’t understand. I assumed you had it configured as a SIP proxy, but it appears that gateway doesn’t actually a valid option for chan_sip.

Its also confusing to me should I use it as a VoIP gateway or else.

It is like this:
a.a.a.b / IP to access the device GUI.
c.c.c.c / IP given by the SIP provider (SIP Server IP) the Proxy server is already configured by SIP provider inside the SIP device lets say its d.d.d.d

hi, i already have asterisk server. I can talk to extensions in my network without any problems. I purchased 3 different SIP services from outside. I installed it on server. is working. my problem is this; I don’t know when I received a call from the # 1 SIP account. I don’t know when I received a call from SIP account # 2. just my phone rings and i start talking. How can I find out which SIP account my phone has received before I pick up the phone?

I want to tell you that when we get a call from outside trunks I can’t see which trunk it came from on the screen. For example when I call extensions I can see the number on screen but when I receive outside trunks I can’t see them on telephone screen.