Skip to main content

PBX to PBX Caller ID

Posted by Drew on Wed, 04/21/2010

I have a primary multi tenant TL server that has all my SIP trunks running into it. I have created a SIP trunk from the primary to a secondary single tennant TL at the customer site. When calls come in to the primary TL, they follow the incoming route of a 'reroute' tenant that I have set up. The outbound route uses the to get to the secondary server. The secondary server doesnt get CLID passed to it.
On the secondary server when the user dials out, the outbound route sends the call out the SIP trunk to the Primary server. The primary server sends the call out dropping the CLID.

Is there a way to allow CLID to pass?

Primary MT TL server PBX Manager 6.0.1.70, *1.4.18
Secondary ST TL server PBX Manager 6.0.1.78, *1.4.24.1


Submitted by Drew on Thu, 04/22/2010 Permalink

Allow tenant to manage caller IDs is set to 'yes' on the MT server.

I am using the 'Dial out(1 trunk)' default script to route calls to the ST server:
exten => s,1,GotoIf($["${MACRO_EXTEN}" = "s"]?dial)
exten => s,n,Set(__DIALED_NUMBER=${MACRO_EXTEN})
exten => s,n(dial),Macro(tl-dialout-base,${ARG1},${ARG2},${ARG3},${ARG4},${ARG5})

how long to ring=120
trunk= trunk to ST server
all other arguments are left blank

Is there a better way to do passthrough?

Submitted by lvejar on Fri, 08/06/2010 Permalink

I use the script using the parameter:

Trunk SIP/tenant-tenant

and the Asterisk CLI complains about not having the t rule:

-- Executing [NNNNNNN@from-outside-redir:7] GotoIfTime("SIP/5060-b01054e0", "*|*|*|*?from-outside-NNNNNNNN-Allhours-tenant|NNNNNNN|1") in new stack
-- Goto (from-outside-NNNNNNN-Allhours-tenant,NNNNNNN,1)
-- Executing [NNNNNNN@from-outside-NNNNNNN-Allhours-tenant:1] Set("SIP/5060-b01054e0", "__tenant=tenant") in new stack
-- Executing [NNNNNNN@from-outside-NNNNNNN-Allhours-tenant:2] Set("SIP/5060-b01054e0", "CDR(userfield)=tenant") in new stack
-- Executing [NNNNNNN@from-outside-NNNNNNN-Allhours-tenant:3] Set("SIP/5060-b01054e0", "MOH=musiconhold-tenant") in new stack
-- Executing [NNNNNNN@from-outside-NNNNNNN-Allhours-tenant:4] GotoIf("SIP/5060-b01054e0", "0?nomoh") in new stack
-- Executing [NNNNNNN@from-outside-NNNNNNN-Allhours-tenant:5] SetMusicOnHold("SIP/5060-b01054e0", "musiconhold-tenant") in new stack
-- Executing [NNNNNNN@from-outside-NNNNNNN-Allhours-tenant:6] Macro("SIP/5060-b01054e0", "tl-dialout-1-trunk-passthrough||SIP/tenant-tenant|||") in new stack
[Aug 6 11:14:12] WARNING[28800]: pbx.c:2541 __ast_pbx_run: Timeout, but no rule 't' in context 'from-outside-NNNNNNN-Allhours-tenant'

where NNNNNNN is the number dialed and tenant is the tenant name (duh!).

Submitted by eeman on Fri, 08/06/2010 Permalink

I just tested and confirmed the script works fine. I dont think you have the trunk setup correctly. My testing proves that nothing dash-tenant is appended to the names. You need to create the trunk in dids & trunks and make sure the trunk is set to that tenant only, that its context is from-inside-tenantname etc etc.