Incoming Sip Trunks Work Half The Time

Hey Guys,

This is my first post on here. I try not to as for help too much, but this one has me stumped.

The problem is this, my inbound Sip Trunk calls work only about half the time while outbound works 100% of the time.

I’m running FreePBX 2.5.2.3 behind a Fios router with UDP ports 5060-5082 and 10000-20000 forwarded to my PBX’s IP. Nat is also setup with my public IP and internal network of 192.168.1.0/255.255.255.0 in sip_nat.conf.

The provider for the sip trunks is voipvoip.com

There is in inbound rout setup to go to a ring group on any DID/any CID

Sip Trunk config:

-Inbound

[5555XXXXXX]
disallow=all
username=5555XXXXXX
type=user
secret=XXXXXX
nat=yes
insecure=port,invite
host=sip3.voipvoip.com
fromdomain=sip3.voipvoip.com
dtmfmode=rfc2833
context=from-sip-external
allow=g729
allow=ulaw
allow=alaw
allow=ilbc
qualify=yes

-Outbound

[VoipVoip.com]
disallow=all
allow=g729
allow=ilbc
allow=ulaw
allow=alaw
dtmfmode=rfc2833
fromdomain=sip3.voipvoip.com
fromuser=5555XXXXXX
host=sip3.voipvoip.com
insecure=port,invite
nat=yes
secret=XXXXXXX
type=peer
username=5555XXXXXX
qualify=yes

the registration is: 5555XXXXXX:[email protected]/5555XXXXXX

-I did a “sip show peer” after a call failed and this is what I got

pbxCLI> sip show peer voipvoip.com
pbx
CLI>

  • Name : VoipVoip.com
    Secret :
    MD5Secret :
    Context : from-sip-external
    Subscr.Cont. :
    Language :
    AMA flags : Unknown
    Transfer mode: open
    CallingPres : Presentation Allowed, Not Screened
    FromUser : 5555XXXXXX
    FromDomain : sip3.voipvoip.com
    Callgroup :
    Pickupgroup :
    Mailbox :
    VM Extension : *97
    LastMsgsSent : 32767/65535
    Call limit : 0
    Dynamic : No
    Callerid : “” <>
    MaxCallBR : 384 kbps
    Expire : -1
    Insecure : port,invite
    Nat : Always
    ACL : No
    T38 pt UDPTL : No
    CanReinvite : Yes
    PromiscRedir : No
    User=Phone : No
    Video Support: No
    Trust RPID : No
    Send RPID : No
    Subscriptions: Yes
    Overlap dial : Yes
    DTMFmode : rfc2833
    LastMsg : 0
    ToHost : sip3.voipvoip.com
    Addr->IP : 69.90.209.56 Port 5060
    Defaddr->IP : 0.0.0.0 Port 0
    Def. Username: 5555XXXXXX
    SIP Options : (none)
    Codecs : 0x50c (ulaw|alaw|g729|ilbc)
    Codec Order : (g729:20,ilbc:30,ulaw:20,alaw:20)
    Auto-Framing: No
    Status : OK (95 ms)
    Useragent :
    Reg. Contact :

-Let me know if you need any more info. I do have some sip debug printouts too

Thanks,
GizmoBuddy

Please santize your secrets when posting

This might be related to your problem:

Expire : -1

that comes form a version of Asterisk that has a bug in it, it’s possible to override it with a sip setting but I don’t recall the setting.

However, typically if that were the problem it would fail all the time not just part of the time. None the less, you will want it fixed and then you can see if it has any impact on your issue.

If that’s the case it could be possible that an update of the system could fix the issue. I’ll give that a shot.

And, those aren’t the real secrets. I just injected the X’s

you had what looked like a real secret in one of them.

I edited it and replaced it with XXXXXs, but you may want to go and change your secret in case it was out on the internet long enough to get hacked.

I owe you one, then. Thank you

Well, i’m not sure what was wrong, but i went and grabbed some trunks from SipStation and they work perfectly without my having to do ANYTHING. The Firewall test even checked out.

I think I’ll just be canceling my voipvoip account. Thanks for the help guys.

-Gizmo

Thanks for posting back. I’ll look forward to your post this evening.

I am sure you’re probably right…
At least, I feel like it should be a simple fix (e.g. “just add _____ to the _____.conf file”, or “just check the ______ box”).

But I can’t figure out where I’m going wrong.

I have done the SIP Station firewall test and it comes back as “pass”

Side Note (possibly related??):
I have checked with my ISP and I don’t think they are the issue… though the set up is a little odd.

