FreePBX | Register | Issues | Wiki | Portal | Support

FreePBX as Outgoing PBX for another (old) Asterisk


(Betamax) #1

Hello,

i have to switch from Asterisk to FreePBX in two Steps (i also change the Provider)

Old Asterisk = 1.4.21
FreePBX = 14.0.5.2

What is working:

  • The Trunk from FreePBX to the new Provider is up and running
  • The Trunk from FreePX to old Asterisk seems to be up
  • Doing a call from external over new Provider is working
  • FreePBX routed Call to old Asterisk and the snoms rings

At the Moment this should be so!

What is not working

  • Call an external Number on SNOM at old Asterisk and use FreePBX to route them to New Provider

What habve i try:

  • First i tried to use an SIP-Trunk (the same as i use above) between old Asterisk and FreePBX

Error i get:

Old Asterisk:
WARNING[5524]: chan_sip.c:12424 handle_response_invite: Received response: “Forbidden” from ‘“K.Schmidt” <sip: 37@ 10.53.2.230>;tag=as069c578a’

FreePBX:
chan_sip.c: username mismatch, have <asteriskout>, digest has <s>
NOTICE[2488][C-0000006b] chan_sip.c: Failed to authenticate device “K.Schmidt” <sip: 37@ 10.53.2.230>;tag=as069c578a

OK, that seems to be an Problem Auth Problem, but i can’t figure out, how to resolve that.

  • Second i tried to do that with an IAX Trunk between Old Asterisk and Free PBX

Error i got:

Old Asterisk:
Dial(“SIP/37-b56660a8”, “IAX2/ast1/THENUMBERICALLED”) in new stack
– Called ast1/THENUMBERICALLED
[Dec 13 07:05:18] WARNING[5513]: chan_iax2.c:7832 socket_process: Call rejected by 10.53.2.233: No such context/extension
– Hungup ‘IAX2/ast1-6063’

FreePBX:
There is no Entry in Log!

That seems that i have not an Extension for that. I tried many Extension at In and Outbound Route in FreePBX the last Days, but nothing works at all :-/

I only want to get that:
SNOM -> Old Asterisk -> TRUNK (SIP or IAX) -> FreeBPX -> Change Outgoing Number from Two Digits (e.g 37) to something like 0401234537 -> New Provider -> Arrive at Destination

Is this possible?

Thx Kai


(Betamax) #2

OK, the first problem seems to be solved. I’ve added insecure=port,invite to the SIP-Trunk so that i could dial from SNOM -> Old Asterisk -> FreePBX -> External Nummber.

The only Problem left is, that the Caller-ID is like 04012345 (The Trunk Number from our Provider), but i need something like 0401234537 (which is Trunk-Number + internal Extension). This is needed to have the right Callback Number on the Phone.

Has anybody given me any advice?

Thx Kai


#3

I think the easiest way to do that without manually modifying code, is to assign an override callerid to the extension. But I don’t see how would callback work, because that number is not real, at least it won’t work using call history or redial. I understand if you want it that way for informational purposes though.


#4

For testing, create an extension on FreePBX. Set Outbound CID to a valid number on your system. Make a call and see whether the correct caller ID is sent.

If not, the problem is with your outbound trunk. Make sure that you are not overriding the caller ID in the Outbound Route or in the trunk settings. Possibly, your provider requires the caller ID in a specific header (P-Asserted-Identity or Remote-Party-ID). Your provider may require a different format such as including the country code, perhaps beginning with +. Do you have documentation from them or a working example?

If calls from the FreePBX extension do show the correct caller ID, check what is being sent in the From header from the old Asterisk. You may need to rewrite it into the correct format (at one end or the other).


(Betamax) #5

Hello Stewart,

that is working well. I create on FreePBX an Extension 37, insert in Outbound CID <49401234537>. This Override the Outbound CID <494012345> of the Trunk. On my Smartphone i got the correct +49 40 1234537 as CallID an can call back the right Number.

I think that the main Problem is, that i did not know exactly where and how to rewrite the CallerID in the internal Trunk between Old Asterisk and FreePBX to give an right CallerID to the Trunk to our Provider which is override the Default one.

Thx Kai


(Betamax) #6

So i will working on this Problem in the Next Year. I am on Vacation yet. Thx for help
Kai


(system) #7

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