pumper created an issue (kamailio/kamailio#4402)

Hi I want to run rpc commands like permissions.addressReload from a go 
application but with no luck please help me my code is:
`
cmd:="permissions.addressReload"
conn, err := net.Dial("unix", unixSocketPath)
     if err != nil {
         return "", fmt.Errorf("connect error: %w", err)
     }
     defer conn.Close()
 
    // _, err = fmt.Fprintf(conn, "%s\n", cmd)
     _, err = conn.Write([]byte(cmd))
     if err != nil {
         return "", fmt.Errorf("write error: %w", err)
     }
 
     scanner := bufio.NewScanner(conn)
     var output string
     for scanner.Scan() {
         output += scanner.Text() + "\n"
     }
     if err := scanner.Err(); err != nil {
         return "", fmt.Errorf("read error: %w", err)
     }
`
the only thing i get is:
ยก0#^@ ^A<90><91>^^bad request: corrupted packet^@

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4402
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/issues/[email protected]>
_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to