[Gelöst] FROM_DID question (English)

Edward Velo

Neuer User
Mitglied seit
31 Mai 2006
Beiträge
123
Punkte für Reaktionen
0
Punkte
0
First of all: sorry for writing in English...

I am using Freepbx with 2 separate SIP accounts (each with one DID). However, these two SIP accounts do NOT send the FROM_DID info when a call comes in. In the logging it shows as FROM_DID=s instead of the actual DID number.

So I have no way to create an inbound route with the DID number that calls me as a condition.

If I fill in the DID field with the DID number, it doesn't work (because the provider doesn't send the FROM_DID). If I leave the DID files empty, ALL calls use this inbound route.

Thanks!
 
Some providers only send the called number in a SIP header, usually "to". But FreePBX can't set an inbound route based on headers. You will have to create a custom inbound context in extensions-custom.conf with something like
exten => s,1,Goto(<name-of-regular-incoming-context>,${SIP_HEADER(to)},1)

Try a search for "Asterisk sipgate trunking", maybe you find ready to use solutions or at least an example.
 
I found a solution.

When using PJSIP, it seems there is no way to assign a DID number, when the SIP operator doesn't send the _FROM_DID.

However, when using SIP, one can assign a DID number via de register string in the end (/123 for instance). This can be any number, not even related to the actual real DID, and this number can then be used in the Outbound Route!
 
Hi Edward,

I tried adding /331 to the register string and added this as the inbound DID number. Unfortunately, this does not seem to work. my SIP trunk is set up as follows:

Trunk Name: sge2

Outbound Caller ID: <+49987654331>

Sip outgoing trunk name: sge2-out

Code:
PEER details: type=friend
username=12345e2
fromuser=12345e2
fromdomain=sipgate.de
secret=XXXXXX
host=sipgate.de
nat=yes
insecure=invite
qualify=yes
dtmfmode=rfc2833
disallow=all
allow=ulaw,alaw
outboundproxy=proxy.live.sipgate.de

incoming user context: sipgate_in

USER Details: type=friend
host=proxy.live.sipgate.de

[noparse][email protected]:[email protected][/noparse]/331

Incoming Route DID: 331

Would you please tell me if your settings are the same or different?

[Posting 2:]

Okay, i found it: The registry string has to be

12345e2:[email protected]/331

I was confused by the information on the Sipgate help page.
 
Zuletzt bearbeitet von einem Moderator:
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.