Re: Get channel variables via ARI/AMI
"TTT" <[email protected]> Mon, 26 Jun 2023 19:35:24 +0000
| Newsgroups | gmane.comp.telephony.pbx.asterisk.user |
|---|---|
| Message-ID | <01000188f93426e9-4351d469-d1cc-4c59-aee8-33f530a09205-000000@email.amazonses.com> |
I think that’s getting me close. I’m trying to get (or recreate) the FROM and TO lines of the header, from a system running PJSIP. I think if I use CHANNEL to get local_uri and local_tag I can recreate a FROM line like: FROM=<URI>;tag=TAG And if I use CHANNEL to get remote_uri and remote_tag I can recreate a FROM line like: TO=<URI>;tag=TAG Would it be correct to assume that with this info (and ip:port info) I should be able to send a UDP SIP message from the PBX to the UA which appears to be part of the current call dialog? I realize this is an odd thing to do, but I’m just interested in technical feasibility at this point. Before I try to code this I want to ensure I’m not missing something stupid. Thanks Brian From: asterisk-users [mailto:[email protected]] On Behalf Of Joshua C. Colp Sent: Monday, June 26, 2023 3:08 PM To: Asterisk Users Mailing List - Non-Commercial Discussion <[email protected]> Subject: Re: [asterisk-users] Get channel variables via ARI/AMI On Mon, Jun 26, 2023 at 4:04 PM TTT <[email protected] <mailto:[email protected]> > wrote: It looks like if I call Getvar and pass PJSIP_HEADERS() I can get the entire SIP header for a channel. I also read (on stackoverflow) that the PJSIP_HEADER function will only return the headers from the INVITE of the inbound channel. If that’s correct, how would I get the headers from the outbound channel (second leg of the bridged call) INVITE ? Or will PJSIP_HEADERS() in fact return the header from either inbound out outbound legs? The answer is, you can't. There are SOME protocol level things accessible using CHANNEL[1] but that's it. [1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+Function_CHANNEL -- Joshua C. Colp Asterisk Project Lead Sangoma Technologies Check us out at www.sangoma.com <http://www.sangoma.com> and www.asterisk.org <http://www.asterisk.org> -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users