Koozali.org: home of the SME Server

Peer Stanza Name missing since -640

Offline gippsweb

  • *****
  • 232
  • +0/-0
    • Wots I.T.?
Peer Stanza Name missing since -640
« on: September 03, 2008, 07:25:05 AM »
Hi Jeff

Since upgrading to and past 640, when adding a SIP trunk SAIL no longer asks for a Peer Stanza name and defaults to peer.
As most of the AUS carriers require something special for the Peer stanza name, I currently cannot setup any more trunks....

I have tested this on the 2 boxes I have access to and they both do it, both were 640 and I upgraded to 655 just incase it was a bug of some sort.

Is this by default or am I missing something.

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Peer Stanza Name missing since -640
« Reply #1 on: September 03, 2008, 01:45:42 PM »
Hi mate!

Peer name was deliberately removed because it was causing confusion. It now defaults to peer{DiD}, to make each one unique.

Despite what a carrier may say, as far as we are aware, they are unable to reference or require a particular peer name.  Peername is used purely within asterisk for channel selection on an outbound Dial.  Inbound SIP knows nothing of peername, it presents username (not the same thing) and password@domain on the SIP INVITE (which isn't processed by peer logic anyway, it is handled by the USER stanza if you need one - important for IAX but not usually for SIP/PSTN). 

Some carriers (a lot!) confuse peername with username.  A carrier can send you a call in one of two ways, either using the DiD number they allocated to you, or using the account number the gave you.  If they are doing it correctly then you can change this yourself in the registration string (by setting either the DiD number or the username(account number) after the / at the end of the domain name).

SARK will ALWAYS set the peer up to use whatever you put in the DiD as the user name.  If the carrier is sending the call in under the account number and they won't change then you can simply set up a PTT_DiD using the account number instead of the DiD number to route the inbound call.

Which trunks are you having trouble setting up? More than happy to help get them running but I am reluctant to reintroduce user provided peernames until someone can prove to me beyond a shadow of a doubt why its necessary (sorry, that sounded arrogant, not meant to be - support is a lot easier for us without peernames).

:)



Best

Jeff




   

Offline gippsweb

  • *****
  • 232
  • +0/-0
    • Wots I.T.?
Re: Peer Stanza Name missing since -640
« Reply #2 on: September 04, 2008, 12:33:26 AM »
I can see how it makes it easier. I will try this today on my box.
We are using an Aust carrier called World Dial Point. My own box has 2 trunks to them, both identical except for the peer name.
Only one can make outgoing calls and strangely enough it appears as if only the other one can receive them..

I will run some tests and post back later..

Offline gippsweb

  • *****
  • 232
  • +0/-0
    • Wots I.T.?
Re: Peer Stanza Name missing since -640
« Reply #3 on: September 04, 2008, 01:32:42 AM »
OK, here is what I have.

WDP has our usernames in the format xxxx*xxxxx this appears to be working OK from my box here in the shop.
I am changing one of my customers to the same provider, so the same format for the numbers.

Trunk setup is identical to mine, as much as I can see. On their trunk page WDP is showing as disconnected, clicking the state button gives me "Peer peer0094 not found." (this doesn't really concern me as mine has always had a yellow warning triangle).
sip show registry shows the trunk as registered

A call to the remote box shows check_auth: username mismatch, have <peerxxxx*xxxxx>, digest has <xxxx*xxxxx>

I then get a Failed to authenticate user for the incoming call, but I think solving the user mismatch will solve the second issue.

Any ideas Jeff?

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Peer Stanza Name missing since -640
« Reply #4 on: September 04, 2008, 11:11:44 AM »
Have you included insecure=very in the peer stanza?

Offline gippsweb

  • *****
  • 232
  • +0/-0
    • Wots I.T.?
Re: Peer Stanza Name missing since -640
« Reply #5 on: September 05, 2008, 01:33:09 AM »
as it's *1.4 I have insecure=port,invite
just tried insecure=very and that has made no difference...

Both boxes have identical settings in the trunk modify panel. The only difference I can figure is that mine was setup before the peer stanza piece was changed.
« Last Edit: September 05, 2008, 01:38:08 AM by gippsweb »

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Peer Stanza Name missing since -640
« Reply #6 on: September 05, 2008, 10:15:07 AM »
Can you send sip.conf for the failing box to me at admin@aelintra.com please?

Best

Jeff

Offline gippsweb

  • *****
  • 232
  • +0/-0
    • Wots I.T.?
Re: Peer Stanza Name missing since -640
« Reply #7 on: September 07, 2008, 07:20:46 AM »
Looks as though after some long overdue sleep, I may have cured it.
Not looking closely enough at the registration string earlier, I failed to notice that the word peer had been added to the end of it :oops: :hammer:

Will do some testing when I get into work Monday.
Then just to make them show as active under state would be nice, then there'd be no more "it looks like there's a problem" phone calls....
« Last Edit: September 07, 2008, 07:23:20 AM by gippsweb »

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Peer Stanza Name missing since -640
« Reply #8 on: September 07, 2008, 10:51:44 AM »
state was tweaked around 640ish.  I think it should show good.  If it doesn't then let me know and we'll tweak it some  more :)

Best

Offline gippsweb

  • *****
  • 232
  • +0/-0
    • Wots I.T.?
Re: Peer Stanza Name missing since -640
« Reply #9 on: September 08, 2008, 12:59:19 AM »
Am using 640 on them both, mine shows a yellow triangle, the other shows the red cross.
Both appear to be connected and working with both in/out going calls.
Both connected to the same sip provider.

Offline gippsweb

  • *****
  • 232
  • +0/-0
    • Wots I.T.?
Re: Peer Stanza Name missing since -640
« Reply #10 on: September 23, 2008, 08:19:29 AM »
Hi Jeff

What info do you need from me to tweak state to get it showing properly here.
It may well be that there is nothing wrong with it and is just the way our box is talking to our itsp.

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Peer Stanza Name missing since -640
« Reply #11 on: September 23, 2008, 11:03:17 AM »
Internally, the code just issues a "sip show peers" command and then parses the output.  In earlier releases it tried to sort it into meaningful columns but it never really worked properly.  So now, we just pattern match for the stuff we want.  The code is in /etc/e-smith/web/function/sarktrunk (at or around line 299).

Best way forward is to manually do 'sip show peers' on each box and see if they return different values for that trunk.

It will show a tick (checkmark) if it finds OK in the string;  it will show a cross if it finds 'UNKNOWN' or 'UNREACHABLE' and it will show a warning triangle if it finds 'Unmonitored'.

Best

S

Offline gippsweb

  • *****
  • 232
  • +0/-0
    • Wots I.T.?
Re: Peer Stanza Name missing since -640
« Reply #12 on: September 24, 2008, 12:56:43 AM »
okies

the remote box shows the following on a 'sip show peers'


Name/Username                     Host              Dyn   NAT   ACL    Port    Status
peer0094*00008/0094*00008  119.63.204.80                           5060   Unmonitored
peer0094*00007/0094*00007  119.63.204.80                           5060   Unmonitored
5101/5101                           192.168.1.235    D                      5061   OK (15 ms)
5100/5100                           192.168.1.235    D                      5060   OK (14 ms)

That box shows a red cross on the trunks page.

Mine shows basically the same info for a sip show peers, but I get a yellow warning triangle.