What is the correct way to specify caller ID on an originated channel in ARI?

I’ve noticed that there are a few ways to set callerID on originated channels from ARI (both the name and the number). I’ve tried something like this:

http://asterisk:8088/ari/channels?endpoint=PJSIP/1000&app=asteriskTester&callerID=19055551243)

However that won’t show up in either a microsip extension or on the SBC. I also tried setting variables in the body. The docs imply that you can set CALLERID(name), so I tried this in the body:

    "variables":{
        "CALLERID(num)":"+19055551111",
        "CALLERID(name)":"Alice_callerid"
    }

Which also didn’t work, but this did:

    "variables":{
        "CONNECTEDLINE(num)":"+19055551212",        
        "CONNECTEDLINE(name)": "Alice_connectedline"
    }

Giving me “From: “Alice_connectedline” sip:+19055551212@10.0.150.195;tag=6913fb03-edca-48db-b0fd-624ab62e9a03” on the SBC INVITE (although I didn’t see a p-asserted-identity header-not sure if this is ever required).

Is this expected behaviour? It appears to do what I want for my scenario, so I’m inclined to just run with it, but I’m wondering why those other callerID parameters didn’t do what I expected.

I’m not familiar with the fine details of ARI, but if setting CONNECTEDLINE has the right effect you were setting CALLERID on the channel on the wrong side of the bridge.

Thanks David-based on the docs for CONNECTEDLINE that makes sense, but I’m not sure how/why this could be on the wrong side of the bridge. I’m originating a channel through ARI, which is dialing outbound, but the caller ID seems like it’s reversed? I’m new to Asterisk, but very familiar with other SIP/CPaaS platforms, so part of this is trying to wrap my head around the different semantics.

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