Search code examples
asterisksipvoipfreepbx

How to make a trunk in Asterisk 13 FreePBX to call to other SIP networks, a voip peering?


I have made a trunk to make calls within my sip group (i.e) sip.antisip.com Now I want to make calls to another sip network (i.e) sip.fairytel.at.

I know we need to make dedicate trunks for these, but I am not sure of the configurations that I should make.

For making calls with antisip I tried the context of the trunk as default or from-pstn. When I call from an extension to external antisip number, the call is connected but gets cut immediately. I am not sure what I am doing wrong here ? I have given the server name, port, username, secret and selected the codecs as ulaw and alaw. I have connected this to a outbound route with dialplans as 4XXXXXXX as the number which I am testing now is that. I gave a password to check if the outbound route works correctly and it works.

For making calls to fairytel, I am using a trunk with the same credentials but the context is from-sip-external. I have connected this to another new outbound route with a dialplan of 4NNNXNNNN1X which exactly matches my fairytel number. I am not sure, if I am going completely wrong somewhere or not ?


Solution

  • I did some changes to make this work finally,

    I setup a trunk with antisip credentials and another trunk with fairytel credentials The context in both cases were from-pstn and codecs were ulaw and alaw only. Later, I created two outbound routes. One was called antisip-outbound and it has the dial pattern of fairytel in it (i.e) 479XXXXX and the trunks were in the order antisip and then fairytel. But, I think we don't need antisip here. Then. I created another outbound route call fairytel-outbound which has the dial pattern of anti-sip (i.e) 431XXXXXXX. The trunks for this were fairytel first, then antisip. Now, if I make a call from any extension, it knows if it should connect to the fairytel trunk or antisip trunk and makes the call correctly. This way, I got two different providers connected inside my freePBX.