Sipura SPA-3000 PSTN Outgoing - Asterisk problem

Discussion in 'UK VOIP' started by Peter Watson, Mar 7, 2006.

  1. Peter Watson

    Peter Watson Guest

    I've had my SPA-3000 successfully working for both incoming and outgoing
    calls to/from the PSTN but outgoing calls have stopped working!!

    I'm using [email protected] and I don't think I've changed anything...

    Here's the debug output of the Sipura (on 10.0.0.252) when I place a
    call from an Asterisk extension:

    ---Log starts

    INVITE sip:CalledPhone#@10.0.0.252:5061 SIP/2.0

    Via: SIP/2.0/UDP 10.0.0.1:5060;branch=z9hG4bK384c1f04;rport

    From: "100" <sip:[email protected]>;tag=as6ba389a0

    To: <sip:[email protected]:5061>

    Contact: <sip:[email protected]>

    Call-ID: [email protected]

    CSeq: 102 INVITE

    User-Agent: Pete's PBX

    Max-Forwards: 70

    Date: Tue, 07 Mar 2006 23:36:53 GMT

    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY

    Content-Type: application/sdp

    Content-Length: 197



    v=0

    o=root 2881 2881 IN IP4 10.0.0.1

    s=session

    c=IN IP4 10.0.0.1

    t=0 0

    m=audio 16322 RTP/AVP 0 3 8

    a=rtpmap:0 PCMU/8000

    a=rtpmap:3 GSM/8000

    a=rtpmap:8 PCMA/8000

    a=silenceSupp:eek:ff - - - -



    SIP:Challenge INVITE
    [1:5061]->10.0.0.1:5060
    [1:5061]->10.0.0.1:5060
    SIP/2.0 401 Unauthorized

    To: <sip:CalledPhone#@10.0.0.252:5061>;tag=af3fa47e511ea8bbi1

    From: "100" <sip:[email protected]>;tag=as6ba389a0

    Call-ID: [email protected]

    CSeq: 102 INVITE

    Via: SIP/2.0/UDP 10.0.0.1:5060;branch=z9hG4bK384c1f04

    Server: Sipura/SPA3000-3.1.7(GWg)

    WWW-Authenticate: Digest realm="10.0.0.1", nonce="a3d355a9", qop="auth",
    algorithm=md5

    Content-Length: 0

    ---Log ends

    and here's the section from sip_addition.conf

    [sipura]
    type=peer
    secret=********
    port=5061
    insecure=very
    host=10.0.0.252
    fromuser=Asterisk
    dtmfmode=inband
    context=from-internal
    canreinvite=no
    auth=md5

    [pstn-incoming]
    type=friend
    port=5061
    insecure=very
    host=10.0.0.252
    host=dynamic
    dtmfmode=inband
    disallow=all
    context=from-internal
    canreinvite=no
    allow=ulaw

    I've defined Voip User 1 as 'Asterisk' and entered the correct password
    on the SPA-3000. Screenshot at:

    http://www.pwatson.org/advanced.htm

    Any help most welcome!

    Thanks,

    Peter
     
    Peter Watson, Mar 7, 2006
    #1
    1. Advertisements

  2. Peter Watson

    alexd Guest

    Hmm, looks a bit dubious specifying host= twice.
    Drop into an asterisk console with 'asterisk -Rc', type
    'sip debug peer sipura' and see if that gets you anywhere.
     
    alexd, Mar 8, 2006
    #2
    1. Advertisements

  3. Peter Watson

    Peter Watson Guest

    Thanks Alex, I've tidied that bit up (removed the host=dynamic)
    Asterisk debug messages mirror the Sipura logs btw

    I've just tried adding username=Asterisk to [sipura] and it has started
    working again. I don't recall removing this so I've no idea why it
    stopped working.

    I now need to read up on the difference between 'fromuser' and 'username'!!

    Peter
     
    Peter Watson, Mar 8, 2006
    #3
  4. Peter Watson

    alexd Guest

    It stopped working because hosts specified with an IP address [eg
    host=10.0.0.252] must have username= specified. This would hopefully appear
    in error logs somewhere.
    I believe one is the username you use to authenticate with Asterisk with,
    and the other is the username component of your SIP URI, eg
    sip:. So you would specify both if you wanted them to
    be different.

    Also, it's handy to use the 'username' to contact a peer before it's
    registered with Asterisk, which would happen if your server rebooted in the
    middle of an expiry.
     
    alexd, Mar 9, 2006
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.