Add SIP Header For 1 SIP Peer When Calling A Group Of SIP Peers

Home » Asterisk Users » Add SIP Header For 1 SIP Peer When Calling A Group Of SIP Peers
Asterisk Users 2 Comments

Hello,

when calling a group of SIP peers like this :

Dial( “SIP/inno0&SIP/inno4&SIP/inno6,30”)

is it possible to have a SIP header added for just 1 of these SIP peers, like only for SIP/inno0 but not for SIP/inno4 and SIP/inno6 ??

I know the function SipAddHeader(), but when I use this in the dialplan before the Dial()-command, then the header is added for all the SIP
peers that are being called.

So when calling a group of SIP peers, how can I add an extra SIP header for just one of the SIP peers ?

Kind regards, Jonas.

2 thoughts on - Add SIP Header For 1 SIP Peer When Calling A Group Of SIP Peers

  • Use a LOCAL Channel and redirect that one peer through some dialplan

    Something like this:

    Dial(LOCAL/inno0@addheader&SIP/inno4&SIP/inno6,30)

    [addheader]
    exten => inno0,1,SipAddHeader(foo)
    exten => inno0,n,Dial(SIP/inno0)
    exten => inno0,n,Hangup

  • Hi

    You should be able to do this by using a Local channel for the peer you want to add the header to:

    exten => _XXXX,1,Dial(Local/inno0&SIP/inno4&SIP/inno6,30)

    exten => inno0,1,SipAddHeader(“X-YourHeader”)
    exten => inno0,2,Dial(SIP/inno0)

    Hope this helps.

    -Barry Flanagan