hi, i need check sip headers of incoming calls i have hybrid configuration with chan_sip and chan_pjsip enabled so i need check if incoming call is through chan_sip or chan_pjsip because i cant use i.e. ${PJSIP_HEADER(read,something)} on chan_sip is there some function/application/variable? thanks Marek
Joshua C. Colp
2021-Sep-17 12:48 UTC
[asterisk-users] check if call is from chan_sip or chan_pjsip
On Fri, Sep 17, 2021 at 9:42 AM marek <cervajs64 at gmail.com> wrote:> hi, > > i need check sip headers of incoming calls > > i have hybrid configuration with chan_sip and chan_pjsip enabled > > so i need check if incoming call is through chan_sip or chan_pjsip > because i cant use i.e. ${PJSIP_HEADER(read,something)} on chan_sip > > is there some function/application/variable? >The CHANNEL dialplan function[1] has the name field, which will return the channel name. If it starts with SIP then it's chan_sip, if it's PJSIP then it's chan_pjsip. -- Joshua C. Colp Asterisk Technical Lead Sangoma Technologies Check us out at www.sangoma.com and www.asterisk.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20210917/93fe71e8/attachment.html>
Jean Aunis
2021-Sep-17 12:49 UTC
[asterisk-users] check if call is from chan_sip or chan_pjsip
Le 17/09/2021 à 14:41, marek a écrit :> hi, > > i need check sip headers of incoming calls > > i have hybrid configuration with chan_sip and chan_pjsip enabled > > so i need check if incoming call is through chan_sip or chan_pjsip > because i cant use i.e. ${PJSIP_HEADER(read,something)} on chan_sip > > is there some function/application/variable? > > thanks > > Marek > >Hi, ${CHANNEL(channeltype)} should give you the information. Regards, Jean
marek
2021-Sep-17 12:50 UTC
[asterisk-users] check if call is from chan_sip or chan_pjsip - SOLVED
${CHANNEL(channeltype)} Dne 17/09/2021 v 14:41 marek napsal(a):> hi, > > i need check sip headers of incoming calls > > i have hybrid configuration with chan_sip and chan_pjsip enabled > > so i need check if incoming call is through chan_sip or chan_pjsip > because i cant use i.e. ${PJSIP_HEADER(read,something)} on chan_sip > > is there some function/application/variable? > > thanks > > Marek >