how to configure incoming VoIP call

  • Dear SF team, we just set up an account with sipgate and got (one) german number.
    Yesterday I tested with my SIP client, and when I register it with sipgate and try to call this german number from other phone then my SIP client rings.
    So far so good.

    Now I configured this account in the Starface and outgoing calls are fine. The sipgate web site shows that we are online.
    However when I call "our" german number, the call fails and on the asterisk console I see no incoming call.

    What should I change to enable acceptance of incoming calls?
    And another question, considering we have 15 phones registered on our starface, which phone will ring if we call "our" german phone number?

    Thanks
    Zsolt

  • Hi Zsolt,

    Quote

    However when I call "our" german number, the call fails and on the asterisk console I see no incoming call.

    You can check if really no packets are coming in with enabling debug mode in asterisk console.

    Command:

    Code
    sip debug peer [sipgate username]

    With debugging mode enabled every single SIP packet to or from sipgate is shown in console.
    If there's no incoming packet you have to check your firewall, I suggest that firewall blocks incoming traffic (normally a port forwarding is needed from Port 5060(UDP) to the internal IP from your STARFACE)

    Disabling debug mode

    Code
    sip no debug

    Regards
    Philipp

    Gruß / Regards
    Philipp

  • Hi Phillip, you were right, with debug some sign of life is visible...here is the log

    starface*CLI> sip debug peer 2370593
    SIP Debugging Enabled for IP: 217.10.79.9:5060
    starface*CLI>
    <-- SIP read from 217.10.79.9:5060:

    --- (0 headers 0 lines) Nat keepalive ---
    starface*CLI>
    <-- SIP read from 217.10.79.9:5060:

    --- (0 headers 0 lines) Nat keepalive ---
    starface*CLI>
    <-- SIP read from 217.10.79.9:5060:
    INVITE sip:7@78.2.107.205 SIP/2.0
    Record-Route: <sip:217.10.79.9;lr=on;ftag=as3fab6c6e>
    Record-Route: <sip:172.20.40.4;lr=on>
    Record-Route: <sip:217.10.79.9;lr=on;ftag=as3fab6c6e>
    Via: SIP/2.0/UDP 217.10.79.9:5060;branch=z9hG4bK7276.79bc7c91.0
    Via: SIP/2.0/UDP 172.20.40.4;branch=z9hG4bK7276.79bc7c91.0
    Via: SIP/2.0/UDP 217.10.79.9:5060;received=217.10.68.222;branch=z9hG4bK3988ca4c
    Via: SIP/2.0/UDP 217.10.67.4:5060;branch=z9hG4bK3988ca4c;rport=5060
    From: "0038598369691" <sip:0038598369691@sipgate.de>;tag=as3fab6c6e
    To: <sip:00498105399036@sipgate.de>
    Contact: <sip:0038598369691@217.10.67.4>
    Call-ID: 0b0177946207e46317ea3f0d7595a321@sipgate.de
    CSeq: 102 INVITE
    Max-Forwards: 67
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
    Supported: replaces
    Content-Type: application/sdp
    Content-Length: 447

    v=0
    o=root 10649 10649 IN IP4 217.10.67.4
    s=session
    c=IN IP4 217.10.77.24
    t=0 0
    m=audio 47598 RTP/AVP 8 0 3 97 18 112 101
    a=rtpmap:8 PCMA/8000
    a=rtpmap:0 PCMU/8000
    a=rtpmap:3 GSM/8000
    a=rtpmap:97 iLBC/8000
    a=fmtp:97 mode=30
    a=rtpmap:18 G729/8000
    a=fmtp:18 annexb=no
    a=rtpmap:112 G726-32/8000
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=silenceSupp:off - - - -
    a=ptime:20
    a=sendrecv
    a=direction:active
    a=nortpproxy:yes

    --- (18 headers 21 lines) ---
    Using INVITE request as basis request - 0b0177946207e46317ea3f0d7595a321@sipgate.de
    Sending to 217.10.79.9 : 5060 (NAT)
    Found peer '2370593'
    Found RTP audio format 8
    Found RTP audio format 0
    Found RTP audio format 3
    Found RTP audio format 97
    Found RTP audio format 18
    Found RTP audio format 112
    Found RTP audio format 101
    Peer audio RTP is at port 217.10.77.24:47598
    Peer video RTP is at port 217.10.77.24:65535
    Found description format PCMA
    Found description format PCMU
    Found description format GSM
    Found description format iLBC
    Found description format G729
    Found description format G726-32
    Found description format telephone-event
    Capabilities: us - 0xc (ulaw|alaw), peer - audio=0x51e (gsm|ulaw|alaw|g726|g729|ilbc)/video=0x0 (nothing), combined - 0xc (ulaw|alaw)
    Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
    Looking for 7 in sipgate-incoming (domain 78.2.107.205)
    Reliably Transmitting (NAT) to 217.10.79.9:5060:
    SIP/2.0 484 Address Incomplete
    Via: SIP/2.0/UDP 217.10.79.9:5060;branch=z9hG4bK7276.79bc7c91.0;received=217.10.79.9
    Via: SIP/2.0/UDP 172.20.40.4;branch=z9hG4bK7276.79bc7c91.0
    Via: SIP/2.0/UDP 217.10.79.9:5060;received=217.10.68.222;branch=z9hG4bK3988ca4c
    Via: SIP/2.0/UDP 217.10.67.4:5060;branch=z9hG4bK3988ca4c;rport=5060
    From: "0038598369691" <sip:0038598369691@sipgate.de>;tag=as3fab6c6e
    To: <sip:00498105399036@sipgate.de>;tag=as5cccd217
    Call-ID: 0b0177946207e46317ea3f0d7595a321@sipgate.de
    CSeq: 102 INVITE
    User-Agent: STARFACE PBX
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
    Content-Length: 0


    ---
    starface*CLI>
    <-- SIP read from 217.10.79.9:5060:
    ACK sip:7@78.2.107.205 SIP/2.0
    Max-Forwards: 10
    Via: SIP/2.0/UDP 217.10.79.9:5060;branch=z9hG4bK7276.79bc7c91.0
    Via: SIP/2.0/UDP 172.20.40.4;branch=z9hG4bK7276.79bc7c91.0
    From: "0038598369691" <sip:0038598369691@sipgate.de>;tag=as3fab6c6e
    Call-ID: 0b0177946207e46317ea3f0d7595a321@sipgate.de
    To: <sip:00498105399036@sipgate.de>;tag=as5cccd217
    CSeq: 102 ACK
    Content-Length: 0
    X-hint: rr-enforced


    --- (10 headers 0 lines) ---
    Destroying call '0b0177946207e46317ea3f0d7595a321@sipgate.de'
    starface*CLI>
    <-- SIP read from 217.10.79.9:5060:

    --- (0 headers 0 lines) Nat keepalive ---
    starface*CLI> exit

    Any idea?
    Thanks
    Zsolt

  • hmm....very strange

    Problem:
    STARFACE Expects the called number in INVITE

    Code
    INVITE sip:7@78.2.107.205 SIP/2.0

    so STARFACE can't match the number '7' and sends back to sipgate

    Code
    Looking for 7 in sipgate-incoming (domain 78.2.107.205)
    Reliably Transmitting (NAT) to 217.10.79.9:5060:
    SIP/2.0 484 Address Incomplete

    Solution:
    We have to cut out the called number in TO-Header

    Code
    To: <sip:00498105399036@sipgate.de>

    You have to do a manual configuration of your sipgate line (Admin > Lines > Tab "Lines" > expand your line > Tab "Extended" > Manual Configuration)

    Paste the following code in the textfield and replace the channelname with the name of your line.
    Example when the name of your line is 'Sipgate':

    Code
    exten => _X.,1,Set(channelname=Sipgate-incoming)
    exten => _X.,2,Set(var_to=${SIP_HEADER(To)})
    exten => _X.,3,Set(firstcut=${CUT(var_to|:|2)})
    exten => _X.,4,Set(secoundcut=${CUT(firstcut|@|1)})
    exten => _X.,5,Goto(incoming,${secoundcut},1)
    exten => _X.,6,Hangup

    Don't forget to set the manual configuration "Active" (checkbox), otherwise your changes won't be saved.

    Plz let us know if it works ;)

    Gruß / Regards
    Philipp

  • I pasted, it (fist removed what was alreday there and this was
    [sipgate-incoming]
    exten => _X.,1,Set(channelname=sipgate-incoming)
    exten => _X.,2,Goto(incoming,${EXTEN},1)

    exten => _+X.,1,Set(channelname=sipgate-incoming)
    exten => _+X.,2,Goto(incoming,${EXTEN:1},1)

    so now it looks like:
    [sipgate-incoming]
    exten => _X.,1,Set(channelname=Sipgate-incoming)
    exten => _X.,2,Set(var_to=${SIP_HEADER(To)})
    exten => _X.,3,Set(firstcut=${CUT(var_to|:|2)})
    exten => _X.,4,Set(secoundcut=${CUT(firstcut|@|1)})
    exten => _X.,5,Goto(incoming,${secoundcut},1)
    exten => _X.,6,Hangup

    but it does not work...

    However, before I send you another trace, some clarifications, as some parameters has to do with number 7 and I do not know what are they for, so let me just list them and you tell me if something is wrong:

    we have 7 lines configured in starface, two are ISDN, and 5 are (VoIP) providers
    the sipgate line is number 5
    The line prefix of this line, in the extended tab of the line configuration is 7, i.e it is **7*
    The number area tab of this line, is Number Type: single number, Number:00385(51)7
    The 00385(51) the SF filled out by itself but the 7 I wrote in. It requested me to write in some number, and the other lines have other (one digit) number there. This number has to be different then the number in the other lines, so I put 7, although I have no idea what are these for.

    So this is about "seven" in our config. Is that OK?

    Thanks for help so far
    Zsolt

  • No, the '7' is sent by sipgate and is completely independent from STARFACE. They don't know what you have configured e.g. in your STARFACE line configuration.

    You can configure your complete sipgate number (0049 8105 399036) in tab 'numbers', even the country code or area code differs from your global settings.

    And be careful with case sensitivity in the manuel configuration:

    Code
    [[B]sipgate[/B]-incoming]
    exten => _X.,1,Set(channelname=[B]Sipgate[/B]-incoming)
    exten => _X.,2,Set(var_to=${SIP_HEADER(To)})
    exten => _X.,3,Set(firstcut=${CUT(var_to|:|2)})
    exten => _X.,4,Set(secoundcut=${CUT(firstcut|@|1)})
    exten => _X.,5,Goto(incoming,${secoundcut},1)
    exten => _X.,6,Hangup

    If your line name is 'sipgate', the channelname is 'sipgate-incoming' !

    And I skipped a question from your initial post (sry for that)

    Quote

    And another question, considering we have 15 phones registered on our starface, which phone will ring if we call "our" german phone number?

    Just assign the configured sipgate number to any user you like :p

    So just give us a new trace, probably there are new error messages...

    Regards
    Philipp

    Gruß / Regards
    Philipp

  • It is hard to do it right if you do not know what are you doing (this is considering the wrong case in the channel number), I just copy and paste and pray :)

    Here is the new trace

    starface*CLI>
    <-- SIP read from 217.10.79.9:5060:

    --- (0 headers 0 lines) Nat keepalive ---
    == Primary D-Channel on span 3 down
    == Primary D-Channel on span 4 down
    starface*CLI>
    <-- SIP read from 217.10.79.9:5060:
    INVITE sip:7@78.2.107.205 SIP/2.0
    Record-Route: <sip:217.10.79.9;lr=on;ftag=as29954471>
    Record-Route: <sip:172.20.40.4;lr=on>
    Record-Route: <sip:217.10.79.9;lr=on;ftag=as29954471>
    Via: SIP/2.0/UDP 217.10.79.9:5060;branch=z9hG4bK7a61.ea732656.0
    Via: SIP/2.0/UDP 172.20.40.4;branch=z9hG4bK7a61.ea732656.0
    Via: SIP/2.0/UDP 217.10.79.9:5060;received=217.10.68.222;branch=z9hG4bK09a79071
    Via: SIP/2.0/UDP 217.10.67.135:5060;branch=z9hG4bK09a79071;rport=5060
    From: "0038598369691" <sip:0038598369691@sipgate.de>;tag=as29954471
    To: <sip:00498105399036@sipgate.de>
    Contact: <sip:0038598369691@217.10.67.135>
    Call-ID: 3f380b8e2029255b4ec0be634783adc1@sipgate.de
    CSeq: 102 INVITE
    Max-Forwards: 67
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
    Supported: replaces
    Content-Type: application/sdp
    Content-Length: 449

    v=0
    o=root 25834 25834 IN IP4 217.10.67.135
    s=session
    c=IN IP4 217.10.77.21
    t=0 0
    m=audio 37124 RTP/AVP 8 0 3 97 18 112 101
    a=rtpmap:8 PCMA/8000
    a=rtpmap:0 PCMU/8000
    a=rtpmap:3 GSM/8000
    a=rtpmap:97 iLBC/8000
    a=fmtp:97 mode=30
    a=rtpmap:18 G729/8000
    a=fmtp:18 annexb=no
    a=rtpmap:112 G726-32/8000
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=silenceSupp:off - - - -
    a=ptime:20
    a=sendrecv
    a=direction:active
    a=nortpproxy:yes

    --- (18 headers 21 lines) ---
    Using INVITE request as basis request - 3f380b8e2029255b4ec0be634783adc1@sipgate.de
    Sending to 217.10.79.9 : 5060 (NAT)
    Found peer '2370593'
    Found RTP audio format 8
    Found RTP audio format 0
    Found RTP audio format 3
    Found RTP audio format 97
    Found RTP audio format 18
    Found RTP audio format 112
    Found RTP audio format 101
    Peer audio RTP is at port 217.10.77.21:37124
    Peer video RTP is at port 217.10.77.21:65535
    Found description format PCMA
    Found description format PCMU
    Found description format GSM
    Found description format iLBC
    Found description format G729
    Found description format G726-32
    Found description format telephone-event
    Capabilities: us - 0xc (ulaw|alaw), peer - audio=0x51e (gsm|ulaw|alaw|g726|g729|ilbc)/video=0x0 (nothing), combined - 0xc (ulaw|alaw)
    Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
    Looking for 7 in sipgate-incoming (domain 78.2.107.205)
    Reliably Transmitting (NAT) to 217.10.79.9:5060:
    SIP/2.0 484 Address Incomplete
    Via: SIP/2.0/UDP 217.10.79.9:5060;branch=z9hG4bK7a61.ea732656.0;received=217.10.79.9
    Via: SIP/2.0/UDP 172.20.40.4;branch=z9hG4bK7a61.ea732656.0
    Via: SIP/2.0/UDP 217.10.79.9:5060;received=217.10.68.222;branch=z9hG4bK09a79071
    Via: SIP/2.0/UDP 217.10.67.135:5060;branch=z9hG4bK09a79071;rport=5060
    From: "0038598369691" <sip:0038598369691@sipgate.de>;tag=as29954471
    To: <sip:00498105399036@sipgate.de>;tag=as0bb79a2b
    Call-ID: 3f380b8e2029255b4ec0be634783adc1@sipgate.de
    CSeq: 102 INVITE
    User-Agent: STARFACE PBX
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
    Content-Length: 0


    ---
    starface*CLI>
    <-- SIP read from 217.10.79.9:5060:
    ACK sip:7@78.2.107.205 SIP/2.0
    Max-Forwards: 10
    Via: SIP/2.0/UDP 217.10.79.9:5060;branch=z9hG4bK7a61.ea732656.0
    Via: SIP/2.0/UDP 172.20.40.4;branch=z9hG4bK7a61.ea732656.0
    From: "0038598369691" <sip:0038598369691@sipgate.de>;tag=as29954471
    Call-ID: 3f380b8e2029255b4ec0be634783adc1@sipgate.de
    To: <sip:00498105399036@sipgate.de>;tag=as0bb79a2b
    CSeq: 102 ACK
    Content-Length: 0
    X-hint: rr-enforced


    --- (10 headers 0 lines) ---
    Destroying call '3f380b8e2029255b4ec0be634783adc1@sipgate.de'
    == Primary D-Channel on span 3 down
    == Primary D-Channel on span 4 down
    == Primary D-Channel on span 3 down
    starface*CLI> e
    <-- SIP read from 217.10.79.9:5060:

    --- (0 headers 0 lines) Nat keepalive ---
    == Primary D-Channel on span 4 down
    starface*CLI> exit

    ignore the D-Channel down messages, our ISDN cards just died...the SF appliance is already on the way to us :)

    Thanks for help
    Zsolt

  • Hi Phillip, I did the other part, I configured the single number as you said in the line configuration and assigned it to my user and now it works :)
    Whether the extended config you gave me is needed or not, I don't know. If you are interested let me know, if not, we leave it as it is, don't touch the running system :)

    Maybe we hear us soon as I was promised that you will help me with the appliance config.
    Have a nice weekend
    Zsolt

  • Yes, I saw your appliance leaving Karlsruhe ;)

    So here a extended manual configuration with treatment for calls with single digit numbers:

    The difference is the '.' after 'X' - just copy, paste & pray again :D

    EDIT: Ok, plz try sipgate without manual configuration (uncheck the checkbox and save) and tell me if it works. As far as I know there's no manual configuration needed for sipgate...

    Regards
    Philipp

    Gruß / Regards
    Philipp

    Edited once, last by Philipp (June 5, 2009 at 5:31 PM).

  • I works fine even without the manual config. obviously the problem was that the phone number bound to sipgate line was nowhere defined. Now you learned again something new :-).

    Reward me with one more answer please :)
    OK, now we have one line and this line has a number bound to it, and I assigned the number to myself and all is fine. BUT, let's say I want now inbound number for each our employee (10).

    In theory I could open 10 accounts at sipgate, each would get a number. I would define the number for each line and then assign it to user. And as long as we are logged on with all 10 accounts the incoming calls would ring at the right place, correct?

    Or are you aware of any other way to get 10 inbound numbers (with one sipgate account only)?

    Reason I'm asking this is because at sipgate you have free account but with higher calling rates, and accounts with monthly fee but with lower calling rates. So if I want the low calling rates I need to create 10 accounts and pay the monthly fee for each.

    Thanks
    Zsolt

  • Hi,

    thanks for info...

    Quote

    In theory I could open 10 accounts at sipgate, each would get a number. I would define the number for each line and then assign it to user. And as long as we are logged on with all 10 accounts the incoming calls would ring at the right place, correct?

    Yes, correct !

    Quote

    Or are you aware of any other way to get 10 inbound numbers (with one sipgate account only)?

    No. AFAIK with the extended rate you get 3 or 4 phone numbers - so maybe you only need 3 or 4 accounts. Other Providers like toplink offer accounts with real DDI, so you get a real number block (e.g. 0-29)

    Regards
    Philipp

    Gruß / Regards
    Philipp

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!