How to make outbound SIP URI calls?

Status
Not open for further replies.

mk1518

New Member
Jun 3, 2019
13
0
1
40
I'm new to FusionPBX and VoIP. Just set up my FusionPBX with Anveo Direct. Regular outbound calls by number works, but I can't make SIP calls using SIP URI such as sip:test.time@sip5060.net

Can someone please kindly let me know what settings are needed to make this work?
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,045
566
113
Look at the freeswitch_conference example in dialplan manager.
 

mk1518

New Member
Jun 3, 2019
13
0
1
40
Look at the freeswitch_conference example in dialplan manager.

Thanks. I looked into that example and made a dialplan like below:

XML:
<extension name="sipuri_dailing" continue="false" uuid="xxxxx">
    <condition field="destination_number" expression="^([^@\s]+@[^@\s]+\.[^@\s]+)$">
        <action application="export" data="hold_music=silence"/>
        <action application="bridge" data="sofia/${use_profile}/$1"/>
    </condition>
</extension>

So basically I entered a regex for the SIP URI (like an email address regex).

My extension is 101, and the test URI I tried to dial is test.time@sip5060.net

But it's not working. Log file says something about my IP rejected by my ACL and 101@sip5060.net does not exist.

I'm really new at this. Can you tell me when dialing such SIP URIs, does it even go through the outbound SIP gateway (I use Anveo Direct)? Is this supposed to be internal or external?

Can you kindly show me a rule that will work if it's something simple?

Thanks!
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,045
566
113
I'm not sure what you are trying to do there but if you dial a sip URI from your phone, thats not going to work, its never going to go to the PBX.
 

mk1518

New Member
Jun 3, 2019
13
0
1
40
I'm not sure what you are trying to do there but if you dial a sip URI from your phone, thats not going to work, its never going to go to the PBX.

I made it work! I was just trying to make direct SIP URI calling work through my FusionPBX so I can use the PBX's features and also the same softphone (Bria 5 which does not seem to support direct SIP URI calling).

So when I dialed a SIP URI like 0289304@zero-nine.biz (this is a real working number, the sip5060.net test ones did not work when I tried them), Bria assumes the @zero-nine.biz format means I'm trying to authenticate with this domain instead of my real SIP domain mydomain.com. So authentication fails on my FusionPBX's internal SIP profile because zero-nine.biz apparently does not exist in my PBX.

I realized I need to pass the entire SIP URI and also append my real domain @mydomain.com, so I adjusted my dialplan to recognize __ (two underscores) as a replacement for the @ in the destination number regex. This way when I dial 0289304__zero-nine.biz, Bria sends 0289304__zero-nine.biz@mydomain.com. Then I capture the 0289304__zero-nine.biz part in my dialplan and convert it to 0289304@zero-nine.biz for bridging action. This resulted in a successful call for me.

My final dialplan is below:

XML:
<extension name="direct_sip_calling" continue="false" uuid="xxxx">
    <condition field="destination_number" expression="^([^@\s]+)__([^@\s]+\.[^@\s]+)$">
        <action application="export" data="hold_music=silence"/>
        <action application="bridge" data="sofia/${use_profile}/$1@$2"/>
    </condition>
</extension>

I'm not sure if I'm doing this the right way or if there's a better way to make this work without substituting the @ in the SIP URI. If others have a better idea please let me know.
 
Last edited:
Status
Not open for further replies.