Signalwire.com Vitalpbx Support

VitalPBX Community Support Wish List Signalwire.com Vitalpbx Support

  • Post
    voiprehberi
    Participant

    Hi,

    I want to use signalwire.com with my vitalpbx pbx server. Can you contact them and add the vitalpbx option into connectors section please ?

     

    0
Viewing 15 replies - 1 through 15 (of 29 total)
  • Replies
    beaugast
    Participant
    none
    Up
    0
    Down

    I am already using Signalwire with VitalPBX. It’s not an integration, but it works.

    Here are the parameters for Signalwire.com for a trunk:

    Local Username: SIPUSERNAMEGOESHERE

    Peer Parameters:

    type=friend
    trustrpid=yes
    sendrpid=yes
    secret=SIPPASSWORDGOESHERE
    qualify=no
    insecure=port,invite
    host=SIPURIGOESHERE
    fromuser=SIPUSERNAMEGOESHERE
    fromdomain=SIPURIGOESHERE
    disallow=all
    defaultuser=SIPUSERNAMEGOESHERE
    canreinvite=no
    allow=ulaw

    Register String:

    SIPUSERNAMEGOESHERE:SIPPASSWORDGOESHERE@SIPURIGOESHERE

    Those should be all you have to configure. Passing caller id is another story and I have an open ticket on that one. It seems the inbound calls that hit the queue are not passing the inbound caller id to the external numbers.

    0
    InTeleSync
    Participant
    Up
    0
    Down

    I too am having difficulties getting SignalWire inbound to work. Outbound is fine. Registered both SIP and PJSIP with no issues.

    Closest I can find for configuring SignalWire against Asterisk is here: https://signalwire.com/blogs/product/connect-asterisk-signalwire-cloud-sip-connectivity

    Below is a portion of an inbound call from [redacted numbers] +1904XXXXXXX going to +1386XXXXXXX (the SignalWire DID and inbound route defined in VitalPBX. For the inbound route in VPBX, the DID Pattern is set to +1386XXXXXXX.

    Have completely disabled the firewall and Fail2Ban with no change. Anyone have any success getting SignalWire inbound to work on VitalPBX?

    ============================

    <— SIP read from UDP:104.248.176.184:5060 —>
    INVITE sip:s@54.208.81.247:5060 SIP/2.0
    Record-Route: <sip:104.248.176.184:5060;r2=on;lr;nat=yes>
    Record-Route: <sip:104.248.176.184:5061;transport=tls;r2=on;lr;nat=yes>
    Via: SIP/2.0/UDP 104.248.176.184:5060;branch=z9hG4bKd831.3a951754134170f9bd701ae43dc4c9f8.0;i=3237
    Via: SIP/2.0/TLS 206.189.69.103:35181;received=206.189.69.103;rport=49994;branch=z9hG4bKSKv1tra1g7Byp
    Max-Forwards: 67
    From: “+1904XXXXXXX” <sip:+1904XXXXXXX@sip.signalwire.com>;tag=9Hv3ZUSe560cp
    To: <sip:+1386XXXXXXX@intelesync-pbx.sip.signalwire.com>
    Call-ID: ef41d508-9669-4bf2-99f0-0008a7b22b04
    CSeq: 16348748 INVITE
    Contact: <sip:mod_sofia@206.189.69.103:35181;transport=tls;alias=206.189.69.103~49994~3>
    User-Agent: SignalWire STACK
    Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
    Supported: timer, path, replaces
    Allow-Events: talk, hold, conference, refer
    Session-Expires: 600;refresher=uac
    Min-SE: 90
    Privacy: none
    Content-Type: application/sdp
    Content-Disposition: session
    Content-Length: 724
    P-SRC-IP: 67.231.3.4
    X-Relay-Call-ID: ef41d508-9669-4bf2-99f0-0008a7b22b04
    X-CID: 1445731720_134153457@67.231.3.4
    X-FS-Support: update_display,send_info
    P-Asserted-Identity: “+1904XXXXXXX” <sip:+1904XXXXXXX@sip.signalwire.com>

    v=0
    o=SignalWire-STACK 1581794395 1581794396 IN IP4 206.189.69.103
    s=SignalWire-STACK
    c=IN IP4 206.189.69.103
    t=0 0
    m=audio 10686 RTP/SAVP 0 8 101 13
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=rtpmap:13 CN/8000
    a=crypto:5 AES_CM_128_HMAC_SHA1_80 inline:HToNEUnfe/Alpha1BnoQfnNjihP8XmtONdYPcBBr
    a=crypto:6 AES_256_CM_HMAC_SHA1_32 inline:SIOcknrNuPEVOp8Qk6o1/1Ler8+Y014aFCUpgUYJXCaeRsLz1vVUUsoE+Z1+iQ==
    a=crypto:8 AES_CM_128_HMAC_SHA1_32 inline:HfaUWnVVGbUWkPOIc3YJ30SkVU31gFA8OWn0KuSA
    a=ptime:20
    m=audio 10686 RTP/AVP 0 8 101 13
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-16
    a=rtpmap:13 CN/8000
    a=ptime:20
    <————->
    — (26 headers 22 lines) —
    Sending to 104.248.176.184:5060 (no NAT)
    Sending to 104.248.176.184:5060 (no NAT)
    Using INVITE request as basis request – ef41d508-9669-4bf2-99f0-0008a7b22b04
    No matching peer for ‘+1904XXXXXXX’ from ‘104.248.176.184:5060’

    <— Reliably Transmitting (no NAT) to 104.248.176.184:5060 —>
    SIP/2.0 401 Unauthorized
    Via: SIP/2.0/UDP 104.248.176.184:5060;branch=z9hG4bKd831.3a951754134170f9bd701ae43dc4c9f8.0;i=3237;received=104.248.176.184
    Via: SIP/2.0/TLS 206.189.69.103:35181;received=206.189.69.103;rport=49994;branch=z9hG4bKSKv1tra1g7Byp
    From: “+1904XXXXXXX” <sip:+1904XXXXXXX@sip.signalwire.com>;tag=9Hv3ZUSe560cp
    To: <sip:+1386XXXXXXX@intelesync-pbx.sip.signalwire.com>;tag=as1edc860e
    Call-ID: ef41d508-9669-4bf2-99f0-0008a7b22b04
    CSeq: 16348748 INVITE
    Server: VitalPBX
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
    Supported: replaces, timer
    WWW-Authenticate: Digest algorithm=MD5, realm=”asterisk”, nonce=”408b6a3d”
    Content-Length: 0

    <————>
    Scheduling destruction of SIP dialog ‘ef41d508-9669-4bf2-99f0-0008a7b22b04’ in 32000 ms (Method: INVITE)

    0
    Up
    0
    Down

    @intelesync

    What version of VitalPBX are you currently using?

    Did you configure the trunks according to signal wire instructions?

    0
    InTeleSync
    Participant
    Up
    0
    Down

    2.4.0-5

    No I didn’t configure the trunk according to SignalWire instructions. That would require going out and mucking around in Asterisk confs which completely defeats the purpose of using VitalPBX.

    Have configured the SIP trunk in VitalPBX. It registers okay. Outbound calls from it work okay. Have configured the Inbound Route for a SignalWire DID. Get nothing from the Asterisk CLI. A SIP trace produces output similar to the above already posted.

    Attached is a screenshot of the trunk config.

     

    0
    InTeleSync
    Participant
    Up
    0
    Down

    Attached is Asterisk CLI showing the registration.

     

    0
    InTeleSync
    Participant
    Up
    0
    Down

    And attached is the Inbound Route for the DID.

    It is important to note that inbound DIDs from other carriers, including other E-164 carriers such as Twilio, are working fine.

    0
    Up
    0
    Down
    Posted by: @intelesync

    2.4.0-5

    No I didn’t configure the trunk according to SignalWire instructions. That would require going out and mucking around in Asterisk confs which completely defeats the purpose of using VitalPBX.

    Have configured the SIP trunk in VitalPBX. It registers okay. Outbound calls from it work okay. Have configured the Inbound Route for a SignalWire DID. Get nothing from the Asterisk CLI. A SIP trace produces output similar to the above already posted.

    Attached is a screenshot of the trunk config.

     

    I mean, follow the instructions and trying to match according to VitalPBX GUI.

    The profile you posted explains how to configure using PJSIP, however, it is not possible to route Signalware calls to other port than 5060, due PJSIP on VitalPBX runs on the port 5062.

    0
    Up
    0
    Down

    What I notice on that tutorial is that the DID is taken from the SIP headers, specifically the “To” header.

    Did you configure on your trunk to get the DID from that header?

    Did you check the SNGREP or the Asteirsk CLI, to see what is happening when a call is coming from signalwire?

     

    0
    InTeleSync
    Participant
    Up
    0
    Down

    Can we forget about the SignalWire Asterisk post? I should’ve never mentioned it as it’s clearly obfuscating the issue. We’re using VitalPBX, and VitalPBX’s way of doing things with Asterisk. The link is merely a reference point.

    Yes, as mentioned, the Asterisk CLI does not show anything at all. I’ve provided a tcpdump sample of the SIP call. 

    If you’re referring to PBX -> External -> Trunks -> General -> Get DID From = To, then yes have tried that.

    If you (or anyone else) could please, go to https://signalwire.com and sign up for a completely free account. If you use ITEXPO20 it’ll also get you $50 of free credits. Then, set it up to work in VitalPBX and report back the necessary requirements and steps.

    If it’s any consolation, I have SignalWire trunks working in other non-VitalPBX Asterisk-based systems, along with FreeSwitch-based systems. I’m stuck at VitalPBX.

    0
    Up
    0
    Down

    These are the configurations that I use for configuring a SIP trunk with SignalWire:

    https://ibb.co/album/gotH3v

    Some important parameters:

    • The register string must have the callback extension

    signalwire-trunk:YOUR-PASSWORD@vitalpbx-aa670ea2cb41.sip.signalwire.com/+15852832495

    • It is needed to add some advanced parameters that are shown in the pictures I’ve shared on the link above.
    • For Outbound calls, I am dialing with ten digits format

    I’ve tested Inbound/Outbound calls, and both are working as expected.

     

    0
    InTeleSync
    Participant
    Up
    0
    Down

    Awesome. Thanks for working on this with me. While inbound works now, it only works for the DID that matches the callback extension in the registry string. Given that, we would need a trunk registration for each and every SignalWire DID. That’s not practical of course when you’re dealing with thousands of DIDs.

    There’s gotta be another way.

     

    0
    Up
    0
    Down

    @intelesync

    I will try with PJSIP, I think this works better with this protocol

    0
    Up
    0
    Down

    Well, I just bought another number, for trying to use the same trunk for two numbers, and this what I changed:

    • I set the register string in the following way

    signalwire-trunk:YOUR-PASSWORD@vitalpbx-aa670ea2cb41.sip.signalwire.com/signalwire

    Instead of setting the number, I just put a string, to avoid confusion.

    • On the trunk, in the field, “Get DID From”, I set the value to “To”, in this way, the called number is taken from headers, and you can have many numbers as you want.

    On another hand, I will also make some tests with PJSIP, maybe write a blog about it.

    0
    InTeleSync
    Participant
    Up
    0
    Down

    I found that if I set Settings -> Technology Settings -> SIP Settings Allowed Guest = Yes, I can at least get the calls into VPBX consistently. 

    The problem is now getting it to recognize the incoming DID. With the above suggestion of appending “/signalwire” onto the Register String, along with Get DID From = To, am getting the “I’m sorry no route exists” error from VPBX.

    — Channel ‘SIP/sip.signalwire.com-0000002b’ sent to invalid extension: context,exten,priority=incoming-calls,signalwire,1

    If I leave off the “/signalwire” string the call will come in and get a busy signal.

    — Executing [h@sip-default:1] NoOp(“SIP/sip.signalwire.com-00000029”, “Guest call to DID h”) in new stack
    — Executing [h@sip-default:2] Goto(“SIP/sip.signalwire.com-00000029”, “default-trunk,h,1”) in new stack
    — Goto (default-trunk,h,1)

    Just dies right there.

     

    0
    Up
    0
    Down

    I configured as I mentioned in my previous post, and is working as expected, check the log:

    Unsupported crypto suite: AEAD_AES_256_GCM_8
    [2020-02-18 16:08:59] WARNING[2816][C-0000003e]: chan_sip.c:10431 process_sdp: Declining non-primary audio stream: audio 12262 RTP/AVP 0 18 102 9 8 101 13 103 104
    > 0x7fd26c056a30 -- Strict RTP learning after remote address set to: 167.99.184.143:12262
    -- Executing [signalwire@trk-1-in:1] NoOp("SIP/signalwire-trunk-00000027", "Incoming call through: SignalWire") in new stack
    -- Executing [signalwire@trk-1-in:2] Set("SIP/signalwire-trunk-00000027", "CDR(trunk)=1") in new stack
    -- Executing [+15852832495@trk-1-in:1] NoOp("SIP/signalwire-trunk-00000026", "Incoming call through: SignalWire") in new stack
    -- Executing [+15852832495@trk-1-in:2] Set("SIP/signalwire-trunk-00000026", "CDR(trunk)=1") in new stack
    -- Executing [signalwire@trk-1-in:3] Set("SIP/signalwire-trunk-00000027", "DID=signalwire") in new stack
    [2020-02-18 16:08:59] ERROR[668][C-0000003e]: res_pjsip_header_funcs.c:454 func_read_header: This function requires a PJSIP channel.
    -- Executing [signalwire@trk-1-in:4] Set("SIP/signalwire-trunk-00000027", "DID=+16058246613") in new stack
    -- Executing [signalwire@trk-1-in:5] Goto("SIP/signalwire-trunk-00000027", "default-trunk,+16058246613,1") in new stack
    -- Goto (default-trunk,+16058246613,1)
    -- Executing [+16058246613@default-trunk:1] Gosub("SIP/signalwire-trunk-00000027", "set-global-tenant-vars,s,1") in new stack
    -- Executing [s@set-global-tenant-vars:1] NoOp("SIP/signalwire-trunk-00000027", "Setting Global Vars for vitalpbx Tenant") in new stack
    -- Executing [s@set-global-tenant-vars:2] Set("SIP/signalwire-trunk-00000027", "__TENANT_PATH=b736c862e474fd76") in new stack
    -- Executing [s@set-global-tenant-vars:3] Set("SIP/signalwire-trunk-00000027", "__TENANT_PREFIX=") in new stack
    -- Executing [s@set-global-tenant-vars:4] Set("SIP/signalwire-trunk-00000027", "__QUEUE_AGENTS_CONTEXT=queue-call-to-agents") in new stack
    -- Executing [s@set-global-tenant-vars:5] Set("SIP/signalwire-trunk-00000027", "__FOLLOWME_CONTEXT=ext-followme") in new stack
    -- Executing [s@set-global-tenant-vars:6] Set("SIP/signalwire-trunk-00000027", "__HINTS_CONTEXT=extension-hints") in new stack
    -- Executing [s@set-global-tenant-vars:7] Set("SIP/signalwire-trunk-00000027", "__DEFAULT_COS=cos-all") in new stack
    -- Executing [s@set-global-tenant-vars:8] Return("SIP/signalwire-trunk-00000027", "") in new stack
    -- Executing [+16058246613@default-trunk:2] Gosub("SIP/signalwire-trunk-00000027", "sub-check-blacklist,s,1(b736c862e474fd76,+15852832495)") in new stack
    -- Executing [s@sub-check-blacklist:1] NoOp("SIP/signalwire-trunk-00000027", "Testing if +15852832495 is in Black List") in new stack
    -- Executing [s@sub-check-blacklist:2] GotoIf("SIP/signalwire-trunk-00000027", "0?banned") in new stack
    -- Executing [s@sub-check-blacklist:3] Return("SIP/signalwire-trunk-00000027", "") in new stack
    -- Executing [+16058246613@default-trunk:3] Gosub("SIP/signalwire-trunk-00000027", "sub-setup-call-type,s,1(incoming)") in new stack
    -- Executing [s@sub-setup-call-type:1] NoOp("SIP/signalwire-trunk-00000027", "Determinating Call Type") in new stack
    -- Executing [s@sub-setup-call-type:2] GotoIf("SIP/signalwire-trunk-00000027", "0?return") in new stack
    -- Executing [s@sub-setup-call-type:3] Gosub("SIP/signalwire-trunk-00000027", "s-incoming,1()") in new stack
    -- Executing [s-incoming@sub-setup-call-type:1] NoOp("SIP/signalwire-trunk-00000027", "Incoming Call") in new stack
    -- Executing [s-incoming@sub-setup-call-type:2] Set("SIP/signalwire-trunk-00000027", "__CALL_TYPE=2") in new stack
    -- Executing [s-incoming@sub-setup-call-type:3] Set("SIP/signalwire-trunk-00000027", "__CALL_TYPE_LABEL=IN") in new stack
    -- Executing [s-incoming@sub-setup-call-type:4] Return("SIP/signalwire-trunk-00000027", "") in new stack
    -- Executing [s@sub-setup-call-type:4] Set("SIP/signalwire-trunk-00000027", "__CALL_TYPE_CONFIGURED=yes") in new stack
    -- Executing [s@sub-setup-call-type:5] Set("SIP/signalwire-trunk-00000027", "CDR(calltype)=2") in new stack
    -- Executing [s@sub-setup-call-type:6] Return("SIP/signalwire-trunk-00000027", "") in new stack
    -- Executing [+16058246613@default-trunk:4] Gosub("SIP/signalwire-trunk-00000027", "dynamic-routing-in,s,1(+15852832495)") in new stack
    -- Executing [s@dynamic-routing-in:1] NoOp("SIP/signalwire-trunk-00000027", "Test if must to apply dynamic routing") in new stack
    -- Executing [s@dynamic-routing-in:2] Set("SIP/signalwire-trunk-00000027", "EXTERNAL_CALLER=+15852832495") in new stack
    -- Executing [s@dynamic-routing-in:3] Set("SIP/signalwire-trunk-00000027", "DYNROUTING_DM=0") in new stack
    -- Executing [s@dynamic-routing-in:4] GotoIf("SIP/signalwire-trunk-00000027", "1?gd") in new stack
    -- Goto (dynamic-routing-in,s,6)
    -- Executing [s@dynamic-routing-in:6] GotoIf("SIP/signalwire-trunk-00000027", "0?:rb") in new stack
    -- Goto (dynamic-routing-in,s,11)
    -- Executing [s@dynamic-routing-in:11] Return("SIP/signalwire-trunk-00000027", "") in new stack
    -- Executing [+16058246613@default-trunk:5] Goto("SIP/signalwire-trunk-00000027", "incoming-calls,+16058246613,1") in new stack
    -- Goto (incoming-calls,+16058246613,1)
    -- Executing [+16058246613@incoming-calls:1] NoOp("SIP/signalwire-trunk-00000027", "INBOUND_ROUTE: Dakota") in new stack
    -- Executing [+16058246613@incoming-calls:2] Set("SIP/signalwire-trunk-00000027", "CHANNEL(language)=en") in new stack
    -- Executing [+16058246613@incoming-calls:3] Gosub("SIP/signalwire-trunk-00000027", "sub-set-moh,s,1(ringback,YES)") in new stack
    -- Executing [s@sub-set-moh:1] NoOp("SIP/signalwire-trunk-00000027", "Configuring MoH Class") in new stack
    -- Executing [s@sub-set-moh:2] Set("SIP/signalwire-trunk-00000027", "MOH_CLASS=ringback") in new stack
    -- Executing [s@sub-set-moh:3] Set("SIP/signalwire-trunk-00000027", "MOH_FORCE=YES") in new stack
    -- Executing [s@sub-set-moh:4] GotoIf("SIP/signalwire-trunk-00000027", "1?end") in new stack
    0
Viewing 15 replies - 1 through 15 (of 29 total)
  • You must be logged in to reply to this topic.