Asterisk re-writing domain

My current setup looks like this

Telco -> Asterisk -> Cisco Call Manager -> Phones

When someone calls me, the DID is received by asterisk and sent along to the call manager and then to my phone. What I’ve noticed is that the callerid is changed to show @asterisk.local. this isn’t a huge issue since i call out through asterisk aswell, however, it presents a significant issue with URI calling since i can’t simply call someone back. Any thoughts on where to check the issue?

If you are referring to the domain in the From header you can explicitly set it using the “fromdomain” option in chan_sip and “from_domain” option in chan_pjsip.

I need it to pass through the actual domain.

eg. i call from cisco spark to my phone. -> asterisk -> cisco call manager -> my phone

call works fine, however if i attempt to call the person back, the recent calls shows sparkuser@asterisk.local rather than changing or excluding my fromdomain in sip.conf results in sparkuser@

i’m going to setup a soft phone to register directly to asterisk and see if the issue occurs there too

Asterisk does not act as a proxy, it’s a back-to-back user agent so each side is independent. There may be a dial string you can use with chan_sip to do what you want but I do not know it off the top of my head.

calls directly into asterisk have the same result.

  == Using SIP VIDEO CoS mark 6
  == Using SIP RTP CoS mark 5
-- Executing [dznet-1@unauthenticated:1] Macro("SIP/", "oneline,SIP/dznet-1") in new stack
-- Executing [s@macro-oneline:1] Dial("SIP/", "SIP/dznet-1,20,tTkK") in new stack
  == Using SIP VIDEO CoS mark 6
  == Using SIP RTP CoS mark 5
-- Called SIP/dznet-1
-- SIP/dznet-1-00000117 is ringing
   > 0x7f1f80287f20 -- Probation passed - setting RTP source address to
-- SIP/dznet-1-00000117 answered SIP/
-- Channel SIP/ joined 'simple_bridge' basic-bridge <8dbb814b-407c-494b-a4c1-f724fbe5d322>
-- Channel SIP/dznet-1-00000117 joined 'simple_bridge' basic-bridge <8dbb814b-407c-494b-a4c1-f724fbe5d322>
   > 0x7f1f8020a570 -- Probation passed - setting RTP source address to
   > 0x7f1f80287f20 -- Probation passed - setting RTP source address to
   > 0x7f1f7424b7d0 -- Probation passed - setting RTP source address to
-- Channel SIP/dznet-1-00000117 left 'simple_bridge' basic-bridge <8dbb814b-407c-494b-a4c1-f724fbe5d322>
-- Channel SIP/ left 'simple_bridge' basic-bridge <8dbb814b-407c-494b-a4c1-f724fbe5d322>
  == Spawn extension (macro-oneline, s, 1) exited non-zero on 'SIP/' in macro 'oneline'
  == Spawn extension (unauthenticated, dznet-1, 1) exited non-zero on 'SIP/'

as you can see, the caller domain should be but it is rewritten as The inbound call works fine, 2 way audio, h264 video, no problems, but calling back obviously doesnt work since the caller-id is modified.

Here is the extensions.conf

exten => dznet-1,1,Macro(oneline,SIP/dznet-1)
exten => s,1,Dial(${ARG1},20,tTkK)
 same => NoOp(${DIALSTATUS} // ${ARG2})
 same => n,GotoIf($["${DIALSTATUS}" = "BUSY"]?busy:unavail)
 same => n(unavail),VoiceMail(${ARG2}@default,u)
 same => n,Hangup()
 same => n(busy),VoiceMail(${ARG2}@default,b)
 same => n,Hangup()

This is not a bug. Asterisk was designed to handle things that only have a phone number, so it has to insert its own domain for those. The domain simply is not passed across the core of Asterisk.