Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Can't place calls but can receive calls

Help
2007-01-09
2013-04-25
  • redwood23405
    redwood23405
    2007-01-09

    I've set up an asterisk pbx server for my office.
    I have a couple of analog telepones:
    FXS1=Zap/1 and FXS2=Zap/2
    I'm trying to setup my laptop as a kiax softphone:
    LAPTOP=IAX2/laptop/103

    My iax.conf looks like:
    [laptop]
    ;type=user,peer,friend
    type=friend
    username=laptop
    secret=my_secret
    host=laptop.mynetwork.net
    nat=yes
    regexten=103
    ;auth=md5,plaintext,rsa
    auth=plaintext
    context=internal
    callerid="laptop" <103>
    mailbox=103
    jitterbuffer=yes

    And in my extensions.conf I have an internal context:

    [internal]
    include => local
    include => longdistance
    include => international
    include => directdial
    include => voicemail
    include => conference
    include => parkedcalls

    exten => 101,1,Macro(stdexten,${FXS1})
    exten => 102,1,Macro(stdexten,${FXS2})
    exten => 103,1,Macro(stdexten,${LAPTOP})

    Both my pbx and laptop are running iptables and I've opened
    up UDP port 4596 among the computers on my network.

    If I pick up the handset from (say FXS2) and dial "103"
    kiax rings and I can answer and carry on a conversation.
    But I cannot make calls with kiax.
    Right now I'm just trying to get kiax to function like an
    ordinary telephone. I just want to be able to place calls to
    and receive calls from other asterisk extensions in my dialplan.
    I'd also like to make outbound calls through my PSTN:
    OUTBOUNDTRUNK=Zap/g1

    When I try to dial out 97101234

    Tue Jan 9 12:45:55 2007 IaxWrapper::configureCall(acc number 0) configuring call..
    Tue Jan 9 12:45:55 2007 IaxWrapper::configureCall(acc number 0) account number=0, account alias=laptop
    Tue Jan 9 12:45:55 2007 IaxWrapper::configureCall(acc number 0) callerId=laptop
    Tue Jan 9 12:45:55 2007 IaxWrapper::configureCall(acc number 0) callerIdNumber=103
    Tue Jan 9 12:45:55 2007 IaxWrapper::configureCall(acc number 0) codec=gsm
    Tue Jan 9 12:45:55 2007 IaxWrapper::configureCall(acc number 0) filter flag=27
    Tue Jan 9 12:45:55 2007 IaxWrapper::configureCall(acc number 0) silence threshold=-99
    Tue Jan 9 12:45:55 2007 IaxWrapper::configureCall(acc number 0) devices in=1, out=1, ring=1
    Tue Jan 9 12:45:55 2007 IaxWrapper::dial(int, QString) dialing laptop:xxx@pbx.mynetwork.net/97101234 ..
    Tue Jan 9 12:45:55 2007 IaxWrapper::event_state() processing IAX event..
    Tue Jan 9 12:45:55 2007 IaxWrapper::event_state() call state 0 : active=1, outgoing=1, ringing=0, complete=0, selected=0 registrationId=0
    Tue Jan 9 12:45:55 2007 IaxWrapper::event_state() call info 0 : remote=97101234, remote_name=laptop:xxx@pbx.mynetwork.net/97101234, local=laptop, local_context=default
    remote_name=laptop:xxx@pbx.mynetwork.net/97101234, local=laptop, local_context=default
    Tue Jan 9 12:46:29 2007 IaxWrapper::event_text() Message: Type=1 Message=Call 0 timed out.
    Tue Jan 9 12:46:29 2007 IaxWrapper::event_state() processing IAX event..
    Tue Jan 9 12:46:29 2007 IaxWrapper::event_state() call state 0 : active=0, outgoing=0, ringing=0, complete=0, selected=0 registrationId=0
    Tue Jan 9 12:46:29 2007 IaxWrapper::event_state() call info 0 : remote=97101234, remote_name=laptop:xxx@pbx.mynetwork.net/97101234, local=laptop, local_context=default
    Tue Jan 9 12:46:29 2007 IaxWrapper::event_state() INACTIVE 0
    Tue Jan 9 12:46:29 2007 IaxWrapper::event_text() Message: Type=1 Message=Timeout for a non-existant session.  Dropping
    Tue Jan 9 12:46:31 2007 IaxWrapper::event_text() Message: Type=1 Message=Timeout for a non-existant session.  Dropping
    Tue Jan 9 12:46:41 2007 IaxWrapper::event_text() Message: Type=1 Message=Timeout for a non-existant session.  Dropping
    Tue Jan 9 12:46:51 2007 IaxWrapper::event_text() Message: Type=1 Message=Timeout for a non-existant session.  Dropping

    If I try to dial an internal extension (e.g. 101) I get a similar log message from kiax. But dialing from an analog FXS telephone works just fine, both for internal extensions and for outside numbers.

    Thanks for any insights into what the problem is.

     
    • Emo
      Emo
      2007-01-11

      it look like kiax wasnt registered with asterisk.. Does kiax tell that it has registered with the server? Also, check in the settings dialog that your server address does not contain any space char in front or after the address.

      Greetings,
      Emil

       
      • redwood23405
        redwood23405
        2007-01-11

        How does kiax indicate that it has registered?

        When I click on the "plug" icon on the bottom status bar and select "register with laptop@pbx.mynetwork.net" the status bar then says "Connecting to laptop@pbx.mynetwork.net"
        but nothing more.

        And in asterisk I get the following:

        *CLI> iax2 show peer laptop

          * Name       : laptop
          Secret       : <Set>
          Context      : internal
          Mailbox      : 103
          Dynamic      : Yes
          Callerid     : "Laptop" <103>
          Expire       : -1
          ACL          : Yes
          Addr->IP     : (Unspecified) Port 0
          Defaddr->IP  : 192.168.1.101 Port 4569
          Username     : laptop
          Codecs       : 0xff0f (g723|gsm|ulaw|alaw|g729|speex|ilbc)
          Codec Order  : (gsm|ulaw|alaw)
          Status       : Unmonitored
        Qualify        : every 60000ms when OK, every 10000ms when UNREACHABLE (sample smoothing Off)

         
    • redwood23405
      redwood23405
      2007-01-11

      [SOLVED]

      Following your hint about kiax not registering, I installed kiax on another
      computer and it registered. Turns out I had a typo in my "/etc/hosts" file:

      192.168.1.100 pbx pbx.typo.net

      THANKS!!!

       
      • Emo
        Emo
        2007-01-11

        No problem, glad it worked fine.