How to call USERNAME instead of NUMBER with Sip2Sip in PBX?


I have a working Sip2Sip account set up on my PBX running on CentOS. My inbound calling is working fine, however it’s outbound calling which is confusing me a lot.’s username is alphabetic, not numeric. You have to use ‘alias’ for that if you want to use anything numeric. The issue is, not everyone have set up aliases. Most guides address username as numeric in format of 223XXXXXXX which I don’t see it anywhere on Sip2Sip account panel.

I am looking to for a way where I can call via username (consisting of alphabets) instead of dialing DID or numbers. I’ve tried different settings, but I am unable to make it work. The only way I could work it out is by making a Custom Extension and Dial String SIP/<recipient's username> or SIP/<recipient's username>, however this way, I can only call one username everytime and will have to create individual custom extensions for each usernames.

Here is my working SIP2SIP Trunk set up with following configuration:










exten => _X.,1,Dial(SIP/${EXTEN}@sip2sip-0)

exten => <username>,1,NoOp(--Incoming call from ${CALLERID(all)})
; Incoming call will go to Ring Group 1000
exten => <username>,n,Dial(local/[email protected], 60)

TRUNK : I added Custom Trunk Manually using web-based GUI: Connectivity → Trunk → Add Trunk → Add Custom Trunk

Trunk Name : Sip2Sip
Outbound Caller ID : <username>
Custom Dial String : Local/[email protected]

OUTBOUND: I added Outbound route using web-based GUI: Connectivity → Outbound Routes → Add Outbound Route

Route Settings
Route Name : Sip2Sip
Route ID : <username>
Custom Dial String : Local/[email protected]
Trunk Sequence for Matched Routes : Sip2Sip

Dial Patterns


Did an outbound Test Call on 3333 and 4444. Working fine.

INBOUND : I added Inbound route using web-based GUI: Connectivity → Inbound Routes → Add Inbound Route
Note: I have added alias in format of 223XXXXXXX (all numbers) in account and then use this alias to make incoming call to PBX.

Description : Sip2Sip
DID Number : 2231234567
Set Destination : Ring Groups → 1000

System :

Linux 3.10.0-1062.12.1.el7.x86_64
Asterisk Version : 16.9.0
PHP Version : 5.6.40
OS : CentOS Linux Release 7.7.1908

I don’t know if URI Dialing is the answer, but I don’t know how to set it up. Following is an example of URI dialing I found, but I don’t know how to implement it:

Sip2Sip’s official wiki support setting is too basic and isn’t very helpful. There’s also an article where you can hardcode a DID of your own choice, but that’s only if you have inbound issues.


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.