I’m newbie with Asterisk but I’m getting big results testing the software, I love it!
I have a little matter. To testing, I have two SIP trunks from the same VoIP provider with two different accounts and DID’s. My trixbox is able to register OK both trunks and receive calls but the problem is whe I want to make a call.
In first instance both trunks are one I get the “All the circuits are busy…” message… If I restart Asterisk and I try to call by the failed trunk I can call but now I can not call by the correct before.
At my SIP registry section on my FreePBX, I have:
Host Username Refresh State Reg.Time
ProviderIP:5060 User1 105 Registered Thu, 26 May 2011 19:29:53
ProviderIP:5060 User2 105 Registered Thu, 26 May 2011 19:29:53
2 SIP registrations.
At the SIP peers I have:
Name/username Host Dyn Nat ACL Port Status
Trunk1Name/User1 ProviderIP N 5060 OK (57 ms)
Trunk2Name/User2 ProviderIP N 5060 OK (57 ms)
2001/2001 LocalIP1 D N A 5062 OK (57 ms)
2000/2000 LocalIP2 D N A 5060 OK (57 ms)
4 sip peers [Monitored: 4 online, 0 offline Unmonitored: 0 online, 0 offline]
My trunks have at Peer Details:
host=ProviderIP
username=User1 (or User2 for the second line)
secret=Password1 (idem)
type=peer
insecure=very
qualify=yes
nat=yes
context=from-pstn
I’ll glad for any answer about it, it’s the only problem, for now, I have to resolve.
This only occurs if I use the trunk after the other one. This is independent of the order or trunks I use (if I use first trun1, doesn’t work 2, if I use trunk2 first is not possible to call with 1).
if not, I can not filter DID’s and I have to receive all calls with the “Any DID/Any CID” context.[/quote]
You will need to put both “trunks” in the same context. and then use the dialplan to recognize the different DIDs. The actual “trunk” that is matched will be the first one asterisk finds with the right IP address.
Note that Asterisk itself has no concept of trunks, so we may end up needing to see your sip.conf, to find out what Trixbox has done with it.
Note, with a typical POTS DID situation, all the DIDs would contend for the same set of circuits - DID tends to be misused in Asterisk circles to refer to any published PSTN number from which calls will be taken, rather than for the original meaning in which some or all of the dialed number was passed to the PABX.
This only occurs if I use the trunk after the other one. This is independent of the order or trunks I use (if I use first trun1, doesn’t work 2, if I use trunk2 first is not possible to call with 1).[/quote]
The original question was about inbound calls.
I don’t really understand this, but it might be that your PSTN access provider is registering with you and also has problems dealing with multiple registrations on a single IP.
About the original post, the title was wrong but the information in the first post is OK (1000’s sorrys for my mistake), it is corrected now (Ican receive OK but I can only send a call).
As you say, I have a context for each SIP trunk. I’ll try today to change the contexts of the “trunks” to be only one.
About my last post, that I copied here is the partial CLI dump. I supose that the problem comes from the match of the IP and te two users (“trunks”) I have.
I will do the test and will post here the sip.conf.
I’ve changed the trunks configuration and putted them into the same context but the problem is the same, I can receive by both lines but I only can call by one.
My sip_additional.com is this:
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
;
[Ibercom] ;<== This is the context for my tw SIP trunks
[t911922106] ;<== The first of the SIP trunks host=XXX.XXX.XXX.XXX
username=username1
secret=secret1
type=friend
insecure=port,invite
qualify=yes
nat=yes
context=from-pstn
trunk=yes
Actually, they only allow anonymous calls, or rather they ignore your supplied caller id because they use it to identify the account.
At the moment, I don’t actually understand why it works for the first trunk, unless something is doing something in the dialplan. You need fromuser in your trunk definitions if you want to force the contents of the From/Contact: headers.
If I use “fromuser=username” at my trunk definition, I can call by both lines but I get an annonimous call! Then, if I change and use “fromuser=tel_numer” then the problem is the same, one works and the another not.
I’m getting crazy, I’m not understandig what’s happenig, I thinked Asterisk was easier
In order to identify the trunks, the from address has to be the user. In that case, you cannot use it for CLID. RPID, if the other side allows, allows you to send CLID even with a fixed from address.
Sensible service providers will only allow you to send CLIDs that you have proved to them that you own.
I don’t understand why Asterisk is sending the user for the from on one trunk. I would expect it to pass the CLID thorugh on both.
I tested it over 3CX for Windows. Ther, you have an editable field called “From” where you can write ANY data that you want to show on the escreen of the called people (yes, all you want) and it was tested with these same lines I’m trying to, and there, all works perfectly but it does not have the power of Asterisk.
[quote=“david55”]That’s not standard SIP semantics. You will need to set ${CALLERID(name)} in the dial plan and use fromuser in sip.conf.
The correct use of the name field is for human friendly information, which, at least in the UK, will not pass through the PSTN.[/quote]
May be. I speak about the result of the sip debug peer. I found the command you say in the Internet but I don’t know where to use it.
Here, in Spain, that information does not pass through the pstn, but goes through the VoIP trunk.
It’s crazy, now, I reconfigured both lines and surprise: one line is sent with the format sip:user@IP and the another one with sip:number@IP, and the condifurations are the same!
I’m thinking that trixbox is not a good product, it’s impossible that if I have twice the same (except por the user, DID and secret obviously) one trunk dial one think and the onother one other.
I’ve finished now of reformatting and reinstalling my Trixbox,
I configured only my tow extensions and the “bad” trunk. Worked perfectly on incoming and outgoing calls. Configured my “good” trunk and… the good works and the band no.
I think it’s impossible for ASterisk/trixbox to manage two trunks from the same provider. I’m not happy.