Koozali.org: home of the SME Server

Sail SIP Trunk

Offline rcasado

  • **
  • 24
  • +0/-0
Sail SIP Trunk
« on: April 30, 2007, 09:42:24 PM »
Hello  :)

First and foremost, my compliments to Selintra and his Sail PBX. This is a GREAT contrib! Onto my dilemma and please excuse my inexperience with Sail. Most of my experience is with Trixbox and I'm fairly new to it too.

I've set up a SIP trunk in sail as follows:

context=from-pstn
dtmfmode=rfc2833
type=peer
host=callcentric.com
qualify=3000
canreinvite=no
username=1777XXXXXXX
fromuser=1777XXXXXXX
secret=password
insecure=very
disallow=all
allow=alaw
allow=ulaw

Reg String: 1777XXXXXXX:password@callcentric.com/1777XXXXXXX

The trunk works right out of the gate and outbound calls never fail. OTOH, inbound connections to Asterisk from the ITSP will randomly drop every five minutes (for three or four seconds at the most) and then re-establish.  :?

Callcentric (the ITSP) has a realtime status screen that will show you when the phone is registered and when it is not... and it's accurate. The SIP channel is dropping, but only on their side. The Asterisk CLI will always show the peers in OK status and the STATE definition in the Trunk Definitions will show clear too.

The same exact problem occurs with Trixbox and the fast and dirty workaround in TB is to check the "allow anonymous SIP calls" tickmark. Once TB is set to allow anonymous SIP, it never drops again.

Both the SMEServer and the TB are in standalone mode behind a firewall and the firewall provides QoS. Neither of the boxes have the SIP ports forwarded to them. (Yes, I know that's probably the cause but please bear with me. Perhaps I've stumbled onto something here that may be of some value.) I'm not very keen on port forwarding anything unless I absolutely have to. TB works 100% of the time when the "allow anonymous" flag is checked. I was just wondering if there is a way to do this in Sail? Does allowing anonymous SIP create a big security hole in server only environments like the one I've described?

Thank you,

Offline gippsweb

  • *****
  • 232
  • +0/-0
    • Wots I.T.?
Sail SIP Trunk
« Reply #1 on: May 01, 2007, 01:29:17 AM »
change your context to context=mainmenu instead of context=from-pstn ..
From-pstn is the default context in asterisk but in sail is't mainmenu.

That should solve your problems, that is unless you've changed the defaults in extensions.conf ??

Offline rcasado

  • **
  • 24
  • +0/-0
Sail SIP Trunk
« Reply #2 on: May 01, 2007, 03:54:20 PM »
Thanks for the info gippsweb. I've changed the context to mainmenu, but still no joy. The trunk was set up in default to begin with, but per the ITSP's setup guide, I tried context=from-pstn just to see if it would resolve the problem.

On a fluke, I set up a couple of other SIP trunks and they didn't drop out... so the problem seems to be specific to Callcentric. (CLI -> sip set debug verified this). Setting the defaultexpiry to 90 and the maxexpiry to 160 in sip.conf seems to have stabilized the problem... for now.

Aside for the obvious (which is finding another ITSP); will a global change in the default and max expiry periods affect Sail's performance?

Thanks!

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Sail SIP Trunk
« Reply #3 on: May 01, 2007, 10:28:00 PM »
Quote
will a global change in the default and max expiry periods affect Sail's performance?


No, I don't think so.  But I am confused as to why changes at the registered end should have any effect on what's going on up at the ITSP.  I looked at the Free/Trix pages and no-one seems to know what the unsolicited switch actually does so, short of spinning up a copy and doing a diff on extensions I guess I'll have to remain ignorant (no change there then :-)).

Anyway, what is an unsolicited call?  Aren't they all?



Still confused

Selintra

Offline rcasado

  • **
  • 24
  • +0/-0
Sail SIP Trunk
« Reply #4 on: May 02, 2007, 01:23:04 AM »
Not as confused as I am  :)

Anyway, I originally set up the Sail box with a single ITSP as a test box. The problem became apparent after I added a second trunk to a different ITSP last night. One trunk failed, one didn't. The Asterisk CLI gave me this debug message: NOTICE[4564]: chan_sip.c:12080 handle_response_register: Outbound Registration: Expiry for callcentric.com is 160 sec (Scheduling reregistration in 145 s) so I went into the sip.conf and dropped the expiry periods.

What had me totally confused is that the same error would occur in TB and by checking the "allow anonymous SIP calls" tickmark, it would work.  :shock:

One thing is sure. The more I know about Sail, the better I like it. After changing the expiry times, the little box has been humming along nicely.

Thank you for all your efforts!

Offline gippsweb

  • *****
  • 232
  • +0/-0
    • Wots I.T.?
Sail SIP Trunk
« Reply #5 on: May 02, 2007, 04:24:59 AM »
Quote
checking the "allow anonymous SIP calls" tickmark


OK, I give up. Where is that option hidden and on which version?

Offline rcasado

  • **
  • 24
  • +0/-0
Sail SIP Trunk
« Reply #6 on: May 03, 2007, 05:27:04 PM »
Hello gippsweb,

It's in TB -> FreePBX -> General Settings.