[asterisk-app-dev] Using ARI to set callerid for an outdial using pjsip?
Phil Mickelson
phil at cbasoftware.com
Sat Sep 16 08:10:22 CDT 2017
Excellent! So your problem is solved?
On Sat, Sep 16, 2017 at 1:43 AM, Richard Frith-Macdonald <
richard.frith-macdonald at theengagehub.com> wrote:
>
> > On 16 Sep 2017, at 01:56, Phil Mickelson <phil at cbasoftware.com> wrote:
> >
> > Sorry, I wish I could help you further but I'm not that familiar with
> pjsip. Perhaps someone from Digium will respond.
> >
> > On Fri, Sep 15, 2017 at 12:46 PM, Richard Frith-Macdonald <
> richard.frith-macdonald at theengagehub.com> wrote:
> >
> > > On 15 Sep 2017, at 13:09, Richard Frith-Macdonald <
> richard.frith-macdonald at theengagehub.com> wrote:
> > >
> > >
> > >> On 15 Sep 2017, at 12:19, Phil Mickelson <phil at cbasoftware.com>
> wrote:
> > >>
> > >> If you look at the Channel option (https://wiki.asterisk.org/
> wiki/display/AST/Asterisk+15+Channels+REST+API#Asterisk15ChannelsRESTAPI-
> create) you see the originateWithId POST option. I believe that's what
> you want. And then you specify the caller id you want to use in the
> callerId query parameter. It works like a champ. I can change this easily
> for what ever customer I'm making the call for.
> > >>
> > >> Hope this helps. If not, let me know and I'll try again.
> > >
> > > Thanks. I'm using Asterisk 14.6 rather than 15 at the moment, but I
> don't think there should be a difference (I guess I need to carefully read
> the new features in 15 though),
> > >
> > > I'm trying to use the /channels/create command rather than the
> /channels command, because I want to be able to bridge the call before the
> dial-out.
> > >
> > > I'll try using /channels instead (if it works it would at least prove
> that the problem is not in the endpoint configuration), but in the long run
> I thing I need to be able to do the job using /channels/create
> >
> > If I use /channels/{newChannelId} rather than /channels/create asterisk
> *does* put the value from the 'callerId' parameter into the 'From' header
> of the INVITE (though not into the Contacts header).
> > I don't know enough about SIP to know if that's sufficient for my
> callerid to show up at the remote phone, but it looks promising.
> > Anyway, that success seems to rule out an error in the pjsip endpoint
> configuration.
> >
> > I guess setting the CALLERID(num) variable on a channel created using
> /channels/create is not sufficient to get it sent, but I don't see what
> else I might need to do.
>
> Thanks ... with the clue that /channels/{newChannelId} works, I was able
> to go through the asterisk source and find out what it did with the
> callerId parameter that was different from setting CALLERID(num).
>
> It turns out that chanel callerId is specified it effectrively sets
> CALLERID(num), CALLERID(num_valid), CONNECTEDLINE(num) and
> CONNECTEDLINE(num_valid).
>
> And it seems that, in order to get the value set in the SIP INVITE's From
> header, the important thing to set is actually CONNECTEDLINE(num)
> _______________________________________________
> asterisk-app-dev mailing list
> asterisk-app-dev at lists.digium.com
> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-app-dev/attachments/20170916/84196954/attachment.html>
More information about the asterisk-app-dev
mailing list