Our internet service is provided by our local utility (FiberNet - http://www.morristownutilities.org/Technology.html) and they say that our IP address is assigned through DHCP, but that it won’t change (static characteristics), i.e. that it locks onto the MAC address of our router. Since two-way voice works on outbound calls I don’t really think that they are the problem… But I wondered if I would need to change my PBX settings since it’s not truly a static IP (at least in the way I’m familiar).

I don’t know if these screen shots will help anything, but here are some further details (3 pics inside the FreePBX web control – Asterisk Inf, and Sys. Info)

http://picasaweb.google.com/llaplue/FreePBXTroubleshoot?authkey=Gv1sRgCIHB74XJ6c-ViQE&feat=directlink

Thanks,
Lawrence

It sounds to me like you don’t have your internal/external ip address set in the system.I’m at work right now, but I’ll try to get the info for you when I get home.

One good way to test to see, is by running the freepbx sip trunk firewall test through the module.

Hi,

I have a similar problem (outgoing call no problem, incoming callers can hear me, but I can’t hear them)
Forwarding 5060-5070, and 10000-20000 UDP to my FreePBX.
I performed a fresh install 4 days ago (CentOS 5.5, FreePBX 2.8.0.4, Asterisk 1.8.2.2)
All modules are up to date (including SIP Station) and I am using (or trying to use) two SIP Station trunks.


  • Name : fpbx-1-6104d9aa
    Secret :
    MD5Secret :
    Remote Secret:
    Context : from-pstn
    Subscr.Cont. :
    Language :
    AMA flags : Unknown
    Transfer mode: open
    CallingPres : Presentation Allowed, Not Screened
    Callgroup :
    Pickupgroup :
    MOH Suggest :
    Mailbox :
    VM Extension : *97
    LastMsgsSent : 32767/65535
    Call limit : 0
    Max forwards : 0
    Dynamic : No
    Callerid : “” <>
    MaxCallBR : 384 kbps
    Expire : -1
    Insecure : port,invite
    Force rport : Yes
    ACL : No
    DirectMedACL : No
    T.38 support : No
    T.38 EC mode : Unknown
    T.38 MaxDtgrm: -1
    DirectMedia : No
    PromiscRedir : No
    User=Phone : No
    Video Support: No
    Text Support : No
    Ign SDP ver : No
    Trust RPID : Yes
    Send RPID : Yes
    Subscriptions: Yes
    Overlap dial : Yes
    DTMFmode : rfc2833
    Timer T1 : 500
    Timer B : 32000
    ToHost : trunk1.freepbx.com
    Addr->IP : 216.82.225.24:5060
    Defaddr->IP : (null)
    Prim.Transp. : UDP
    Allowed.Trsp : UDP
    Def. Username: 6104d9aa
    SIP Options : path precondition replaces replace timer
    Codecs : 0x104 (ulaw|g729)
    Codec Order : (ulaw:20,g729:20)
    Auto-Framing : No
    100 on REG : No
    Status : OK (79 ms)
    Useragent :
    Reg. Contact :
    Qualify Freq : 60000 ms
    Sess-Timers : Accept
    Sess-Refresh : uas
    Sess-Expires : 1800 secs
    Min-Sess : 90 secs
    RTP Engine : asterisk
    Parkinglot :
    Use Reason : No
    Encryption : No

    > doing dnsmgr_lookup for 'trunk2.freepbx.com'
    > doing dnsmgr_lookup for 'trunk1.freepbx.com'
    > doing dnsmgr_lookup for 'trunk2.freepbx.com'
    > doing dnsmgr_lookup for 'trunk1.freepbx.com'
    

== Manager ‘admin’ logged on from 127.0.0.1
== Manager ‘admin’ logged off from 127.0.0.1
> doing dnsmgr_lookup for ‘trunk2.freepbx.com
> doing dnsmgr_lookup for ‘trunk1.freepbx.com
> doing dnsmgr_lookup for ‘trunk2.freepbx.com
> doing dnsmgr_lookup for ‘trunk1.freepbx.com
== Manager ‘admin’ logged on from 127.0.0.1
== Manager ‘admin’ logged off from 127.0.0.1
== Manager ‘admin’ logged on from 127.0.0.1
== Manager ‘admin’ logged off from 127.0.0.1
> doing dnsmgr_lookup for ‘trunk2.freepbx.com
> doing dnsmgr_lookup for ‘trunk1.freepbx.com
== Manager ‘admin’ logged on from 127.0.0.1
== Manager ‘admin’ logged off from 127.0.0.1
– Remote UNIX connection
– Remote UNIX connection disconnected
> doing dnsmgr_lookup for ‘trunk2.freepbx.com
> doing dnsmgr_lookup for ‘trunk1.freepbx.com
> doing dnsmgr_lookup for ‘trunk2.freepbx.com
> doing dnsmgr_lookup for 'trunk1.freepbx.com
pbx*CLI>


The last few lines (doing dnsmgr_lookup, etc.) just cycle about every minute or two.

I notice I have the same "Expire: -1"
But don’t know where I adjust that setting (and obviously, the solution of switching to SIP Station trunks won’t solve my problem :slight_smile:

Any insight would be appreciated.
Thanks,
Lawrence